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

Output class for the OggContainerEncoder. Each write is ending up as container entry. More...

#include <ContainerOgg.h>

Inheritance diagram for OggContainerOutput:
AudioOutput Print AudioInfoSupport AudioInfoSource OpusOggWriter

Public Member Functions

virtual void addNotifyAudioChange (AudioInfoSupport &bi)
 Adds target to be notified about audio changes.
 
virtual AudioInfo audioInfo () override
 provides the actual input AudioInfo
 
virtual AudioInfo audioInfoOut ()
 provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
 
virtual int availableForWrite () override
 
virtual bool begin () override
 starts the processing using the actual AudioInfo
 
virtual bool begin (AudioInfo info)
 
virtual void clearNotifyAudioChange ()
 Deletes all change notify subscriptions.
 
void end () override
 stops the processing
 
virtual void flush ()
 
virtual bool isDeletable ()
 If true we need to release the related memory in the destructor.
 
bool isNotifyActive ()
 Checks if the automatic AudioInfo update is active.
 
bool isOpen ()
 
virtual operator bool ()
 
virtual bool removeNotifyAudioChange (AudioInfoSupport &bi)
 Removes a target in order not to be notified about audio changes.
 
virtual void setAudioInfo (AudioInfo newInfo) override
 Defines the input AudioInfo.
 
void setNotifyActive (bool flag)
 Deactivate/Reactivate automatic AudioInfo updates: (default is active)
 
void setOutput (Print &print)
 Defines the output Stream.
 
virtual size_t write (const uint8_t *data, size_t len) override
 Writes raw data to be encoded and packaged.
 
virtual size_t write (uint8_t ch) override
 
virtual void writeSilence (size_t len)
 

Protected Member Functions

void notifyAudioChange (AudioInfo info)
 
virtual bool writeFooter ()
 
virtual bool writeHeader ()
 
virtual bool writePacket (ogg_packet &op, int flag=0)
 

Static Protected Member Functions

static size_t ogg_io_write (void *user_handle, void *buf, size_t n)
 

Protected Attributes

int _timeout = 10
 
AudioInfo cfg
 
size_t granulepos = 0
 
bool is_active = false
 
bool is_audio = false
 
bool is_notify_active = true
 
bool is_open = false
 
Vector< AudioInfoSupport * > notify_vector
 
ogg_packet oh
 
ogg_packet op
 
OGGZp_oggz = nullptr
 
Printp_out = nullptr
 
size_t packetno = 0
 
long serialno = -1
 
SingleBuffer< uint8_ttmp {MAX_SINGLE_CHARS}
 
int tmpPos = 0
 

Detailed Description

Output class for the OggContainerEncoder. Each write is ending up as container entry.

Author
Phil Schatzmann

Member Function Documentation

◆ addNotifyAudioChange()

virtual void addNotifyAudioChange ( AudioInfoSupport bi)
inlinevirtualinherited

◆ audioInfo()

virtual AudioInfo audioInfo ( )
inlineoverridevirtualinherited

provides the actual input AudioInfo

Implements AudioInfoSupport.

Reimplemented in AdapterPrintToAudioOutput, and AdapterAudioStreamToAudioOutput.

◆ audioInfoOut()

virtual AudioInfo audioInfoOut ( )
inlinevirtualinherited

◆ availableForWrite()

virtual int availableForWrite ( )
inlineoverridevirtualinherited

Reimplemented from Print.

Reimplemented in RTSPOutput, and AudioFFTBase.

◆ begin() [1/2]

virtual bool begin ( )
inlineoverridevirtual

starts the processing using the actual AudioInfo

Reimplemented from AudioOutput.

◆ begin() [2/2]

virtual bool begin ( AudioInfo  info)
inlinevirtualinherited

◆ end()

void end ( )
inlineoverridevirtual

stops the processing

Reimplemented from AudioOutput.

◆ flush()

virtual void flush ( )
inlinevirtualinherited

Reimplemented from Print.

◆ isDeletable()

virtual bool isDeletable ( )
inlinevirtualinherited

If true we need to release the related memory in the destructor.

Reimplemented in AdapterPrintToAudioOutput, and AdapterAudioStreamToAudioOutput.

◆ operator bool()

virtual operator bool ( )
inlinevirtualinherited

Reimplemented in EncodedAudioOutput, and RTSPOutput.

◆ setAudioInfo()

virtual void setAudioInfo ( AudioInfo  info)
inlineoverridevirtualinherited

◆ write() [1/2]

virtual size_t write ( const uint8_t data,
size_t  len 
)
inlineoverridevirtual

Writes raw data to be encoded and packaged.

Implements AudioOutput.

◆ write() [2/2]

virtual size_t write ( uint8_t  ch)
inlineoverridevirtualinherited

Reimplemented in OversamplingDAC.

◆ writeSilence()

virtual void writeSilence ( size_t  len)
inlinevirtualinherited

Writes n 0 values (= silence)

Parameters
len

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