Skip to content
Snippets Groups Projects
Commit 5719f70d authored by Alexandre Savard's avatar Alexandre Savard
Browse files

#4702: Send RTP packets immediately, no need of outgoing queue

parent 1da66e55
No related branches found
No related tags found
No related merge requests found
......@@ -47,8 +47,8 @@ namespace sfl
// Factor use to increase volume in fade in
#define FADEIN_STEP_SIZE 4;
static const int schedulingTimeout = 1000000;
static const int expireTimeout = 10000000;
static const int schedulingTimeout = 8000;
static const int expireTimeout = 1000000;
// G.722 VoIP is typically carried in RTP payload type 9.[2] Note that IANA records the clock rate for type 9 G.722 as 8 kHz
// (instead of 16 kHz), RFC3551[3] clarifies that this is due to a historical error and is retained in order to maintain backward
......
......@@ -198,7 +198,8 @@ void AudioRtpSession::sendDtmfEvent (sfl::DtmfEvent *dtmf)
if (dtmf->newevent)
setMark (true);
putData (_timestamp, (const unsigned char*) (& (dtmf->payload)), sizeof (ost::RTPPacket::RFC2833Payload));
// putData (_timestamp, (const unsigned char*) (& (dtmf->payload)), sizeof (ost::RTPPacket::RFC2833Payload));
sendImmediate (_timestamp, (const unsigned char*) (& (dtmf->payload)), sizeof (ost::RTPPacket::RFC2833Payload));
// This is no more a new event
if (dtmf->newevent) {
......@@ -253,7 +254,8 @@ void AudioRtpSession::sendMicData()
_timestamp += _timestampIncrement;
// putData put the data on RTP queue, sendImmediate bypass this queue
putData (_timestamp, getMicDataEncoded(), compSize);
// putData (_timestamp, getMicDataEncoded(), compSize);
sendImmediate (_timestamp, getMicDataEncoded(), compSize);
}
......@@ -375,9 +377,10 @@ void AudioRtpSession::run ()
// packets
timeout = (timeout > maxWait) ? maxWait : timeout;
if (timeout < 1000) { // !(timeout/1000)
setCancel (cancelDeferred);
dispatchDataPacket();
// dispatchDataPacket();
setCancel (cancelImmediate);
timerTick();
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment