Documentation
¶
Overview ¶
Package oggreader implements the Ogg media container reader
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OggHeader ¶
type OggHeader struct {
ChannelMap uint8
Channels uint8
OutputGain uint16
PreSkip uint16
SampleRate uint32
Version uint8
}
OggHeader is the metadata from the first two pages in the file (ID and Comment)
type OggPageHeader ¶
type OggPageHeader struct {
GranulePosition uint64
// contains filtered or unexported fields
}
OggPageHeader is the metadata for a Page Pages are the fundamental unit of multiplexing in an Ogg stream
type OggReader ¶
type OggReader struct {
// contains filtered or unexported fields
}
OggReader is used to read Ogg files and return page payloads
func (*OggReader) ParseNextPage ¶
func (o *OggReader) ParseNextPage() ([]byte, *OggPageHeader, error)
ParseNextPage reads from stream and returns Ogg page payload, header, and an error if there is incomplete page data.
func (*OggReader) ResetReader ¶
func (o *OggReader) ResetReader(reset func(bytesRead int64) io.ReadSeeker)
ResetReader resets the internal stream of OggReader. This is useful for live streams, where the end of the file might be read without the data being finished.
Click to show internal directories.
Click to hide internal directories.