arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
audio_tools::OggContainerDecoder Class Reference

OggContainerDecoder - Ogg Container. Decodes a packet from an Ogg container. The Ogg begin segment contains the AudioBaseInfo structure. You can subclass and overwrite the beginOfSegment() method to implement your own headers. More...

#include <ContainerOgg.h>

Inheritance diagram for audio_tools::OggContainerDecoder:
audio_tools::AudioDecoder audio_tools::AudioWriter audio_tools::AudioBaseInfoSource audio_tools::OpusOggDecoder

Public Member Functions

 OggContainerDecoder ()
 Construct a new OggContainerDecoder object.
 
 OggContainerDecoder (AudioDecoder &decoder)
 
 OggContainerDecoder (AudioDecoder *decoder)
 
AudioBaseInfo audioInfo () override
 
void begin () override
 
void begin (AudioBaseInfo info)
 
void end () override
 
void flush ()
 
virtual operator bool () override
 
void setNotifyAudioChange (AudioBaseInfoDependent &bi) override
 
void setOutputStream (Print &out_stream) override
 Defines the output Stream. More...
 
virtual size_t write (const void *in_ptr, size_t in_size) override
 
- Public Member Functions inherited from audio_tools::AudioDecoder
 AudioDecoder (AudioDecoder const &)=delete
 
virtual AudioBaseInfo audioInfo ()=0
 
virtual bool isResultPCM ()
 
AudioDecoderoperator= (AudioDecoder const &)=delete
 
virtual void setAudioInfo (AudioBaseInfo from) override
 
virtual void setOutputStream (AudioPrint &out_stream)
 
virtual void setOutputStream (AudioStream &out_stream)
 
virtual void setOutputStream (Print &out_stream) override=0
 
virtual void begin ()=0
 
virtual void end ()=0
 
virtual operator bool ()=0
 
virtual void setAudioInfo (AudioBaseInfo from)=0
 
virtual void setOutputStream (Print &out_stream)=0
 
virtual size_t write (const void *in_ptr, size_t in_size)=0
 
virtual void setNotifyAudioChange (AudioBaseInfoDependent &bi)=0
 

Protected Member Functions

virtual void beginOfSegment (ogg_packet *op)
 
virtual void endOfSegment (ogg_packet *op)
 
virtual void notify ()
 

Static Protected Member Functions

static size_t ogg_io_read (void *user_handle, void *buf, size_t n)
 
static int read_packet (OGGZ *oggz, oggz_packet *zp, long serialno, void *user_data)
 
static int read_page (OGGZ *oggz, const ogg_page *og, long serialno, void *user_data)
 

Protected Attributes

AudioBaseInfoDependentbid = nullptr
 
RingBuffer< uint8_t > buffer {OGG_DEFAULT_BUFFER_SIZE}
 
AudioBaseInfo cfg
 
bool is_open = false
 
AudioDecoderp_codec = nullptr
 
OGGZ * p_oggz = nullptr
 
Printp_print = nullptr
 
long pos = 0
 

Detailed Description

OggContainerDecoder - Ogg Container. Decodes a packet from an Ogg container. The Ogg begin segment contains the AudioBaseInfo structure. You can subclass and overwrite the beginOfSegment() method to implement your own headers.

Author
Phil Schatzmann

Member Function Documentation

◆ audioInfo()

AudioBaseInfo audio_tools::OggContainerDecoder::audioInfo ( )
inlineoverridevirtual

◆ begin()

void audio_tools::OggContainerDecoder::begin ( )
inlineoverridevirtual

◆ end()

void audio_tools::OggContainerDecoder::end ( )
inlineoverridevirtual

◆ operator bool()

virtual audio_tools::OggContainerDecoder::operator bool ( )
inlineoverridevirtual

◆ setNotifyAudioChange()

void audio_tools::OggContainerDecoder::setNotifyAudioChange ( AudioBaseInfoDependent bi)
inlineoverridevirtual

◆ setOutputStream()

void audio_tools::OggContainerDecoder::setOutputStream ( Print out_stream)
inlineoverridevirtual

Defines the output Stream.

Implements audio_tools::AudioDecoder.

◆ write()

virtual size_t audio_tools::OggContainerDecoder::write ( const void *  in_ptr,
size_t  in_size 
)
inlineoverridevirtual

The documentation for this class was generated from the following file: