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

[#4874] Add setCancel immediate/deffered for ost::Thread

parent faa6bb37
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ namespace sfl
// Factor use to increase volume in fade in
#define FADEIN_STEP_SIZE 4;
static const int schedulingTimeout = 8000;
static const int schedulingTimeout = 10000;
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
......
......@@ -346,6 +346,8 @@ void AudioRtpSession::run ()
timeout = getSchedulingTimeout();
}
setCancel (cancelDeferred);
// Send session
if (getEventQueueSize() > 0) {
sendDtmfEvent (getEventQueue()->front());
......@@ -353,6 +355,8 @@ void AudioRtpSession::run ()
sendMicData ();
}
setCancel (cancelImmediate);
setCancel (cancelDeferred);
controlReceptionService();
controlTransmissionService();
......@@ -364,9 +368,6 @@ void AudioRtpSession::run ()
timeout = (timeout > maxWait) ? maxWait : timeout;
if (timeout < 1000) { // !(timeout/1000)
setCancel (cancelDeferred);
// dispatchDataPacket();
setCancel (cancelImmediate);
timerTick();
} else {
if (isPendingData (timeout/1000)) {
......
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