If there are no sessions then it makes no senes to process ticks in real
time. Sleep up to 0.5 seconds in that case. When sessions are added we
are immediately woken up through the conditional variable. Only setting
the shutdown flag would not wake up the thread, but a sleep time of half
a second should be an acceptable delay for shutdowns.
Change-Id: I5aa43382248754ff8dec811038998cf636579734
Calculate how many ticks have passed since we were last awake, and
advance next_tick based on the actual time, but in multiples of tick.
Change-Id: I50f9804b1002780fc55358f00ff41d3a73ab854e
Go to sleep even if the sleep time is less than 2 ms. This makes the
math a lot easier and shouldn't have a noticeable impact as this is
a somewhat unnecessary attempt at optimization.
Change-Id: Ibd97c216e529b4e0b2110f81200b649db6ff2764
replace AmSession::rtp_str with AmSession::RTPStream() in your app.
for example for pure signaling B2B calls, no RTP stream instance is
created, which saves a lot of memory (especially because of
the RTP receive buffer)
ref r30371 r30372
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1784 8eb893ce-cfd4-0310-b710-fb5ebe64c474
- active sessions and other event receivers
get a SystemEvent::ServerShutdown,
default behaviour of AmSession is setStopped()
- session container waits for all sessions to be ended
- signaling server, rtp receiver, media processor, event dispatcher
are stopped and deleted
based on a patch by Rui Jin Zheng rjzheng at boronetworks dot com
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1087 8eb893ce-cfd4-0310-b710-fb5ebe64c474
- on RTP timeout, AmSession::onRtpTimeout is called
- session can be removed from media processor (detached)
by AmMediaProcessor::removeSession
- removing session from MediaProcessor and clearing audio
is AmMediaProcessor::clearSession (default action on
RTP error)
- added detach from media processor to conf_auth and ann_b2b
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@209 8eb893ce-cfd4-0310-b710-fb5ebe64c474