Module: sems Branch: 1.4 Commit: 44889f80bb840e90308af40a94d2cae995ff4400 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=44889f80bb840e90308af40a94d2cae995ff4400
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 a52129b..b881d81 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 651d19f..bb2b0a4 100644 --- a/core/AmRtpStream.cpp +++ b/core/AmRtpStream.cpp @@ -678,6 +678,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 497a621..7e839e5 100644 --- a/core/AmRtpStream.h +++ b/core/AmRtpStream.h @@ -308,6 +308,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
