16 #ifndef _INCLUDED_NETINTASK_H 17 #define _INCLUDED_NETINTASK_H 24 #include "os/OsTask.h" 25 #include "os/OsLock.h" 26 #include "os/OsSocket.h" 27 #include "os/OsRWMutex.h" 28 #include "os/OsMutex.h" 34 #define IP_HEADER_SIZE 20 35 #define UDP_HEADER_SIZE 8 36 #define ETHERNET_MTU 1500 37 #define UDP_MTU (ETHERNET_MTU - IP_HEADER_SIZE - UDP_HEADER_SIZE) 38 #define RTP_MTU (UDP_MTU-12) 40 #define RTCP_MTU (UDP_MTU-12) 50 #define NET_TASK_MAX_MSG_LEN sizeof(netInTaskMsg) 51 #define NET_TASK_MAX_FD_PAIRS 300 55 class OsConnectionSocket;
142 virtual int run(
void* pArg);
144 OsStatus addNetInputSources(OsSocket* pRtpSocket,
145 OsSocket* pRtcpSocket,
147 OsNotification* note);
149 OsStatus removeNetInputSources(
MprFromNet* fwdTo, OsNotification* note);
170 static OsRWMutex sLock;
191 int prio = DEF_NET_IN_TASK_PRIORITY,
192 int options = DEF_NET_IN_TASK_OPTIONS,
193 int stack = DEF_NET_IN_TASK_STACKSIZE);
197 OsRWMutex&
getLockObj() {
if (mUseInstanceLock)
return sInstanceLock;
else return sLock; }
199 OsStatus get1Msg(OsSocket* pRxpSkt,
MprFromNet* fwdTo,
bool isRtcp,
int ostc);
200 int findPoisonFds(
int pipeFD);
Definition: NetInTask.h:62
uint8_t vpxcc
Usually: ((2<<6) | (0<<5) | (0<<4) | 0)
Definition: NetInTask.h:63
int mNumFdPairs
Definition: NetInTask.h:183
uint16_t highSeqNum
Definition: NetInTask.h:88
rtpHandle StartRtpSession(OsSocket *socket, int direction, char type)
OsNotification * notify
Definition: NetInTask.h:79
uint16_t cycles
Definition: NetInTask.h:72
struct rtpSession * rtpHandle
Definition: NetInTask.h:97
#define NET_TASK_MAX_FD_PAIRS
Definition: NetInTask.h:51
static const int DEF_NET_IN_TASK_PRIORITY
default task priority
Definition: NetInTask.h:115
static const int DEF_NET_IN_TASK_STACKSIZE
default task stacksize
Definition: NetInTask.h:117
int mFlushedLimit
Definition: NetInTask.h:186
int mNumFlushed
Definition: NetInTask.h:185
RtpSeq seq
Definition: NetInTask.h:65
RtpTimestamp timestamp
Definition: NetInTask.h:66
RtpSRC ssrc
Definition: NetInTask.h:67
OsSocket * pRtpSocket
Definition: NetInTask.h:76
OsMutex mEventMutex
Definition: NetInTask.h:180
Definition: NetInTask.h:85
MprFromNet * fwdTo
Definition: NetInTask.h:78
static OsRWMutex & getStaticLockObj()
Return sLock object.
Definition: NetInTask.h:196
int fdRtcp
Definition: NetInTask.h:81
OsConnectionSocket * mpWriteSocket
Definition: NetInTask.h:177
OsSocket * socket
Definition: NetInTask.h:68
uint32_t RtpTimestamp
RTP timestamp.
Definition: MpTypes.h:60
uint32_t octets
Definition: NetInTask.h:71
Task that listen for packets in incoming RTP streams.
Definition: NetInTask.h:109
Definition: NetInTask.h:75
OsRWMutex & getLockObj()
Definition: NetInTask.h:197
OsConnectionSocket * mpReadSocket
Definition: NetInTask.h:178
uint16_t RtpSeq
RTP sequence number.
Definition: MpTypes.h:59
static NetInTask * spInstance
Definition: NetInTask.h:169
int mCmdPort
internal socket port number
Definition: NetInTask.h:179
bool mUseInstanceLock
Definition: NetInTask.h:187
struct __MprRtcpStats * MprRtcpStatsPtr
Definition: NetInTask.h:94
OsRWMutex sInstanceLock
Definition: NetInTask.h:174
The "From Network" media processing resource.
Definition: MprFromNet.h:55
short seqNumCycles
Definition: NetInTask.h:87
OsSocket * pRtcpSocket
Definition: NetInTask.h:77
static const int DEF_NET_IN_TASK_OPTIONS
default task options
Definition: NetInTask.h:116
uint32_t RtpSRC
RTP SSRC or CSRC identifier.
Definition: MpTypes.h:61
int dir
Definition: NetInTask.h:69
RtpSRC ssrc
Definition: NetInTask.h:86
int fdRtp
Definition: NetInTask.h:80
uint8_t mpt
Usually: ((0<<7) | 0)
Definition: NetInTask.h:64
uint32_t packets
Definition: NetInTask.h:70
void FinishRtpSession(rtpHandle h)