[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: Ghislain MARY
Subject: Re: [Linphone-developers] Ortp:session_set_select() is not waiting on events
Date: Thu, 12 Jun 2014 13:53:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0


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

reply via email to

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