View Source ExWebRTC.Media.Ogg.Writer (ex_webrtc v0.3.0)

Writes Opus packets to an Ogg container file.

For now, works only with packets from a single Opus stream.

Based on:

Summary

Functions

Closes the writer.

Opens a new Ogg writer.

Writes an Opus packet to the Ogg file.

Types

Functions

@spec close(t()) :: :ok | {:error, term()}

Closes the writer.

This function MUST be called as it writes remaining, bufferd data to the Ogg file.

@spec open(Path.t(), sample_rate: non_neg_integer(), channel_count: non_neg_integer()) ::
  {:ok, t()} | {:error, term()}

Opens a new Ogg writer.

The writer MUST be closed with close/1, otherwise some of the data might not be written to a file.

Link to this function

write_packet(writer, packet)

View Source
@spec write_packet(t(), binary()) :: {:ok, t()} | {:error, term()}

Writes an Opus packet to the Ogg file.