Linear PCM Format for RTSP Streaming.
More...
#include <RTSPFormat.h>
|
| RTSPFormatPCM (AudioInfo info, int fragmentSize=640) |
|
virtual AudioInfo | audioInfo () |
|
void | begin (AudioInfo info) |
|
int | convert (void *data, int samples) |
| Convert to network format.
|
|
AudioInfo | defaultConfig () override |
|
const char * | format (char *buffer, int len) override |
| Provide format 10 or 11.
|
|
virtual int | fragmentSize () |
| Fragment (=write) size in bytes.
|
|
AudioInfo | info () |
|
virtual const char * | name () |
|
virtual int | readHeader (uint8_t *data) |
| Optional header: e.g. rfc2250.
|
|
int | rtpPayloadType () override |
| 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)
|
|
virtual int | timerPeriodUs () |
| Timer period in microseconds.
|
|
virtual int | timestampIncrement () |
| Fragment size in samples.
|
|
virtual bool | useRfc2250Header () const |
|
|
int | bytesPerSample () |
|
int | channels () |
|
int | getTimerPeriod (int fragmentSize) |
| Get the timer period for streaming.
|
|
const char * | payloadFormat () |
|
int | sampleRate () |
|
|
AudioInfo | cfg {16000, 1, 16} |
|
int | fragment_size = 640 |
|
const char * | name_str = "RTSPAudioTools" |
|
char | payload_fromat [30] |
|
const char * | STD_URL_PRE_SUFFIX = "trackID" |
|
int | timer_period_us = 10000 |
|
Linear PCM Format for RTSP Streaming.
RTSPFormatPCM implements the RTSPFormat interface for linear PCM audio, the most common uncompressed audio format. This class:
- Generates SDP media descriptions for L16 (Linear 16-bit) RTP payload
- Handles byte order conversion from host to network format (big-endian)
- Calculates appropriate fragment sizes and timing for smooth streaming
- Supports arbitrary sample rates and channel configurations
- See also
- https://en.wikipedia.org/wiki/RTP_payload_formats
- Note
- Automatically handles endian conversion for network transmission
◆ audioInfo()
◆ begin()
◆ convert()
int convert |
( |
void * |
data, |
|
|
int |
samples |
|
) |
| |
|
inlinevirtual |
Convert to network format.
- Parameters
-
Reimplemented from RTSPFormat.
◆ defaultConfig()
◆ format()
const char * format |
( |
char * |
buffer, |
|
|
int |
len |
|
) |
| |
|
inlineoverridevirtual |
Provide format 10 or 11.
- Parameters
-
- Returns
- const char*
Implements RTSPFormat.
◆ getTimerPeriod()
int getTimerPeriod |
( |
int |
fragmentSize | ) |
|
|
inlineprotected |
Get the timer period for streaming.
- Returns
- Timer period in microseconds between audio packets
◆ rtpPayloadType()
◆ setUseRfc2250Header()
virtual void setUseRfc2250Header |
( |
bool |
| ) |
|
|
inlinevirtualinherited |
Optional: Configure RFC2250 header usage (default: no-op)
Reimplemented in RTSPFormatMP3.
◆ timerPeriodUs()
virtual int timerPeriodUs |
( |
| ) |
|
|
inlinevirtualinherited |
◆ timestampIncrement()
virtual int timestampIncrement |
( |
| ) |
|
|
inlinevirtualinherited |
The documentation for this class was generated from the following file: