On 19.05.10 12:46, Самусенко Андрей wrote:
I want to receive dtmfs.
Where i can set the buffering?
Index: core/AmRtpAudio.cpp
===================================================================
--- core/AmRtpAudio.cpp (revision 1772)
+++ core/AmRtpAudio.cpp (working copy)
@@ -34,7 +34,7 @@
AmRtpAudio::AmRtpAudio(AmSession* _s)
: AmRtpStream(_s), AmAudio(0),
/*last_ts_i(false),*/ use_default_plc(true),
- send_only(false), playout_buffer(new AmPlayoutBuffer(this)),
+ send_only(false), playout_buffer(new AmAdaptivePlayout(this)),
last_check(0),last_check_i(false),send_int(false)
has no effect.
I have some questions:
1. Why
inline bool ts_less::operator()(const unsigned int& l,
const unsigned int& r) const
{
return (l - r > (unsigned int)(1<<31));
}
instead "l > r"?
2. recv_offset, rtp_ts, ref_ts is unsigned.
recv_offset = rtp_ts - ref_ts;
It's ok? Timestamp of SJphone's first RTP packet is equal 0.
1. and 2. are related: as the RTP timestamp can overflow pretty fast, we
use only unsigned, and use "most likely comparision".
This means that if for example 'l=2' and 'r=(2^32)-3', then we consider
l to be greater than r, because l-r (4?) is much lower than r-l.
Understanding this, it is perfectly safe to have ANY timestamp used, as
long as it does jump by more 2^31 at once (most improbable due to RTP
requirements).
The reason why (l - r > (1<<31)) does implement the behavior bescribed
previsouly is left as an exercise to the reader ;-)
-Raphael.
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev