#include <RTPPayloadSender.h>
Inheritance diagram for RTPPayloadSender:
Public Types | |
enum | SenderStatus { STOPPED, PLAYING } |
Public Member Functions | |
virtual void | initialize () |
virtual void | activity () |
Protected Member Functions | |
virtual void | initializeSenderModule (RTPInnerPacket *) |
virtual void | openSourceFile (const char *fileName) |
virtual void | closeSourceFile () |
virtual void | play () |
virtual void | playUntilTime (simtime_t moment) |
virtual void | playUntilByte (int position) |
virtual void | pause () |
virtual void | seekTime (simtime_t moment) |
virtual void | seekByte (int position) |
virtual void | stop () |
virtual void | endOfFile () |
virtual bool | sendPacket () |
Protected Attributes | |
ifstream | _inputFileStream |
int | _mtu |
u_int32 | _ssrc |
int | _payloadType |
int | _clockRate |
u_int32 | _timeStampBase |
u_int32 | _timeStamp |
u_int16 | _sequenceNumberBase |
u_int16 | _sequenceNumber |
SenderStatus | _status |
cMessage * | _reminderMessage |
|
A sender module's transmission can be in different states. |
|
|
|
This method is called by the destructor and closes the data file. Reimplemented in RTPAVProfileSampleBasedAudioSender. |
|
This method gets called when the sender module reaches the end of file. For the transmission it has the same effect like stop(). |
|
Chooses sequence number and time stamp base values and reads the omnet parameter "mtu". |
|
This method is called when a newly create sender module received its initialization message from profile module. It returns an RTP_INP_SENDER_MODULE_INITIALIZED message which contains information needed by the rtcp module. Reimplemented in RTPAVProfilePayload32Sender, and RTPAVProfileSampleBasedAudioSender. |
|
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 in RTPAVProfileSampleBasedAudioSender. |
|
When data is being transmitted this methods suspends till a new PLAY command. Implementation in sender modules is optional. |
|
Starts data transmission. Every sender module must implement this method. Reimplemented in RTPAVProfileSampleBasedAudioSender. |
|
Starts transmission from the current file position and plays until given byte position (excluding file header) is reached. Implementation in sender modules is optional. |
|
Starts transmission from the current file position and plays until given time (relative to start of file) is reached. Implementation in sender modules is optional. |
|
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 in RTPAVProfileSampleBasedAudioSender. |
|
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 in RTPAVProfileSampleBasedAudioSender. |
|
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 in RTPAVProfilePayload32Sender, and RTPAVProfileSampleBasedAudioSender. |
|
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 in RTPAVProfileSampleBasedAudioSender. |
|
The clock rate in ticks per second this sender uses. |
|
The input file stream for the data file. |
|
The maximum size of an RTPPacket. |
|
The payload type this sender creates. |
|
A self message used as timer for the moment the next packet must be sent. It's a member variable because when playing gets paused or stopped the timer must be cancelled. |
|
The current sequence number. |
|
The first sequence number used for created rtp data packets. The value is chosen randomly. |
|
The ssrc identifier of this sender module. |
|
The current state of data transmission. |
|
The current rtp time stamp. |
|
The first rtp time stamp used for created rtp data packets. The value is chosen randomly. |