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 ...@@ -47,7 +47,7 @@ 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 = 8000; static const int schedulingTimeout = 10000;
static const int expireTimeout = 1000000; 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
......
...@@ -346,6 +346,8 @@ void AudioRtpSession::run () ...@@ -346,6 +346,8 @@ void AudioRtpSession::run ()
timeout = getSchedulingTimeout(); timeout = getSchedulingTimeout();
} }
setCancel (cancelDeferred);
// Send session // Send session
if (getEventQueueSize() > 0) { if (getEventQueueSize() > 0) {
sendDtmfEvent (getEventQueue()->front()); sendDtmfEvent (getEventQueue()->front());
...@@ -353,6 +355,8 @@ void AudioRtpSession::run () ...@@ -353,6 +355,8 @@ void AudioRtpSession::run ()
sendMicData (); sendMicData ();
} }
setCancel (cancelImmediate);
setCancel (cancelDeferred); setCancel (cancelDeferred);
controlReceptionService(); controlReceptionService();
controlTransmissionService(); controlTransmissionService();
...@@ -364,9 +368,6 @@ void AudioRtpSession::run () ...@@ -364,9 +368,6 @@ void AudioRtpSession::run ()
timeout = (timeout > maxWait) ? maxWait : timeout; timeout = (timeout > maxWait) ? maxWait : timeout;
if (timeout < 1000) { // !(timeout/1000) if (timeout < 1000) { // !(timeout/1000)
setCancel (cancelDeferred);
// dispatchDataPacket();
setCancel (cancelImmediate);
timerTick(); timerTick();
} else { } else {
if (isPendingData (timeout/1000)) { if (isPendingData (timeout/1000)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment