I went down this path before And all audio device implementations use threads, except Symbian. So you need provide you own audio device implementation as well. For example if you were working with an alsa device. Take look look at the alsa_dev.c you go to the function alsa_stream_start, you will see that it creates a thread for capture and a thread for playback Instead of doing this, you need to remove the thread creation and just call a function that you have to write, basically it would be the same as the thread functions but remove the while loop, and the application has to call it repeatedly to get samples from the audio device and to write samples to the audio device. Jose ________________________________________ From: pjsip [pjsip-bounces@xxxxxxxxxxxxxxx] on behalf of JOHAN LANTZ [johan at tid.es] Sent: Thursday, April 04, 2013 4:18 AM To: pjsip at lists.pjsip.org Subject: Re: Alternative solution for not using threads in PJSIP stack? I think this depends on your platform. For instance for media pjmedia should be able to work driven by the sound card. As for the worker thread, at least in pjsua level you normally configure to use 1 worker thread, you can check this code in pjusa. However just setting thread_cnt=0 will leave you without the working thread and you have to manage the polling of the sockets etc in another way. In Symbian pjsip does not use threads since there are ActiveObjects offering the same and we have also in the past used this approach on another embedded platform so it is fully possible but you have to provide the other way to process the events yourself and the best way to do this is probably very platform dependent. Maybe the Symbian example can be of some help. /Johan El 22/03/13 14:54, "pjsip-request at lists.pjsip.org" <pjsip-request at lists.pjsip.org> escribi?: >Send pjsip mailing list submissions to > pjsip at lists.pjsip.org > >To subscribe or unsubscribe via the World Wide Web, visit > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >or, via email, send a message with subject or body 'help' to > pjsip-request at lists.pjsip.org > >You can reach the person managing the list at > pjsip-owner at lists.pjsip.org > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of pjsip digest..." > > >Today's Topics: > > 1. Alternative solution for not using threads in PJSIP stack? > (remo disoza) > > >---------------------------------------------------------------------- > >Message: 1 >Date: Fri, 22 Mar 2013 19:24:33 +0530 >From: remo disoza <mailforthis@xxxxxxxxx> >To: pjsip at lists.pjsip.org >Subject: Alternative solution for not using threads in PJSIP > stack? >Message-ID: > <CABFbZR+EoXY3bsi_Db_sqWN7kF5hp2Vh8ZXBkguMTkjR07vDRA at mail.gmail.com> >Content-Type: text/plain; charset="iso-8859-1" > >Hi All, > >I am trying to disable threads in the pjsip stack, as i read in the >documentation as "PJ software works with or without threads, as the >libraries do not create any threads on their own". >Please provide some information on how to use the pjsip stack without >using >threads. > >Thanks in Advance, >Disoza >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: ><http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/201303 >22/f9de4c72/attachment.html> > >------------------------------ > >Subject: Digest Footer > >_______________________________________________ >pjsip mailing list >pjsip at lists.pjsip.org >http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > >------------------------------ > >End of pjsip Digest, Vol 67, Issue 174 >************************************** ________________________________ Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra pol?tica de env?o y recepci?n de correo electr?nico en el enlace situado m?s abajo. This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at: http://www.tid.es/ES/PAGINAS/disclaimer.aspx _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip at lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org