|
arduino-audio-tools
|
Encoder for Ogg Container. Encodes a packet for an Ogg container. The Ogg begin segment contains the AudioInfo structure. You can subclass ond overwrite the writeHeader() method to implement your own header logic. When an optional encoder is specified in the constructor we package the encoded data. Dependency: https://github.com/pschatzmann/codec-opus. More...
#include <ContainerOgg.h>


Public Member Functions | |
| OggContainerEncoder ()=default | |
| OggContainerEncoder (AudioEncoder &encoder) | |
| OggContainerEncoder (AudioEncoder *encoder) | |
| AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| virtual bool | begin () override |
| starts the processing using the actual AudioInfo | |
| virtual bool | begin (AudioInfo from) override |
| void | end () override |
| stops the processing | |
| virtual uint32_t | frameDurationUs () |
| Optional rtsp function: provide the frame duration in microseconds. | |
| virtual int | frameSize () |
| bool | isOpen () |
| const char * | mime () override |
| Provides "audio/pcm". | |
| operator bool () override | |
| virtual uint16_t | samplesPerFrame () |
| Optional rtsp function: provide samples per the frame. | |
| virtual void | setAudioInfo (AudioInfo info) override |
| We actually do nothing with this. | |
| void | setOutput (Print &print) override |
| Defines the output Stream. | |
| virtual size_t | write (const uint8_t *data, size_t len) override |
| Writes raw data to be encoded and packaged. | |
Protected Member Functions | |
| void | setEncoder (AudioEncoder *enc) |
| void | setOggOutput (OggContainerOutput *out) |
| Replace the ogg output class. | |
| void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Protected Attributes | |
| AudioInfo | info |
| OggContainerOutput | ogg |
| AudioEncoder * | p_codec = nullptr |
| OggContainerOutput * | p_ogg = &ogg |
Encoder for Ogg Container. Encodes a packet for an Ogg container. The Ogg begin segment contains the AudioInfo structure. You can subclass ond overwrite the writeHeader() method to implement your own header logic. When an optional encoder is specified in the constructor we package the encoded data. Dependency: https://github.com/pschatzmann/codec-opus.
|
default |
|
inline |
|
inline |
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, MP3EncoderShine, BinaryContainerEncoder, and MP3ParserEncoder.
|
inlinevirtualinherited |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in MP3EncoderShine, PureDataStream, PWMAudioOutput< PWMDriverT >, ChannelFormatConverterStreamT< T >, ChannelFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, NumberFormatConverterStream, FormatConverterStream, Pipeline, ResampleStream, ResampleStreamT< TInterpolator >, and SupportedRatesStream.
|
inlineoverridevirtual |
starts the processing using the actual AudioInfo
Implements AudioWriter.
Reimplemented in OpusOggEncoder.
Reimplemented from AudioWriter.
Reimplemented in OpusOggEncoder.
|
inlineoverridevirtual |
|
inlinevirtualinherited |
Optional rtsp function: provide the frame duration in microseconds.
Reimplemented in ADPCMEncoder, MP3EncoderShine, OpusOggEncoder, MP3ParserEncoder, and MetaDataFilterEncoder.
|
inlinevirtualinherited |
Optional rtsp function: provide the encoded size (in bytes) of one frame, once known (e.g. after the encoder has seen real data). Lets an RTSPFormat size its RTP fragments to match one frame instead of a fixed guess, so throughput actually tracks frameDurationUs() - a fragment size covering several frames' worth of bytes sent at one-frame timing overruns real-time bandwidth and, over UDP (no flow control), causes packet loss. Returns 0 if not yet known/not applicable (fixed-frame-size codecs have no need to override this).
Reimplemented in ADPCMEncoder, EncoderALAC, AMRNBEncoder, AMRWBEncoder, and MP3ParserEncoder.
|
inline |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Implements AudioWriter.
|
inlinevirtualinherited |
Optional rtsp function: provide samples per the frame.
Reimplemented in OpusAudioEncoder, OpusMultiStreamAudioEncoder, MP3EncoderShine, MP3ParserEncoder, and MetaDataFilterEncoder.
|
inlineoverridevirtual |
We actually do nothing with this.
Reimplemented from AudioEncoder.
|
inlineprotected |
|
inlineprotected |
Replace the ogg output class.
|
inlineoverridevirtual |
Defines the output Stream.
Reimplemented from AudioEncoder.
Writes raw data to be encoded and packaged.
Implements AudioWriter.
|
protectedinherited |
|
protected |
|
protected |
|
protected |