|
arduino-audio-tools
|
Dummy Encoder which just copies the provided data to the output. More...
#include <CodecCopy.h>
Public Member Functions | |
| CopyEncoder () | |
| CopyEncoder (Print &out_stream) | |
| CopyEncoder (Print &out_stream, AudioInfoSupport &bi) | |
| ~CopyEncoder () | |
| AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| virtual AudioInfo | audioInfoOut () |
| virtual bool | begin (AudioInfo info) |
| bool | begin () |
| void | end () |
| virtual uint32_t | frameDurationUs () |
| Optional rtsp function: provide the frame duration in microseconds. | |
| virtual uint32_t | frameDurationUs () |
| Optional rtsp function: provide the frame duration in microseconds. | |
| virtual int | frameSize () |
| virtual int | frameSize () |
| const char * | mime () |
| Provides the mime type of the encoded data. | |
| operator bool () | |
| virtual uint16_t | samplesPerFrame () |
| Optional rtsp function: provide samples per the frame. | |
| virtual uint16_t | samplesPerFrame () |
| Optional rtsp function: provide samples per the frame. | |
| void | setAudioInfo (AudioInfo from) override |
| Defines the sample rate, number of channels and bits per sample. | |
| void | setAudioInfo (AudioInfo from) override |
| Defines the sample rate, number of channels and bits per sample. | |
| void | setMime (const char *mime) |
| Defines the mime type. | |
| virtual void | setOutput (Print &out_stream) |
| Default output assignment (encoders may override to store Print reference). | |
| size_t | write (const uint8_t *data, size_t len) |
Protected Member Functions | |
| void | writeBlocking (Print *out, uint8_t *data, size_t len) |
| void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Protected Attributes | |
| AudioInfo | info |
| const char * | mime_type = "audio/pcm" |
| Print * | pt_print =nullptr |
Dummy Encoder which just copies the provided data to the output.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, CodecNOP, BinaryContainerEncoder, CodecNOP, MP3EncoderShine, and MP3ParserEncoder.
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, CodecNOP, BinaryContainerEncoder, CodecNOP, MP3EncoderShine, and MP3ParserEncoder.
|
inlinevirtualinherited |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in ChannelFormatConverterStream, ChannelFormatConverterStreamT< T >, FormatConverterStream, MP3EncoderShine, NumberFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, Pipeline, PureDataStream, PWMAudioOutput< PWMDriverT >, ResampleStream, ResampleStreamT< TInterpolator >, and SupportedRatesStream.
|
inlinevirtualinherited |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in ChannelFormatConverterStream, ChannelFormatConverterStreamT< T >, FormatConverterStream, MP3EncoderShine, NumberFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, Pipeline, PureDataStream, PWMAudioOutput< PWMDriverT >, ResampleStream, ResampleStreamT< TInterpolator >, and SupportedRatesStream.
Reimplemented in AudioDecoder, and AudioDecoder.
|
inlinevirtual |
Implements AudioWriter.
|
inlinevirtual |
Implements AudioWriter.
|
inlinevirtualinherited |
Optional rtsp function: provide the frame duration in microseconds.
Reimplemented in ADPCMEncoder, MetaDataFilterEncoder, MP3EncoderShine, MP3ParserEncoder, and OpusOggEncoder.
|
inlinevirtualinherited |
Optional rtsp function: provide the frame duration in microseconds.
Reimplemented in ADPCMEncoder, MetaDataFilterEncoder, MP3EncoderShine, MP3ParserEncoder, and OpusOggEncoder.
|
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, AMRNBEncoder, AMRWBEncoder, EncoderALAC, and MP3ParserEncoder.
|
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, AMRNBEncoder, AMRWBEncoder, EncoderALAC, and MP3ParserEncoder.
|
inlinevirtual |
Provides the mime type of the encoded data.
Implements AudioEncoder.
|
inlinevirtual |
Implements AudioWriter.
|
inlinevirtualinherited |
Optional rtsp function: provide samples per the frame.
Reimplemented in MetaDataFilterEncoder, MP3EncoderShine, MP3ParserEncoder, OpusAudioEncoder, and OpusMultiStreamAudioEncoder.
|
inlinevirtualinherited |
Optional rtsp function: provide samples per the frame.
Reimplemented in MetaDataFilterEncoder, MP3EncoderShine, MP3ParserEncoder, OpusAudioEncoder, and OpusMultiStreamAudioEncoder.
|
inlineoverridevirtualinherited |
Defines the sample rate, number of channels and bits per sample.
Implements AudioWriter.
|
inlineoverridevirtualinherited |
Defines the sample rate, number of channels and bits per sample.
Implements AudioWriter.
|
inline |
Defines the mime type.
|
inlinevirtual |
Default output assignment (encoders may override to store Print reference).
Reimplemented from AudioEncoder.
|
inlinevirtual |
Implements AudioWriter.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
protectedinherited |
|
protected |
|
protected |