|
arduino-audio-tools
|
Common functionality of the ATRAC container decoders: a streaming header parser which does not need to buffer more than the header fields that are needed to set up the DecoderATRAC. More...
#include <ContainerATRAC.h>


Public Member Functions | |
| virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
| Adds target to be notified about audio changes. | |
| AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| bool | begin () override |
| Prepares the decoder for a new stream. | |
| virtual bool | begin (AudioInfo info) override |
| virtual void | clearNotifyAudioChange () |
| Deletes all change notify subscriptions. | |
| DecoderATRAC & | decoder () |
| Provides access to the ATRAC decoder. | |
| void | end () override |
| Print * | getOutput () |
| bool | isNotifyActive () |
| Checks if the automatic AudioInfo update is active. | |
| virtual const char * | mime ()=0 |
| Provides the mime type of the data that is expected by this decoder. | |
| operator bool () override | |
| virtual bool | removeNotifyAudioChange (AudioInfoSupport &bi) |
| Removes a target in order not to be notified about audio changes. | |
| void | setAudioInfo (AudioInfo from) override |
| for most decoders this is not needed | |
| virtual bool | setCodecConfig (const uint8_t *data, size_t len) |
| Some decoders need e.g. a magic cookie to provide the relevant info for decoding. | |
| void | setNotifyActive (bool flag) |
| Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
| virtual void | setOutput (AudioOutput &out_stream) |
| Defines where the decoded result is written to. | |
| virtual void | setOutput (AudioStream &out_stream) |
| Defines where the decoded result is written to. | |
| virtual void | setOutput (Print &out_stream) override |
| Defines where the decoded result is written to. | |
| void | setOutput (Print &out_stream) override |
| Defines where the decoded PCM data is written to. | |
| size_t | write (const uint8_t *data, size_t len) override |
| Processes the container data: returns 0 if the stream is not supported. | |
Public Attributes | |
| int | id |
| custom id to be used by application | |
Protected Member Functions | |
| bool | collect (const uint8_t *&p, size_t &n, size_t need) |
| Copies the data into hdr until it contains need bytes. | |
| void | fail (const char *msg) |
| void | notifyAudioChange (AudioInfo info) |
| virtual void | parse (const uint8_t *&p, size_t &n)=0 |
| Processes the header data: must consume data, change the state or fail. | |
| bool | startDecoder (ATRACType type, int sample_rate, int channels, int block_align, const uint8_t *extra=nullptr, size_t extra_size=0, bool known=false, uint32_t length=0) |
| Configures the decoder: the audio data starts after the header. | |
| void | writeBlocking (Print *out, uint8_t *data, size_t len) |
| void | writePayload (const uint8_t *&p, size_t &n) |
Static Protected Member Functions | |
| static uint16_t | be16 (const uint8_t *p) |
| static uint32_t | be24 (const uint8_t *p) |
Protected Attributes | |
| DecoderATRAC | dec |
| Vector< uint8_t > | hdr |
| AudioInfo | info |
| bool | is_active = false |
| bool | is_done = false |
| bool | is_failed = false |
| bool | is_notify_active = true |
| bool | is_streaming = false |
| Vector< AudioInfoSupport * > | notify_vector |
| Print * | p_print = nullptr |
| bool | payload_known = false |
| uint32_t | payload_left = 0 |
| remaining audio bytes (only relevant if payload_known) | |
| size_t | skip_count = 0 |
| int | state = 0 |
Common functionality of the ATRAC container decoders: a streaming header parser which does not need to buffer more than the header fields that are needed to set up the DecoderATRAC.
|
inlinevirtualinherited |
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, EncodedAudioOutput, EncodedAudioStream, AACDecoderFDK, DecoderBasic, CodecChain, MP3DecoderHelix, MP3DecoderMAD, OggContainerDecoder, RTSPClient< TcpClient, UdpSocket >, Pipeline, and Pipeline::ModifyingStreamAdapter.
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, DecoderBasic, DSFDecoder, MP3DecoderHelix, MP3DecoderMAD, OpusAudioDecoder, OpusMultiStreamAudioDecoder, VorbisDecoder, WAVDecoder, WavIMADecoder, OggContainerDecoder, and VorbisDecoder.
|
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.
|
inlinestaticprotected |
|
inlineoverridevirtual |
Prepares the decoder for a new stream.
Reimplemented from AudioDecoder.
Reimplemented from AudioWriter.
Reimplemented in DecoderBasic, and OggContainerDecoder.
|
inlinevirtualinherited |
Deletes all change notify subscriptions.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
Copies the data into hdr until it contains need bytes.
|
inline |
Provides access to the ATRAC decoder.
|
inlineoverridevirtual |
Reimplemented from AudioDecoder.
|
inlineprotected |
|
inlineinherited |
|
pure virtualinherited |
Provides the mime type of the data that is expected by this decoder.
Implemented in CodecNOP, CodecChain, MTSDecoder, MTSDecoderTSDemux, WAVDecoder, WavIMADecoder, OSCContainerDecoder, AACDecoderFAAD, AACDecoderFAAD2, AACDecoderFDK, AACDecoderHelix, AC3AudioDecoder, ADPCMDecoder, ADPCMDecoderXQ, ADTSDecoder, DecoderALAC, AMRNBDecoder, AMRWBDecoder, APTXDecoder, DecoderATRAC, DecoderBase64, DecoderBasic, Codec2Decoder, CopyDecoder, DSFDecoder, FLACDecoderFoxen, DecoderFloat, G722Decoder, G729Decoder, G7xxDecoder, GSMDecoder, ILBCDecoder, DecoderL16, DecoderL8, LC3Decoder, MP2Decoder, MP3DecoderHelix, MP3DecoderMAD, MP3DecoderMini, DecoderNetworkFormat, OpusAudioDecoder, OpusMultiStreamAudioDecoder, SBCDecoder, VorbisDecoder, ContainerATRACOMA, ContainerATRACAEA, DemuxerAVI, BinaryContainerDecoder, ContainerM4A, DemuxerMP4, DemuxerMPG, DemuxerMTS, OggContainerDecoder, MultiDecoder, DecoderAdapter, VorbisDecoder, MetaDataFilterDecoder, MultiVideoDemuxer, and Demuxer.
|
inlineprotectedinherited |
|
inlineoverridevirtual |
Implements AudioWriter.
Processes the header data: must consume data, change the state or fail.
Implemented in ContainerATRACOMA, and ContainerATRACAEA.
|
inlinevirtualinherited |
Removes a target in order not to be notified about audio changes.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
|
inlineoverridevirtualinherited |
for most decoders this is not needed
Implements AudioWriter.
Reimplemented in DecoderALAC, CodecChain, DSFDecoder, DecoderL8, OpusAudioDecoder, OpusMultiStreamAudioDecoder, CodecNOP, G729Decoder, and G7xxDecoder.
Some decoders need e.g. a magic cookie to provide the relevant info for decoding.
Reimplemented in DecoderALAC, DecoderATRAC, and MultiDecoder.
|
inlineinherited |
Deactivate/Reactivate automatic AudioInfo updates: (default is active)
|
inlinevirtual |
Defines where the decoded result is written to.
Reimplemented from AudioDecoder.
|
inlinevirtual |
Defines where the decoded result is written to.
Reimplemented from AudioDecoder.
|
inlineoverridevirtual |
Defines where the decoded result is written to.
Reimplemented from AudioDecoder.
|
inlineoverridevirtual |
Defines where the decoded PCM data is written to.
Reimplemented from AudioDecoder.
|
inlineprotected |
Configures the decoder: the audio data starts after the header.
Processes the container data: returns 0 if the stream is not supported.
Implements AudioWriter.
|
protected |
|
inherited |
custom id to be used by application
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protected |
remaining audio bytes (only relevant if payload_known)
|
protected |
|
protected |