Construction
RTP_UserData* userData
- Session ID for RTP channel
~RTP_Session()
- Delete a session.
This deletes the userData field.
Operations
void SetJitterBufferSize( unsigned jitterDelay, PINDEX stackSize = 30000 )
- Sets the size of the jitter buffer to be used by this RTP session.
A session default to not having any jitter buffer enabled for reading
and the ReadBufferedData() function simply calls ReadData(). Once a
jitter buffer has been created it cannot be removed, though its size
may be adjusted.
If the jitterDelay paramter is zero, it destroys the jitter buffer
attached to this RTP session.
- Parameters:
- jitterDelay - Total jitter buffer delay in milliseconds
stackSize - Stack size for jitter thread
BOOL ReadBufferedData( DWORD timestamp, RTP_DataFrame & frame )
- Read a data frame from the RTP channel.
This function will conditionally read data from eth jitter buffer or
directly if there is no jitter buffer enabled. An application should
generally use this in preference to directly calling ReadData().
- Parameters:
- timestamp - Timestamp to read from buffer.
frame - Frame read from the RTP session
virtual BOOL ReadData( RTP_DataFrame & frame )
- Read a data frame from the RTP channel.
Any control frames received are dispatched to callbacks and are not
returned by this function. It will block until a data frame is
available or an error occurs.
- Parameters:
- frame - Frame read from the RTP session
virtual BOOL WriteData( RTP_DataFrame & frame )
- Write a data frame from the RTP channel.
- Parameters:
- frame - Frame to write to the RTP session
virtual BOOL WriteControl( RTP_ControlFrame & frame )
- Write a control frame from the RTP channel.
- Parameters:
- frame - Frame to write to the RTP session
virtual void Close( BOOL reading )
- Close down the RTP session.
- Parameters:
- reading - Closing the read side of the session
virtual PString GetLocalHostName()
- Get the local host name as used in SDES packes
Call back frunctions
Member variable access
unsigned GetSessionID() const
- Get the ID for the RTP session
RTP_UserData* GetUserData() const
- Get the user data for the session
void SetUserData( RTP_UserData * data )
- Set the user data for the session
DWORD GetSyncSourceOut() const
- Get the source output identifier
void IncrementReference()
- Increment reference count for RTP session
BOOL DecrementReference()
- Decrement reference count for RTP session
BOOL WillIgnoreOtherSources() const
- Indicate if will ignore all but first received SSRC value
void SetIgnoreOtherSources( BOOL ignore )
- Indicate if will ignore all but first received SSRC value.
- Parameters:
- ignore - Flag for ignore other SSRC values
BOOL WillIgnoreOutOfOrderPackets() const
- Indicate if will ignore out of order packets
void SetIgnoreOutOfOrderPackets( BOOL ignore )
- Indicate if will ignore out of order packets.
- Parameters:
- ignore - Flag for ignore out of order packets
unsigned GetSenderReportInterval()
- Get the interval for transmitter reports in the session
void SetSenderReportInterval( unsigned packets )
- Set the interval for transmitter reports in the session
unsigned GetReceiverReportInterval()
- Get the interval for receiver reports in the session
void SetReceiverReportInterval( unsigned packets )
- Set the interval for receiver reports in the session
DWORD GetPacketsSent() const
- Get total number of packets sent in session
DWORD GetOctetsSent() const
- Get total number of octets sent in session
DWORD GetPacketsReceived() const
- Get total number of packets received in session
DWORD GetOctetsReceived() const
- Get total number of octets received in session
DWORD GetPacketsLost() const
- Get total number received packets lost in session
DWORD GetPacketsOutOfOrder() const
- Get total number of packets received out of order in session
DWORD GetPacketsTooLate() const
- Get total number received packets too late to go into jitter buffer
DWORD GetAverageSendTime() const
- Get average time between sent packets.
This is averaged over the last senderReportInterval packets and is in
milliseconds.
DWORD GetMaximumSendTime() const
- Get maximum time between sent packets.
This is over the last senderReportInterval packets and is in
milliseconds.
DWORD GetMinimumSendTime() const
- Get minimum time between sent packets.
This is over the last senderReportInterval packets and is in
milliseconds.
DWORD GetAverageReceiveTime() const
- Get average time between received packets.
This is averaged over the last receiverReportInterval packets and is in
milliseconds.
DWORD GetMaximumReceiveTime() const
- Get maximum time between received packets.
This is over the last receiverReportInterval packets and is in
milliseconds.
DWORD GetMinimumReceiveTime() const
- Get minimum time between received packets.
This is over the last receiverReportInterval packets and is in
milliseconds.
DWORD GetJitterTime() const
- Get averaged jitter time for received packets.
This is the calculated statistical variance of the interarrival
time of received packets in milliseconds.