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

Opus Encoder which uses the Ogg Container: see https://datatracker.ietf.org/doc/html/rfc7845. More...

#include <CodecOpusOgg.h>

Inheritance diagram for audio_tools::OpusOggEncoder:
audio_tools::OggContainerEncoder audio_tools::AudioEncoder audio_tools::AudioWriter

Public Member Functions

void begin () override
 starts the processing using the actual AudioInfo More...
 
void begin (OpusEncoderSettings settings)
 
OpusEncoderSettingsconfig ()
 Provides access to the configuration.
 
OpusEncoderSettingsdefaultConfig ()
 
void end () override
 
const char * mime () override
 Provides "audio/opus". More...
 
- Public Member Functions inherited from audio_tools::OggContainerEncoder
 OggContainerEncoder (AudioEncoder &encoder)
 
 OggContainerEncoder (AudioEncoder *encoder)
 
virtual void begin () override
 starts the processing using the actual AudioInfo More...
 
virtual void begin (AudioBaseInfo from)
 
void begin (Print &out)
 starts the processing
 
void end () override
 stops the processing More...
 
bool isOpen ()
 
const char * mime () override
 Provides "audio/pcm". More...
 
 operator bool () override
 
virtual void setAudioInfo (AudioBaseInfo from) override
 We actually do nothing with this. More...
 
void setOutputStream (Print &out_stream) override
 Defines the output Stream. More...
 
virtual size_t write (const void *in_ptr, size_t in_size) override
 Writes raw data to be encoded and packaged. More...
 
- Public Member Functions inherited from audio_tools::AudioEncoder
 AudioEncoder (AudioEncoder const &)=delete
 
virtual const char * mime ()=0
 
AudioEncoderoperator= (AudioEncoder const &)=delete
 
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
 

Protected Member Functions

bool writeHeader () override
 
- Protected Member Functions inherited from audio_tools::OggContainerEncoder
virtual bool writeFooter ()
 
virtual bool writeHeader ()
 
virtual bool writePacket (ogg_packet &op, int flag=0)
 

Protected Attributes

OpusOggCommentHeader comment
 
OpusAudioEncoder enc
 
OpusOggHeader header
 
ogg_packet oh1
 
- Protected Attributes inherited from audio_tools::OggContainerEncoder
SingleBuffer< uint8_t > buffer {1024}
 
AudioBaseInfo cfg
 
QueueStream< uint8_t > codec_buffer {buffer}
 
size_t granulepos = 0
 
bool is_audio = false
 
volatile bool is_open
 
ogg_packet oh
 
ogg_packet op
 
AudioEncoderp_codec = nullptr
 
Printp_encoded_audio_stream = nullptr
 
OGGZ * p_oggz = nullptr
 
Printp_print = nullptr
 
size_t packetno = 0
 
long serialno = -1
 

Additional Inherited Members

- Static Protected Member Functions inherited from audio_tools::OggContainerEncoder
static size_t ogg_io_write (void *user_handle, void *buf, size_t n)
 

Detailed Description

Opus Encoder which uses the Ogg Container: see https://datatracker.ietf.org/doc/html/rfc7845.

Author
Phil Schatzmann

Member Function Documentation

◆ begin()

void audio_tools::OpusOggEncoder::begin ( )
inlineoverridevirtual

starts the processing using the actual AudioInfo

Reimplemented from audio_tools::OggContainerEncoder.

◆ end()

void audio_tools::OpusOggEncoder::end ( )
inlineoverridevirtual

◆ mime()

const char * audio_tools::OpusOggEncoder::mime ( )
inlineoverridevirtual

Provides "audio/opus".

Implements audio_tools::AudioEncoder.

◆ writeHeader()

bool audio_tools::OpusOggEncoder::writeHeader ( )
inlineoverrideprotectedvirtual

Reimplemented from audio_tools::OggContainerEncoder.


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