sipxmedialib  Version 3.3
Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
NetInTask Class Reference

Task that listen for packets in incoming RTP streams. More...

#include <NetInTask.h>

Inheritance diagram for NetInTask:
Inheritance graph
[legend]
Collaboration diagram for NetInTask:
Collaboration graph
[legend]

Static Public Attributes

static const int DEF_NET_IN_TASK_PRIORITY
 default task priority More...
 
static const int DEF_NET_IN_TASK_OPTIONS
 default task options More...
 
static const int DEF_NET_IN_TASK_STACKSIZE
 default task stacksize More...
 

Protected Member Functions

 NetInTask (int prio=DEF_NET_IN_TASK_PRIORITY, int options=DEF_NET_IN_TASK_OPTIONS, int stack=DEF_NET_IN_TASK_STACKSIZE)
 Default constructor. More...
 
OsRWMutex & getLockObj ()
 
OsStatus get1Msg (OsSocket *pRxpSkt, MprFromNet *fwdTo, bool isRtcp, int ostc)
 
int findPoisonFds (int pipeFD)
 

Static Protected Member Functions

static OsRWMutex & getStaticLockObj ()
 Return sLock object. More...
 

Protected Attributes

OsRWMutex sInstanceLock
 
OsConnectionSocket * mpWriteSocket
 
OsConnectionSocket * mpReadSocket
 
int mCmdPort
 internal socket port number More...
 
OsMutex mEventMutex
 
netInTaskMsg mFdPairs [NET_TASK_MAX_FD_PAIRS]
 
int mNumFdPairs
 
int mNumFlushed
 
int mFlushedLimit
 
bool mUseInstanceLock
 

Static Protected Attributes

static NetInTaskspInstance
 
static OsRWMutex sLock
 

Private Member Functions

 NetInTask (const NetInTask &rNetInTask)
 Copy constructor (not implemented for this task) More...
 
NetInTaskoperator= (const NetInTask &rhs)
 Assignment operator (not implemented for this task) More...
 

Creators

static NetInTaskgetNetInTask ()
 Return a pointer to the singleton NetIn task, creating it if necessary. More...
 
static NetInTaskcreateNetInTask ()
 Return a pointer to a newly created NetIn task. More...
 
OsStatus destroy ()
 Shutdown NetInTask instance and free it. More...
 
virtual ~NetInTask ()
 Destructor. More...
 

Manipulators

virtual int run (void *pArg)
 Task loop. More...
 
OsStatus addNetInputSources (OsSocket *pRtpSocket, OsSocket *pRtcpSocket, MprFromNet *fwdTo, OsNotification *note)
 
OsStatus removeNetInputSources (MprFromNet *fwdTo, OsNotification *note)
 

Detailed Description

Task that listen for packets in incoming RTP streams.

Constructor & Destructor Documentation

virtual ~NetInTask ( )
virtual

Destructor.

NetInTask ( int  prio = DEF_NET_IN_TASK_PRIORITY,
int  options = DEF_NET_IN_TASK_OPTIONS,
int  stack = DEF_NET_IN_TASK_STACKSIZE 
)
protected

Default constructor.

default task stack size

Parameters
priodefault task priority
optionsdefault task options
NetInTask ( const NetInTask rNetInTask)
private

Copy constructor (not implemented for this task)

Member Function Documentation

static NetInTask* getNetInTask ( )
static

Return a pointer to the singleton NetIn task, creating it if necessary.

static NetInTask* createNetInTask ( )
static

Return a pointer to a newly created NetIn task.

OsStatus destroy ( )

Shutdown NetInTask instance and free it.

virtual int run ( void *  pArg)
virtual

Task loop.

OsStatus addNetInputSources ( OsSocket *  pRtpSocket,
OsSocket *  pRtcpSocket,
MprFromNet fwdTo,
OsNotification *  note 
)
OsStatus removeNetInputSources ( MprFromNet fwdTo,
OsNotification *  note 
)
static OsRWMutex& getStaticLockObj ( )
inlinestaticprotected

Return sLock object.

OsRWMutex& getLockObj ( )
inlineprotected
OsStatus get1Msg ( OsSocket *  pRxpSkt,
MprFromNet fwdTo,
bool  isRtcp,
int  ostc 
)
protected
int findPoisonFds ( int  pipeFD)
protected
NetInTask& operator= ( const NetInTask rhs)
private

Assignment operator (not implemented for this task)

Member Data Documentation

const int DEF_NET_IN_TASK_PRIORITY
static

default task priority

const int DEF_NET_IN_TASK_OPTIONS
static

default task options

const int DEF_NET_IN_TASK_STACKSIZE
static

default task stacksize

NetInTask* spInstance
staticprotected

pointer to the single instance of the MpNetInTask class

OsRWMutex sLock
staticprotected

semaphore used to ensure that there is only one instance of this class

OsRWMutex sInstanceLock
protected

semaphore used when we are not using this class as a singleton

OsConnectionSocket* mpWriteSocket
protected
OsConnectionSocket* mpReadSocket
protected
int mCmdPort
protected

internal socket port number

OsMutex mEventMutex
protected
netInTaskMsg mFdPairs[NET_TASK_MAX_FD_PAIRS]
protected
int mNumFdPairs
protected
int mNumFlushed
protected
int mFlushedLimit
protected
bool mUseInstanceLock
protected