Module: sems Branch: master Commit: a16338012f35544c32e6746ee1d5f6ff1bba3fc9 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=a16338012f35544c32e6746ee1d5f6ff1bba3fc9
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Wed Nov 30 16:31:57 2011 +0100 b/f: reset RTP-received timestamp when (re)starting process RTP stream patch by Robert Szokovacs --- core/AmMediaProcessor.cpp | 1 + core/AmRtpStream.cpp | 4 ++++ core/AmRtpStream.h | 5 +++++ 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/core/AmMediaProcessor.cpp b/core/AmMediaProcessor.cpp index 1f1c2b7..28a8139 100644 --- a/core/AmMediaProcessor.cpp +++ b/core/AmMediaProcessor.cpp @@ -395,6 +395,7 @@ void AmMediaProcessorThread::process(AmEvent* e) case AmMediaProcessor::InsertSession: DBG("Session inserted to the scheduler\n"); sessions.insert(sr->s); + sr->s->RTPStream()->clearRTPTimeout(); break; case AmMediaProcessor::RemoveSession:{ diff --git a/core/AmRtpStream.cpp b/core/AmRtpStream.cpp index 8d6fd04..a29fb5c 100644 --- a/core/AmRtpStream.cpp +++ b/core/AmRtpStream.cpp @@ -781,6 +781,10 @@ void AmRtpStream::clearRTPTimeout(struct timeval* recv_time) { memcpy(&last_recv_time, recv_time, sizeof(struct timeval)); } +void AmRtpStream::clearRTPTimeout() { + gettimeofday(&last_recv_time,NULL); +} + unsigned int AmRtpStream::bytes2samples(unsigned int) const { ERROR("bytes2samples called on AmRtpStream\n"); return 0; diff --git a/core/AmRtpStream.h b/core/AmRtpStream.h index 5a7279b..1aef491 100644 --- a/core/AmRtpStream.h +++ b/core/AmRtpStream.h @@ -335,6 +335,11 @@ public: */ void clearRTPTimeout(struct timeval* recv_time); + /* + * clear RTP timeout to current time + */ + void clearRTPTimeout(); + virtual unsigned int bytes2samples(unsigned int) const; /** set relay stream for RTP relaying */ _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
