Skip to content

pkgs/audio/codec/ogg

Implements page, packet and stream framing of Ogg container, does not explain packet internal use of Opus or other codecs.

Go API References

Core structure and main function

SymbolFunction
Page / ParsePage / ParsePagesParse Ogg pages.
Packet / ExtractPacketsReassemble packets from pages.
BuildPacketPages / MarshalPagesPaging and encoding the packet.
StreamReader / NewStreamReaderIncrementally read Ogg stream.
StreamWriter / NewStreamWriterManage serial, sequence and page output.
PacketsRead packets using iterator.

Ogg package has container framing, checksum and page sequencing; Opus header and PCM conversion belong to codecconv and codec/opus.