43#ifndef CCXX_RTP_POOL_H
44#define CCXX_RTP_POOL_H
107 : elem(e), cleared(false) {
175 {
return poolActive; }
179 { poolActive =
true; }
182 {
return poolTimeout; }
185 { poolTimeout.tv_sec = sec; poolTimeout.tv_usec = usec; }
188 { poolTimeout = to; }
202 mutable bool poolActive;
223 { setActive(); Thread::start(); }
uint32 microtimeout_t
Time interval expressed in microseconds.
Definition base.h:68
virtual size_t takeInDataPacket()
This function is used by the service thread to process the next incoming packet and place it in the r...
microtimeout_t getSchedulingTimeout()
This computes the timeout period for scheduling transmission of the next packet at the "head" of the ...
size_t dispatchDataPacket()
This function is used by the service thread to process the next outgoing packet pending in the sendin...
std equality for SessionListElement objects.
Definition pool.h:130
RTPSessionBase * elem
Definition pool.h:132
PredEquals(RTPSessionBase *e)
Definition pool.h:134
bool operator()(SessionListElement *e)
Definition pool.h:136
void controlReceptionService()
Process incoming RTCP packets pending in the control reception socket.
void controlTransmissionService()
Build and send RTCP packets following timing rules (including the "timer reconsideration" algorithm).
timeval getRTCPCheckInterval()
Definition cqueue.h:363
void controlReceptionService(RTPSessionBase &s)
Definition pool.h:72
void controlTransmissionService(RTPSessionBase &s)
Definition pool.h:76
size_t dispatchDataPacket(RTPSessionBase &s)
Definition pool.h:68
timeval getRTCPCheckInterval(RTPSessionBase &s)
Definition pool.h:60
microtimeout_t getSchedulingTimeout(RTPSessionBase &s)
Definition pool.h:57
SOCKET getDataRecvSocket(RTPSessionBase &s) const
Definition pool.h:79
size_t takeInDataPacket(RTPSessionBase &s)
Definition pool.h:64
SOCKET getControlRecvSocket(RTPSessionBase &s) const
Definition pool.h:82
This class is a base class for classes that define a group of RTP sessions that will be served by one...
Definition pool.h:156
virtual void startRunning()=0
size_t getPoolLength() const
std::list< SessionListElement * >::iterator PoolIterator
Definition pool.h:191
timeval getPoolTimeout()
Definition pool.h:181
virtual ~RTPSessionPool()
Definition pool.h:160
bool removeSession(RTPSessionBase &session)
SOCKET highestSocket
Definition pool.h:197
bool addSession(RTPSessionBase &session)
bool isActive()
Definition pool.h:174
void setPoolTimeout(int sec, int usec)
Definition pool.h:184
std::list< SessionListElement * > sessionList
Definition pool.h:190
void setActive()
Definition pool.h:178
ThreadLock poolLock
Definition pool.h:193
void setPoolTimeout(struct timeval to)
Definition pool.h:187
fd_set recvSocketSet
Definition pool.h:196
Class for tracking session status.
Definition pool.h:93
SessionListElement(RTPSessionBase *e)
Definition pool.h:106
RTPSessionBase * get()
Definition pool.h:120
void clear()
Definition pool.h:110
bool isCleared()
Definition pool.h:116
void run()
Runnable method for the thread.
~SingleRTPSessionPool()
Definition pool.h:219
SingleRTPSessionPool(int pri=0)
Definition pool.h:214
void startRunning()
Definition pool.h:222
SOCKET getDataRecvSocket() const
Definition rtp.h:236
SOCKET getControlRecvSocket() const
Definition rtp.h:278
TRTPSessionBase RTPSessionBase
Definition pool.h:52
Generic and audio/video profile specific RTP interface of ccRTP.