|
arduino-audio-tools
|
RTSP/RTP formatter for mono IMA ADPCM (DVI4) More...
#include <RTSPFormat.h>
Public Member Functions | |
| RTSPFormatADPCM () | |
| RTSPFormatADPCM (AudioEncoder &encoder) | |
| AudioInfo | audioInfo () override |
| void | begin (AudioInfo info) override |
| virtual int | convert (void *data, int sampleCount) |
| AudioInfo | defaultConfig () |
| const char * | format (char *buffer, int len) override |
| virtual int | fragmentSize () |
| Fragment (=write) size in bytes. | |
| virtual const char * | name () |
| virtual int | readHeader (uint8_t *data) |
| Optional header: e.g. rfc2250. | |
| virtual int | rtpPayloadType () |
| default dynamic | |
| void | setFragmentSize (int fragmentSize) |
| Defines the fragment size in bytes. | |
| void | setName (const char *name) |
| Defines the name of the stream. | |
| void | setTimerPeriodUs (int period) |
| Defines the timer period in microseconds. | |
| virtual void | setUseRfc2250Header (bool) |
| Optional: Configure RFC2250 header usage (default: no-op) | |
| int | timerPeriodUs () |
| Timer period in microseconds. | |
| virtual int | timestampIncrement () |
| Fragment size in samples. | |
| virtual bool | useRfc2250Header () const |
Protected Attributes | |
| AudioInfo | cfg {16000, 1, 16} |
| int | fragment_size = 640 |
| const char * | name_str = "RTSPAudioTools" |
| AudioEncoder * | p_encoder = nullptr |
| const char * | STD_URL_PRE_SUFFIX = "trackID" |
| int | timer_period_us = 10000 |
RTSP/RTP formatter for mono IMA ADPCM (DVI4)
Maps supported sample rates (8k/16k/11.025k/22.05k) to the RFC 3551 static payload types (5,6,16,17) and generates minimal SDP (rtpmap line). Falls back to 8 kHz/PT 5 on unsupported rates.
Timing: if an encoder is provided, uses its frameDurationUs(); otherwise derives the period from fragmentSize() (2 samples per encoded byte) or retains the default 20 ms.
Template requirements (optional AudioEncoder): begin(), frameDurationUs(), blockSize(), and AudioInfoSupport (for setAudioInfo() / audioInfo()).
AudioInfo bits describe original PCM width (e.g. 16) before 4‑bit ADPCM compression.
|
inline |
|
inline |
|
inlineoverridevirtual |
Reimplemented from RTSPFormat.
|
inlineoverridevirtual |
Reimplemented from RTSPFormat.
Reimplemented in RTSPFormatPCM.
|
inlinevirtual |
Implements RTSPFormat.
Implements RTSPFormat.
default dynamic
Reimplemented in RTSPFormatPCM, and RTSPFormatMP3.
Optional: Configure RFC2250 header usage (default: no-op)
Reimplemented in RTSPFormatMP3.
|
inlinevirtual |
Timer period in microseconds.
Reimplemented from RTSPFormat.
Fragment size in samples.
Reimplemented in RTSPFormatMP3.
Reimplemented in RTSPFormatMP3.
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protectedinherited |