Micro RTSP Audio
Public Member Functions | List of all members
AudioStreamer Class Reference

Class for streaming data from a source into an RTP stream. More...

#include <AudioStreamer.h>

Public Member Functions

 AudioStreamer ()
 
 AudioStreamer (IAudioSource *source)
 
virtual ~AudioStreamer ()
 
virtual void setAudioSource (IAudioSource *source)
 
bool InitAudioSource ()
 Sets up the information from the AudioSource. More...
 
bool InitUdpTransport (IPADDRESS aClientIP, IPPORT aClientPort)
 
void ReleaseUdpTransport (void)
 
int SendRtpPacketDirect ()
 
void Start ()
 
void Stop ()
 
u_short GetRtpServerPort ()
 
u_short GetRtcpServerPort ()
 
IAudioSourcegetAudioSource ()
 

Detailed Description

Class for streaming data from a source into an RTP stream.

Constructor & Destructor Documentation

◆ AudioStreamer() [1/2]

AudioStreamer::AudioStreamer ( )

Creates a new AudioStreamer object

◆ AudioStreamer() [2/2]

AudioStreamer::AudioStreamer ( IAudioSource source)

Creates a new AudioStreamer object

Parameters
sourceObject implementing the IAudioSource interface, used as a source for the RTP stream

◆ ~AudioStreamer()

AudioStreamer::~AudioStreamer ( )
virtual

Deletes allocated memory

Member Function Documentation

◆ InitAudioSource()

bool AudioStreamer::InitAudioSource ( )

Sets up the information from the AudioSource.

Returns
true
false

◆ InitUdpTransport()

bool AudioStreamer::InitUdpTransport ( IPADDRESS  aClientIP,
IPPORT  aClientPort 
)

Opens sockets for RTP stream

Parameters
aClientIPIP address of the RTP client
aClientPortport of the RTP client
Returns
true on success

◆ ReleaseUdpTransport()

void AudioStreamer::ReleaseUdpTransport ( void  )

Close sockets used for RTP stream

◆ SendRtpPacketDirect()

int AudioStreamer::SendRtpPacketDirect ( )

Sends an RTP packet using the audio source given. Audio source copies data right into the RTP packet

Returns
number of samples sent in the packet

◆ setAudioSource()

void AudioStreamer::setAudioSource ( IAudioSource source)
virtual

Defines the AudioSource object (if it was not assigned in the constructor)

◆ Start()

void AudioStreamer::Start ( )

Start the RTP stream

◆ Stop()

void AudioStreamer::Stop ( )

Stop the RTP stream


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