View Source ExWebRTC.Media.Ogg.Reader (ex_webrtc v0.4.1)
Reads Opus packets from an Ogg container file.
For now, works only with single Opus stream in the container.
Based on:
Summary
Types
@opaque t()
Functions
Closes an Ogg reader.
When a process owning the Ogg reader exits, Ogg reader is closed automatically.
@spec next_packet(t()) :: {:ok, {binary(), non_neg_integer()}, t()} | {:error, term()} | :eof
Reads next Ogg packet.
One Ogg packet is equivalent to one Opus packet. This function also returns the duration of the audio in milliseconds, based on Opus packet TOC sequence (see RFC 6716, sec. 3). It assumes that all of the Ogg packets belong to the same stream.
Opens Ogg file.
For now, works only with single Opus stream in the container. This function reads the ID and Comment Headers (and, for now, ignores them).