126 while ( i != sessions.end() ) {
128 if (!(*i)->isCleared()) {
142 for (
PoolIterator j = sessions.begin(); j != sessions.end (); j++) {
143 if (!(*j)->isCleared()) {
157 i = sessions.begin();
158 while ( (i != sessions.end()) ) {
160 if (!(*i)->isCleared()) {
170 if (packetTimeout < 1000) {
178 packetTimeout = (packetTimeout > maxWait)? maxWait : packetTimeout;
179 if ( packetTimeout < 1000 ) {
194 if ((*i)->isCleared()) {
216 #if defined(_MSC_VER) && _MSC_VER >= 1300
218 const InetHostAddress& ia, tpport_t dataPort, tpport_t controlPort,
int pri,
221 (ia,dataPort,controlPort,memberssize,app)
225 const InetMcastAddress& ia, tpport_t dataPort, tpport_t controlPort,
int pri,
228 (ia,dataPort,controlPort,memberssize,app,iface)
248 while ( ServiceQueue::isActive() ) {
249 if ( timeout < 1000 ){
250 timeout = getSchedulingTimeout();
252 controlReceptionService();
253 controlTransmissionService();
259 timeout = (timeout > maxWait)? maxWait : timeout;
260 if ( timeout < 1000 ) {
261 dispatchDataPacket();
264 if ( isPendingData(timeout/1000) ) {
270 dispatchBYE(
"GNU ccRTP stack finishing.");
277 SingleThreadRTPSessionIPV6<DualRTPUDPIPv6Channel,DualRTPUDPIPv6Channel,AVPQueue>::SingleThreadRTPSessionIPV6<DualRTPUDPIPv6Channel,DualRTPUDPIPv6Channel,
AVPQueue>(
278 const IPV6Host& ia, tpport_t dataPort, tpport_t controlPort,
int pri,
280 Thread(pri), TRTPSessionBaseIPV6<RTPDataChannel,RTCPChannel,ServiceQueue>
281 (ia,dataPort,controlPort,memberssize,app)
284 SingleThreadRTPSessionIPV6<DualRTPUDPIPv6Channel,DualRTPUDPIPv6Channel,AVPQueue>::SingleThreadRTPSessionIPV6<DualRTPUDPIPv6Channel,DualRTPUDPIPv6Channel,
AVPQueue>(
285 const IPV6Multicast& ia, tpport_t dataPort, tpport_t controlPort,
int pri,
287 Thread(pri), TRTPSessionBaseIPV6<RTPDataChannel,RTCPChannel,ServiceQueue>
288 (ia,dataPort,controlPort,memberssize,app,iface)
291 void SingleThreadRTPSessionIPV6<DualRTPUDPIPv6Channel,DualRTPUDPIPv6Channel,AVPQueue>::startRunning()
297 bool SingleThreadRTPSessionIPV6<DualRTPUDPIPv6Channel,DualRTPUDPIPv6Channel,AVPQueue>::isPendingData(
microtimeout_t timeout)
299 return TRTPSessionBaseIPV6<RTPDataChannel,RTCPChannel,ServiceQueue>::isPendingData(timeout);
302 void SingleThreadRTPSessionIPV6<DualRTPUDPIPv6Channel,DualRTPUDPIPv6Channel,AVPQueue>::timerTick(
void)
305 void SingleThreadRTPSessionIPV6<DualRTPUDPIPv6Channel,DualRTPUDPIPv6Channel,AVPQueue>::run(
void)
308 while ( ServiceQueue::isActive() ) {
309 if ( timeout < 1000 ){
310 timeout = getSchedulingTimeout();
312 controlReceptionService();
313 controlTransmissionService();
319 timeout = (timeout > maxWait)? maxWait : timeout;
320 if ( timeout < 1000 ) {
321 dispatchDataPacket();
324 if ( isPendingData(timeout/1000) ) {
330 dispatchBYE(
"GNU ccRTP stack finishing.");
std::list< SessionListElement * >::iterator PoolIterator
std::list< SessionListElement * > sessionList
size_t dispatchDataPacket(RTPSessionBase &s)
void controlTransmissionService(RTPSessionBase &s)
An RTP application, holding identifying RTCP SDES item values.
DualRTPChannel< RTPBaseUDPIPv4Socket > DualRTPUDPIPv4Channel
virtual void timerTick(void)
uint32 microtimeout_t
Time interval expressed in microseconds.
void run()
Runnable method for the thread.
Generic RTP protocol stack for exchange of realtime data.
microtimeout_t timeval2microtimeout(const timeval &t)
Convert a time interval, expressed as a timeval value into a microseconds counter.
SOCKET getDataRecvSocket(RTPSessionBase &s) const
Declaration of ccRTP internal stuff.
virtual bool isPendingData(microtimeout_t timeout)
size_t takeInDataPacket(RTPSessionBase &s)
std equality for SessionListElement objects.
timeval getRTCPCheckInterval(RTPSessionBase &s)
void startRunning()
Activate stack and start service thread.
bool isPendingData(microtimeout_t timeout)
virtual void run(void)
Single runnable method for this RTP stacks, schedules outgoing and incoming RTP data and RTCP packets...
Class for tracking session status.
bool removeSession(RTPSessionBase &session)
microtimeout_t getSchedulingTimeout(RTPSessionBase &s)
void controlReceptionService(RTPSessionBase &s)
This template class adds the threading aspect to the RTPSessionBase template in one of the many possi...
bool addSession(RTPSessionBase &session)
size_t getPoolLength() const
void setPoolTimeout(int sec, int usec)
This class, an RTP/RTCP queue, adds audio/video profile (AVP) specific methods to the generic RTCP se...