sipxmedialib  Version 3.3
Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
MprFromNet Class Reference

The "From Network" media processing resource. More...

#include <MprFromNet.h>

Collaboration diagram for MprFromNet:
Collaboration graph
[legend]

Public Member Functions

Creators
 MprFromNet ()
 Constructor. More...
 
virtual ~MprFromNet ()
 Destructor. More...
 
Accessors
OsStatus getRtcpStats (MprRtcpStats &stats)
 retrieve the RR info needed to complete an RTCP packet More...
 
OsStatus setFlowGraph (MpFlowGraphBase *flowgraph)
 

Private Member Functions

OsStatus rtcpStats (struct RtpHeader *h)
 Update the RR info for the current incoming packet. More...
 
UtlBoolean resetSocketsInternal (OsEvent *pEvent=NULL)
 Unregister the inbound RTP and RTCP sockets. More...
 
 MprFromNet (const MprFromNet &rMprFromNet)
 Copy constructor (not implemented for this class) More...
 
MprFromNetoperator= (const MprFromNet &rhs)
 Assignment operator (not implemented for this class) More...
 

Static Private Member Functions

static MpRtpBufPtr parseRtpPacket (const MpUdpBufPtr &buf)
 Parse UDP packet and return filled RTP packet buffer. More...
 

Private Attributes

OsMutex mDiscardCtlMutex
 
OsMutex mRegistrationSyncMutex
 
NetInTaskmNetInTask
 
UtlBoolean mRegistered
 
MprRtpDispatchermpRtpDispatcher
 
UtlBoolean mDiscardSelectedStream
 
RtpSRC mDiscardedSSRC
 
MpFlowGraphBasempFlowGraph
 
rtpHandle mInRtpHandle
 
int mRtcpCount
 
int mNumPushed
 Total RTP+RTCP pkts received from NetIn. More...
 
int mNumPktsRtcp
 Total RTCP packets received from NetIn. More...
 
int mNumPktsRtp
 Total RTP packets received from NetIn. More...
 
int mNumEncDropped
 Encoded RTP packets dropped due to no key. More...
 
int mNumLoopDropped
 Looped-back mcast RTP packets dropped. More...
 

Manipulators

UtlBoolean handleMessage (MpResourceMsg &rMsg)
 Handle message to manipulate this. More...
 
OsStatus setSockets (OsSocket &rRtpSocket, OsSocket &rRtcpSocket)
 Set the inbound RTP and RTCP sockets. More...
 
OsStatus resetSockets ()
 Unregister the inbound RTP and RTCP sockets. More...
 
OsStatus pushPacket (const MpUdpBufPtr &buf, bool isRtcp)
 Take in a buffer from the NetIn task. More...
 
OsStatus enableSsrcDiscard (UtlBoolean enable, RtpSRC ssrc)
 Enable/disable discarding of given RTP stream. More...
 
OsStatus setRtpDispatcher (MprRtpDispatcher *pRtpDispatcher)
 Set RTP dispatcher instance. More...
 
static OsStatus setSockets (const UtlString &resourceName, OsMsgQ &flowgraphMessageQueue, OsSocket *rtpSocket, OsSocket *rtcpSocket)
 send a message to a resource containing a MprFromNet to set sockets More...
 
static OsStatus resetSockets (const UtlString &resourceName, OsMsgQ &flowgraphMessageQueue)
 send a message to a resource containing a MprFromNet to reset sockets More...
 

Detailed Description

The "From Network" media processing resource.

Constructor & Destructor Documentation

Constructor.

~MprFromNet ( )
virtual

Destructor.

MprFromNet ( const MprFromNet rMprFromNet)
private

Copy constructor (not implemented for this class)

Member Function Documentation

UtlBoolean handleMessage ( MpResourceMsg rMsg)

Handle message to manipulate this.

OsStatus setSockets ( const UtlString &  resourceName,
OsMsgQ &  flowgraphMessageQueue,
OsSocket *  rtpSocket,
OsSocket *  rtcpSocket 
)
static

send a message to a resource containing a MprFromNet to set sockets

OsStatus setSockets ( OsSocket &  rRtpSocket,
OsSocket &  rRtcpSocket 
)

Set the inbound RTP and RTCP sockets.

Returns
Always OS_SUCCESS for now.
OsStatus resetSockets ( const UtlString &  resourceName,
OsMsgQ &  flowgraphMessageQueue 
)
static

send a message to a resource containing a MprFromNet to reset sockets

OsStatus resetSockets ( )

Unregister the inbound RTP and RTCP sockets.

Returns
Always OS_SUCCESS for now.
OsStatus pushPacket ( const MpUdpBufPtr buf,
bool  isRtcp 
)

Take in a buffer from the NetIn task.

OsStatus enableSsrcDiscard ( UtlBoolean  enable,
RtpSRC  ssrc 
)

Enable/disable discarding of given RTP stream.

Parameters
[in]enable- should given stream be discarded or not.
[in]ssrc- SSRC of the stream to discard. If enable is FALSE, then ssrc is ignored.
Note
Only one stream at a time can be discarded. This functionality is designed to discard looped local back packets.
Returns
Always OS_SUCCESS for now.
OsStatus setRtpDispatcher ( MprRtpDispatcher pRtpDispatcher)

Set RTP dispatcher instance.

Note
Must be called right after object construction!
OsStatus getRtcpStats ( MprRtcpStats stats)

retrieve the RR info needed to complete an RTCP packet

OsStatus setFlowGraph ( MpFlowGraphBase flowgraph)
OsStatus rtcpStats ( struct RtpHeader h)
private

Update the RR info for the current incoming packet.

UtlBoolean resetSocketsInternal ( OsEvent *  pEvent = NULL)
private

Unregister the inbound RTP and RTCP sockets.

Return values
TRUE- operation have been performed, caller can wait for pEvent to be signaled
FALSE- operation havn't been performed and pEvent will never be signaled.
MpRtpBufPtr parseRtpPacket ( const MpUdpBufPtr buf)
staticprivate

Parse UDP packet and return filled RTP packet buffer.

MprFromNet& operator= ( const MprFromNet rhs)
private

Assignment operator (not implemented for this class)

Member Data Documentation

OsMutex mDiscardCtlMutex
private
OsMutex mRegistrationSyncMutex
private
NetInTask* mNetInTask
private
UtlBoolean mRegistered
private
MprRtpDispatcher* mpRtpDispatcher
private
UtlBoolean mDiscardSelectedStream
private
RtpSRC mDiscardedSSRC
private
MpFlowGraphBase* mpFlowGraph
private
rtpHandle mInRtpHandle
private
int mRtcpCount
private
int mNumPushed
private

Total RTP+RTCP pkts received from NetIn.

int mNumPktsRtcp
private

Total RTCP packets received from NetIn.

int mNumPktsRtp
private

Total RTP packets received from NetIn.

int mNumEncDropped
private

Encoded RTP packets dropped due to no key.

int mNumLoopDropped
private

Looped-back mcast RTP packets dropped.