|
arduino-audio-tools
|
Wraps the encoded data into OSC info and data segments so that the receiver can recover the audio configuration and orignial segments. More...
#include <ContainerOSC.h>
Classes | |
| class | OSCOutput |
| Output Encoded Audio via OSC. More... | |
Public Member Functions | |
| OSCContainerEncoder ()=default | |
| OSCContainerEncoder (AudioEncoder &encoder) | |
| AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| bool | begin () override |
| virtual bool | begin (AudioInfo info) |
| void | end () |
| virtual uint32_t | frameDurationUs () |
| Optional rtsp function: provide the frame duration in microseconds. | |
| virtual int | frameSize () |
| uint64_t | getSequenceNumber () |
| Returns the sequence number of the next packet. | |
| virtual const char * | mime () |
| Provides the mime type of the encoded result. | |
| operator bool () | |
| size_t | resendEncodedData (uint8_t *data, size_t len, uint64_t seq) |
| Resend the encoded data. | |
| virtual uint16_t | samplesPerFrame () |
| Optional rtsp function: provide samples per the frame. | |
| void | setAudioInfo (AudioInfo info) override |
| Defines the sample rate, number of channels and bits per sample. | |
| void | setEncodedWriteCallback (void(*write_callback)(uint8_t *data, size_t len, uint64_t seq, void *ref)) |
| Get informed about the encoded packages. | |
| void | setEncoder (AudioEncoder *encoder) |
| void | setInfoActive (bool flag) |
| Activate/deactivate the sending of the audio info. | |
| void | setOutput (Print &outStream) |
| Default output assignment (encoders may override to store Print reference) | |
| void | setReference (void *ref) |
| Define a reference object to be provided by the callback. | |
| void | setRepeatInfoEvery (int packet_count) |
| Automatically resend audio info ever nth write. | |
| size_t | write (const uint8_t *data, size_t len) |
| Add data segment. On first write we also add a AudioInfo header. | |
Protected Member Functions | |
| void | writeAudioInfo (AudioInfo info, const char *mime) |
| OUtput AudioInfo via OSC. | |
| void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Protected Attributes | |
| AudioInfo | info |
| bool | is_active = false |
| bool | is_send_info_active = true |
| audio_tools::OSCContainerEncoder::OSCOutput | osc_out |
| AudioEncoder * | p_codec = nullptr |
| Print * | p_out = nullptr |
| uint64_t | packet_count = 0 |
| int | repeat_info = 0 |
Wraps the encoded data into OSC info and data segments so that the receiver can recover the audio configuration and orignial segments.
|
default |
|
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 |
Implements AudioWriter.
|
inlinevirtualinherited |
Reimplemented in OpusOggEncoder, OggContainerEncoder, DecoderBasic, AudioDecoder, AACEncoderFDK, AACEncoderVO, OggContainerDecoder, and MetaDataFilterEncoder.
|
inlinevirtual |
Implements AudioWriter.
|
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 |
Returns the sequence number of the next packet.
|
inlinevirtual |
Provides the mime type of the encoded result.
Implements AudioEncoder.
|
inlinevirtual |
Implements AudioWriter.
|
inline |
Resend the encoded data.
|
inlinevirtualinherited |
Optional rtsp function: provide samples per the frame.
Reimplemented in OpusAudioEncoder, OpusMultiStreamAudioEncoder, MP3EncoderShine, MP3ParserEncoder, and MetaDataFilterEncoder.
|
inlineoverridevirtual |
Defines the sample rate, number of channels and bits per sample.
Reimplemented from AudioEncoder.
|
inline |
Get informed about the encoded packages.
|
inline |
|
inline |
Activate/deactivate the sending of the audio info.
|
inlinevirtual |
Default output assignment (encoders may override to store Print reference)
Reimplemented from AudioEncoder.
|
inline |
Define a reference object to be provided by the callback.
|
inline |
Automatically resend audio info ever nth write.
|
inlinevirtual |
Add data segment. On first write we also add a AudioInfo header.
Implements AudioWriter.
|
inlineprotectedinherited |
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |