sipxmedialib  Version 3.3
Public Member Functions | Public Attributes | List of all members
MprRtpDispatcher::MpRtpStream Struct Reference

Information, specific for an RTP stream. More...

#include <MprRtpDispatcher.h>

Inheritance diagram for MprRtpDispatcher::MpRtpStream:
Inheritance graph
[legend]
Collaboration diagram for MprRtpDispatcher::MpRtpStream:
Collaboration graph
[legend]

Public Member Functions

 MpRtpStream ()
 
void pushPacket (MpRtpBufPtr &pRtp)
 Push packet to the stream for processing. More...
 
void activate (int fromIp, int fromPort)
 Mark stream as active. More...
 
void deactivate ()
 Mark stream as inactive. More...
 
UtlBoolean timeoutDeactivate (const OsTime &timeout)
 Mark stream as inactive, if timeout occurred. More...
 
UtlBoolean isActive () const
 Is this stream marked as active? More...
 
RtpSRC getSSRC () const
 Get stream SSRC. More...
 
void setSSRC (RtpSRC ssrc)
 Set stream SSRC. More...
 
OsStatus postStreamNotif (OsMsgDispatcher *pMsgQ, const UtlString &resourceName, MpConnectionID connId, MprnRtpStreamActivityMsg::StreamState state) const
 Send notification on stream activation/deactivation. More...
 

Public Attributes

int mStreamId
 
OsTime mLastPacketTime
 Time of last packet receive. More...
 
UtlBoolean mStreamActive
 Is this stream active or not? More...
 
int mAddress
 IP address of the stream source. More...
 
int mPort
 Port of the stream source. More...
 
MpResourcempOutputResource
 

Detailed Description

Information, specific for an RTP stream.

MpRtpStream is inherited from UtlInt to hold SSRC associated with this stream and to store streams in UtlHashBag with fast access by SSRC value.

Constructor & Destructor Documentation

MpRtpStream ( )
inline

Member Function Documentation

void pushPacket ( MpRtpBufPtr pRtp)
inline

Push packet to the stream for processing.

void activate ( int  fromIp,
int  fromPort 
)
inline

Mark stream as active.

void deactivate ( )
inline

Mark stream as inactive.

UtlBoolean timeoutDeactivate ( const OsTime &  timeout)

Mark stream as inactive, if timeout occurred.

Returns
TRUE if stream just have been deactivated, TRUE otherwise.
UtlBoolean isActive ( ) const
inline

Is this stream marked as active?

RtpSRC getSSRC ( ) const
inline

Get stream SSRC.

void setSSRC ( RtpSRC  ssrc)
inline

Set stream SSRC.

setSSRC() not only sets SSRC of the stream, but also resets decoder to prepare it for a new stream.

Note: activate() should always be called after setSSRC() to eliminate excessive decoder reset on startup.

OsStatus postStreamNotif ( OsMsgDispatcher *  pMsgQ,
const UtlString &  resourceName,
MpConnectionID  connId,
MprnRtpStreamActivityMsg::StreamState  state 
) const

Send notification on stream activation/deactivation.

Member Data Documentation

int mStreamId

Abstract stream ID, used by higher levels to identify a stream.

OsTime mLastPacketTime

Time of last packet receive.

UtlBoolean mStreamActive

Is this stream active or not?

int mAddress

IP address of the stream source.

int mPort

Port of the stream source.

MpResource* mpOutputResource

Pointer to async output resource, which receives input from RTP stream Also used as a "connected" mark - NULL means this stream is not connected.