arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
RTSPFormatMP3 Class Reference

MP3 format for RTSP https://en.wikipedia.org/wiki/RTP_payload_formats. More...

#include <RTSPFormat.h>

Inheritance diagram for RTSPFormatMP3:
RTSPFormat

Public Member Functions

 RTSPFormatMP3 ()
 
 RTSPFormatMP3 (AudioEncoder &encoder)
 Provide dynamic frame duration if encoder is available.
 
AudioInfo audioInfo ()
 Provides the AudioInfo.
 
void begin (AudioInfo info) override
 
virtual int convert (void *data, int sampleCount)
 
AudioInfo defaultConfig ()
 
const charformat (char *buffer, int len) override
 
virtual int fragmentSize ()
 Fragment (=write) size in bytes.
 
virtual const charname ()
 
virtual int readHeader (uint8_t *data)
 Optional header: e.g. rfc2250.
 
int readHeader (unsigned char *buffer) override
 rfc2250 header before the playload
 
int rtpPayloadType () override
 default dynamic
 
void setEncoder (AudioEncoder &encoder)
 
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.
 
void setUseRfc2250Header (bool enable)
 Optional: Configure RFC2250 header usage (default: no-op)
 
int timerPeriodUs ()
 Timer period in microseconds.
 
virtual int timestampIncrement ()
 Fragment size in samples.
 
bool useRfc2250Header () const override
 

Protected Attributes

AudioInfo cfg {16000, 1, 16}
 
int fragment_size = 640
 
const charname_str = "RTSPAudioTools"
 
AudioEncoderp_encoder = nullptr
 
const charSTD_URL_PRE_SUFFIX = "trackID"
 
int timer_period_us = 10000
 
bool use_rfc2250_header_ = false
 

Detailed Description

MP3 format for RTSP https://en.wikipedia.org/wiki/RTP_payload_formats.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ RTSPFormatMP3() [1/2]

RTSPFormatMP3 ( )
inline

◆ RTSPFormatMP3() [2/2]

RTSPFormatMP3 ( AudioEncoder encoder)
inline

Provide dynamic frame duration if encoder is available.

Member Function Documentation

◆ audioInfo()

AudioInfo audioInfo ( )
inlinevirtual

Provides the AudioInfo.

Reimplemented from RTSPFormat.

◆ begin()

void begin ( AudioInfo  info)
inlineoverridevirtual

Reimplemented from RTSPFormat.

◆ convert()

virtual int convert ( void data,
int  sampleCount 
)
inlinevirtualinherited

Reimplemented in RTSPFormatPCM.

◆ defaultConfig()

AudioInfo defaultConfig ( )
inlinevirtual

Implements RTSPFormat.

◆ format()

const char * format ( char buffer,
int  len 
)
inlineoverridevirtual

Implements RTSPFormat.

◆ fragmentSize()

virtual int fragmentSize ( )
inlinevirtualinherited

Fragment (=write) size in bytes.

◆ name()

virtual const char * name ( )
inlinevirtualinherited

◆ readHeader() [1/2]

virtual int readHeader ( uint8_t data)
inlinevirtualinherited

Optional header: e.g. rfc2250.

◆ readHeader() [2/2]

int readHeader ( unsigned char buffer)
inlineoverride

rfc2250 header before the playload

◆ rtpPayloadType()

int rtpPayloadType ( )
inlineoverridevirtual

default dynamic

Reimplemented from RTSPFormat.

◆ setEncoder()

void setEncoder ( AudioEncoder encoder)
inline

◆ setFragmentSize()

void setFragmentSize ( int  fragmentSize)
inlineinherited

Defines the fragment size in bytes.

◆ setName()

void setName ( const char name)
inlineinherited

Defines the name of the stream.

◆ setTimerPeriodUs()

void setTimerPeriodUs ( int  period)
inlineinherited

Defines the timer period in microseconds.

◆ setUseRfc2250Header()

void setUseRfc2250Header ( bool  )
inlinevirtual

Optional: Configure RFC2250 header usage (default: no-op)

Reimplemented from RTSPFormat.

◆ timerPeriodUs()

int timerPeriodUs ( )
inlinevirtual

Timer period in microseconds.

Reimplemented from RTSPFormat.

◆ timestampIncrement()

virtual int timestampIncrement ( )
inlinevirtual

Fragment size in samples.

Reimplemented from RTSPFormat.

◆ useRfc2250Header()

bool useRfc2250Header ( ) const
inlineoverridevirtual

Reimplemented from RTSPFormat.

Member Data Documentation

◆ cfg

AudioInfo cfg {16000, 1, 16}
protectedinherited

◆ fragment_size

int fragment_size = 640
protectedinherited

◆ name_str

const char* name_str = "RTSPAudioTools"
protectedinherited

◆ p_encoder

AudioEncoder* p_encoder = nullptr
protected

◆ STD_URL_PRE_SUFFIX

const char* STD_URL_PRE_SUFFIX = "trackID"
protectedinherited

◆ timer_period_us

int timer_period_us = 10000
protectedinherited

◆ use_rfc2250_header_

bool use_rfc2250_header_ = false
protected

The documentation for this class was generated from the following file: