[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Ortp:session_set_select() is not waiting on ev

From: pavan kumar
Subject: Re: [Linphone-developers] Ortp:session_set_select() is not waiting on events
Date: Fri, 13 Jun 2014 16:45:26 +0800 (SGT)

Hi Ghislain,

Thanks for the reply .
I am working with 2 rtp sessions in a set for receiving data in 2 different Ports .
I have tried setting blocking mode to 1 in rtp_session_set_blocking_mode(recv_session, 1) but the result is not as expected.
i.e After runing the app .Initially when data is not sent from other end,I am surprised to see session_set_select is returning value 2  which  is not correct ,because session_set_select should return only when there is activity on this 2 session descriptors and after that session_set_select() is blocked and I couldn't see it moving past the session_set_select function even when i send data from other end.

Also as per doc "  rtp_session_set_blocking_mode() defines the behaviour of rtp_session_recv_with_ts() and rtp_session_send_with_ts() functions ...." I guess will this API have any functional impact on session_set_select() ?.Please confirm and suggest.


From: Ghislain MARY <address@hidden>
To: address@hidden
Sent: Thursday, 12 June 2014 5:23 PM
Subject: Re: [Linphone-developers] Ortp:session_set_select() is not waiting on events


You are setting the rtp session as non-blocking with "rtp_session_set_blocking_mode(recv_session, 0);", so don't expect the select to block later on.
Remove this line, and I think that it will work as you expect it to work.


On 12/06/2014 11:48, pavan kumar wrote:
I am using ortp lib for an application.
Issue:when I try to receive a voice stream using session_set_select()  function I don't see calling applicatio being suspended or blocked at that point instead program counter moves on.I am assuming  select func suspends until some events arrive on one of the three sets passed in argument. 
I wanted to use "select set" because I am using 2 different rtp sessions in the same thread and wanted to wait on activity. 

I have done the initialization as shown below:

   recv_session_set = session_set_new(); 
   recv_session = rtp_session_new(RTP_SESSION_ RECVONLY);
   rtp_session_set_scheduling_ mode(recv_session, 1);
   rtp_session_set_blocking_ mode(recv_session, 0);

and the looping code is shown below:

         session_set_set(recv_session_ set, recv_session);
         ret=session_set_select(recv_ session_set,NULL,NULL);    <---------Expecting to get suspended here
         if (session_set_is_set(recv_ session_set,recv_session))
            mb = rtp_session_recvm_with_ts( recv_session, time_stamp);

      while (true);

Am I missing something here.
Thanks for the support in advance.


Linphone-developers mailing list

Linphone-developers mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]