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
Branches
No related tags found
No related merge requests found
...@@ -47,8 +47,8 @@ namespace sfl ...@@ -47,8 +47,8 @@ namespace sfl
// Factor use to increase volume in fade in // Factor use to increase volume in fade in
#define FADEIN_STEP_SIZE 4; #define FADEIN_STEP_SIZE 4;
static const int schedulingTimeout = 1000000; static const int schedulingTimeout = 8000;
static const int expireTimeout = 10000000; 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 // 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 // (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) ...@@ -198,7 +198,8 @@ void AudioRtpSession::sendDtmfEvent (sfl::DtmfEvent *dtmf)
if (dtmf->newevent) if (dtmf->newevent)
setMark (true); 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 // This is no more a new event
if (dtmf->newevent) { if (dtmf->newevent) {
...@@ -253,7 +254,8 @@ void AudioRtpSession::sendMicData() ...@@ -253,7 +254,8 @@ void AudioRtpSession::sendMicData()
_timestamp += _timestampIncrement; _timestamp += _timestampIncrement;
// putData put the data on RTP queue, sendImmediate bypass this queue // 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 () ...@@ -375,9 +377,10 @@ void AudioRtpSession::run ()
// packets // packets
timeout = (timeout > maxWait) ? maxWait : timeout; timeout = (timeout > maxWait) ? maxWait : timeout;
if (timeout < 1000) { // !(timeout/1000) if (timeout < 1000) { // !(timeout/1000)
setCancel (cancelDeferred); setCancel (cancelDeferred);
dispatchDataPacket(); // dispatchDataPacket();
setCancel (cancelImmediate); setCancel (cancelImmediate);
timerTick(); timerTick();
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment