Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

RTPAVProfileSampleBasedAudioSender Class Reference

#include <RTPAVProfileSampleBasedAudioSender.h>

Inheritance diagram for RTPAVProfileSampleBasedAudioSender:

RTPPayloadSender RTPAVProfilePayload10Sender List of all members.

Protected Member Functions

virtual void initializeSenderModule (RTPInnerPacket *)
virtual void openSourceFile (const char *fileName)
virtual void closeSourceFile ()
virtual void play ()
virtual void stop ()
virtual void seekTime (simtime_t moment)
virtual void seekByte (int position)
virtual bool sendPacket ()

Protected Attributes

AFfilehandle _audioFile
simtime_t _startTime
int _samplingRate
int _sampleWidth
int _numberOfChannels

Detailed Description

The class RTPAVProfileSampleBasedAudioSender is a base class for modules sending sample based audio as defined in the RTP audio/video profile. For reading audio files it used libaudiofile. Subclasses must provide a method initialize() to set parameters like sampling rate, sample width and number of channels.


Member Function Documentation

void RTPAVProfileSampleBasedAudioSender::closeSourceFile  )  [protected, virtual]
 

This method is called by the destructor and closes the data file.

Reimplemented from RTPPayloadSender.

void RTPAVProfileSampleBasedAudioSender::initializeSenderModule RTPInnerPacket  )  [protected, virtual]
 

Called when this sender module receives a message initializeSenderModule.

Reimplemented from RTPPayloadSender.

void RTPAVProfileSampleBasedAudioSender::openSourceFile const char *  fileName  )  [protected, virtual]
 

This method is called by initializeSenderModule and opens the source data file as an inputFileStream stored in member variable _inputFileStream. Most data formats can use this method directly, but when using a library for a certain data format which offers an own open routine this method must be overwritten.

Reimplemented from RTPPayloadSender.

void RTPAVProfileSampleBasedAudioSender::play  )  [protected, virtual]
 

Starts data transmission. Every sender module must implement this method.

Reimplemented from RTPPayloadSender.

void RTPAVProfileSampleBasedAudioSender::seekByte int  position  )  [protected, virtual]
 

When the data transmission is paused the current position is changed to this byte position (excluding file header). Implementation in sender modules is optional.

Reimplemented from RTPPayloadSender.

void RTPAVProfileSampleBasedAudioSender::seekTime simtime_t  moment  )  [protected, virtual]
 

When the data transmission is paused the current position is changed to this time (relative to start of file). Implementation in sender modules is optional.

Reimplemented from RTPPayloadSender.

bool RTPAVProfileSampleBasedAudioSender::sendPacket  )  [protected, virtual]
 

This method gets called when one (or more) rtp data packets have to be sent. Subclasses must overwrite this method to do something useful. This implementation doesn't send packets it just returns false which means end of file reached.

Reimplemented from RTPPayloadSender.

void RTPAVProfileSampleBasedAudioSender::stop  )  [protected, virtual]
 

This method stop data transmission and resets the sender module so that a following PLAY command would start the transmission at the beginning again. Every sender module should implement this method.

Reimplemented from RTPPayloadSender.


Member Data Documentation

AFfilehandle RTPAVProfileSampleBasedAudioSender::_audioFile [protected]
 

File handle for the audio file.

int RTPAVProfileSampleBasedAudioSender::_numberOfChannels [protected]
 

The number of different audio channels. Must be set by subclasses in initialize().

int RTPAVProfileSampleBasedAudioSender::_sampleWidth [protected]
 

The width of a sample of one channel in bits. Possibly values are 8, 16 and 24. Must be set by subclasses in initialize().

int RTPAVProfileSampleBasedAudioSender::_samplingRate [protected]
 

The sampling rate of the audio. Must be set by subclasses in initialize().

simtime_t RTPAVProfileSampleBasedAudioSender::_startTime [protected]
 

The time this sender module got initialized. Used to calculate time stamps.


The documentation for this class was generated from the following files:
Generated on Tue Sep 12 12:20:21 2006 for RTP model for OMNeT++ by  doxygen 1.4.2