StreamUtil test

C
cingusoft
Wed, Apr 9, 2008 1:29 PM

Hi guys

I'm pjsip newbie, i have tested this fabulous library with StreamUtil.c
example an all work very well.

My question is

The wav file is repited on infinite, have a looping or simillary

How can stop this loop, for example after two loops

Sorry for my poor English

Bye

Hi guys I'm pjsip newbie, i have tested this fabulous library with StreamUtil.c example an all work very well. My question is The wav file is repited on infinite, have a looping or simillary How can stop this loop, for example after two loops Sorry for my poor English Bye
NI
Nanang Izzuddin
Wed, Apr 9, 2008 3:03 PM

You need to modify the code as below:

  • To make it play just once (no loop), you can simply modify the
    'flags' parameter of pjmedia_wav_player_port_create() from 0 to
    PJMEDIA_FILE_NO_LOOP

  • To limit the loop once or more, you should provide a callback
    function (see pjmedia_wav_player_set_eof_cb()). Every time EOF
    condition reached, the callback function will get called. Do counting
    inside it, once the desired loop count reached, return non-PJ_SUCCESS
    from the callback.

See pjmedia doc for detail.

If you want the app quit after playing finished, you will have to
manage to quit from streamutil app.

Cheers,
nanang

On 09/04/2008, cingusoft cingusoft@gmail.com wrote:

Hi guys

I'm pjsip newbie, i have tested this fabulous library with StreamUtil.c
example an all work very well.

My question is

The wav file is repited on infinite, have a looping or simillary

How can stop this loop, for example after two loops

Sorry for my poor English

Bye


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

You need to modify the code as below: - To make it play just once (no loop), you can simply modify the 'flags' parameter of pjmedia_wav_player_port_create() from 0 to PJMEDIA_FILE_NO_LOOP - To limit the loop once or more, you should provide a callback function (see pjmedia_wav_player_set_eof_cb()). Every time EOF condition reached, the callback function will get called. Do counting inside it, once the desired loop count reached, return non-PJ_SUCCESS from the callback. See pjmedia doc for detail. If you want the app quit after playing finished, you will have to manage to quit from streamutil app. Cheers, nanang On 09/04/2008, cingusoft <cingusoft@gmail.com> wrote: > > > > > Hi guys > > I'm pjsip newbie, i have tested this fabulous library with StreamUtil.c > example an all work very well. > > My question is > > The wav file is repited on infinite, have a looping or simillary > > How can stop this loop, for example after two loops > > > > Sorry for my poor English > > > > Bye > > > > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >
RK
Roland Klabunde
Wed, Apr 9, 2008 6:01 PM

Is that available somewhere?

Regards

Is that available somewhere? Regards
RK
Roland Klabunde
Wed, Apr 9, 2008 6:35 PM

Question to sasacoh:

Would it be possible to compile pjsipDll against the WinCE libraries? Would
like to use your managed wrapper for .net CF.

Regards

Question to sasacoh: Would it be possible to compile pjsipDll against the WinCE libraries? Would like to use your managed wrapper for .net CF. Regards
SC
Sasa Coh
Wed, Apr 9, 2008 8:58 PM

Hi Roland,

pjsipDll project is just another kind of pjsua. I suggest you to follow
pjsip instructions for WinCE compilation. I didn't try it by myself, but I
remember at least one post where someone managed to build pjsipDll for
WinCE.

FYI: for more details on pjsip .Net projects visit
http://code.google.com/p/sipek2/ or http://code.google.com/p/sipeksdk

Regards,
Sasa

On Wed, Apr 9, 2008 at 8:35 PM, Roland Klabunde roland.klabunde@freenet.de
wrote:

Question to sasacoh:

Would it be possible to compile pjsipDll against the WinCE libraries?
Would
like to use your managed wrapper for .net CF.

Regards


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi Roland, pjsipDll project is just another kind of pjsua. I suggest you to follow pjsip instructions for WinCE compilation. I didn't try it by myself, but I remember at least one post where someone managed to build pjsipDll for WinCE. FYI: for more details on pjsip .Net projects visit http://code.google.com/p/sipek2/ or http://code.google.com/p/sipeksdk Regards, Sasa On Wed, Apr 9, 2008 at 8:35 PM, Roland Klabunde <roland.klabunde@freenet.de> wrote: > Question to sasacoh: > > Would it be possible to compile pjsipDll against the WinCE libraries? > Would > like to use your managed wrapper for .net CF. > > Regards > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
RK
Roland Klabunde
Thu, Apr 10, 2008 12:17 AM

But your pjsipDLL project: Wouldn't that haved to be changed in order to wrap the CE dlls/libs now instead of the PCs?

Regards

----- Original Message -----
From: Sasa Coh
To: pjsip list
Sent: Wednesday, April 09, 2008 10:58 PM
Subject: Re: [pjsip] To SasaCoh: Question concering Sipek for WM

Hi Roland,

pjsipDll project is just another kind of pjsua. I suggest you to follow pjsip instructions for WinCE compilation. I didn't try it by myself, but I remember at least one post where someone managed to build pjsipDll for WinCE.

FYI: for more details on pjsip .Net projects visit http://code.google.com/p/sipek2/ or http://code.google.com/p/sipeksdk

Regards,
Sasa

On Wed, Apr 9, 2008 at 8:35 PM, Roland Klabunde roland.klabunde@freenet.de wrote:

Question to sasacoh:

Would it be possible to compile pjsipDll against the WinCE libraries? Would
like to use your managed wrapper for .net CF.

Regards


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

But your pjsipDLL project: Wouldn't that haved to be changed in order to wrap the CE dlls/libs now instead of the PCs? Regards ----- Original Message ----- From: Sasa Coh To: pjsip list Sent: Wednesday, April 09, 2008 10:58 PM Subject: Re: [pjsip] To SasaCoh: Question concering Sipek for WM Hi Roland, pjsipDll project is just another kind of pjsua. I suggest you to follow pjsip instructions for WinCE compilation. I didn't try it by myself, but I remember at least one post where someone managed to build pjsipDll for WinCE. FYI: for more details on pjsip .Net projects visit http://code.google.com/p/sipek2/ or http://code.google.com/p/sipeksdk Regards, Sasa On Wed, Apr 9, 2008 at 8:35 PM, Roland Klabunde <roland.klabunde@freenet.de> wrote: Question to sasacoh: Would it be possible to compile pjsipDll against the WinCE libraries? Would like to use your managed wrapper for .net CF. Regards _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org ------------------------------------------------------------------------------ _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
OD
Olivier DERVYN
Thu, Apr 10, 2008 12:19 AM

Bonjour.
Je suis absent jusqu'au 11avril 2008 inclus.
Pendant cette période, merci de contacter
joseph.faure@teamlog.com si nécessaire.


Hello.
I'm on leave until April 11 included.
For this period, please contact joseph.faure@teamlog.com

Cordialement/Regards,
Olivier DERVYN

Bonjour. Je suis absent jusqu'au 11avril 2008 inclus. Pendant cette période, merci de contacter joseph.faure@teamlog.com si nécessaire. _________ Hello. I'm on leave until April 11 included. For this period, please contact joseph.faure@teamlog.com Cordialement/Regards, Olivier DERVYN
BP
Benny Prijono
Thu, Apr 10, 2008 9:23 AM

On Wed, Apr 9, 2008 at 7:01 PM, Roland Klabunde
roland.klabunde@freenet.de wrote:

Is that available somewhere?

Not in our svn repository I'm afraid. But assuming you have Python SDK
ported to WM, wouldn't you just need to create a WM project for
py_pjsua and things should "just work"?

Cheers
Beny

On Wed, Apr 9, 2008 at 7:01 PM, Roland Klabunde <roland.klabunde@freenet.de> wrote: > Is that available somewhere? > Not in our svn repository I'm afraid. But assuming you have Python SDK ported to WM, wouldn't you just need to create a WM project for py_pjsua and things should "just work"? Cheers Beny
DB
Danny Brown
Thu, Apr 10, 2008 1:23 PM

So, now you put py_pjsua_app on your machine. You will see it fault
out on url = sys.stdin.readline() line 589. Thats because in all
likely hood the stdin.readline() does not work since winCE has no
console mode. So, I attempted to redirect standard input , output to a
TKinter entry widget and text widget. That actually worked for the
main thread, but once I had the client successfully register with my
asterisk server, it just hung. Dont really know why.

So, I moved on to another solution. For me, all of my calls are
originated from the asterisk server anyway, so I really did not need
the input loop app_menu() line 574.  So my app basically overrides a
few things in py_pjsua_app to accommodate limitations on the CE python
port (for example i have my own add_account, app_init,
on_incoming_call that I point the original pjsua_app.

My app_init does this, ua_cfg.cb.on_incoming_call =
pjsua_app_client_on_incoming_call (this is my on_incoming). So
basically I was able to keep all the functionality of the pjsua_app.py
in tact, and just import it and redirect stuff.

A true TKinter app could be produced if someone could figure out why
the app freezes once the client has successfully registered. I
actually needed to create my own windprocedure for the TKinter app i
created anyway, so I did not bother to investigate why everything
hung. I basically am using the TKinter so I can get into the message
loop but really am not doing anything graphically.

I am really very new to python and Tkinter so, I probably am not the
best guy to spearhead anything along this line. I will be glad to help
if I can. I can tell you two things, "Python Rocks!" and pjsip is
"Awesome!"

So, now you put py_pjsua_app on your machine. You will see it fault out on url = sys.stdin.readline() line 589. Thats because in all likely hood the stdin.readline() does not work since winCE has no console mode. So, I attempted to redirect standard input , output to a TKinter entry widget and text widget. That actually worked for the main thread, but once I had the client successfully register with my asterisk server, it just hung. Dont really know why. So, I moved on to another solution. For me, all of my calls are originated from the asterisk server anyway, so I really did not need the input loop app_menu() line 574. So my app basically overrides a few things in py_pjsua_app to accommodate limitations on the CE python port (for example i have my own add_account, app_init, on_incoming_call that I point the original pjsua_app. My app_init does this, ua_cfg.cb.on_incoming_call = pjsua_app_client_on_incoming_call (this is my on_incoming). So basically I was able to keep all the functionality of the pjsua_app.py in tact, and just import it and redirect stuff. A true TKinter app could be produced if someone could figure out why the app freezes once the client has successfully registered. I actually needed to create my own windprocedure for the TKinter app i created anyway, so I did not bother to investigate why everything hung. I basically am using the TKinter so I can get into the message loop but really am not doing anything graphically. I am really very new to python and Tkinter so, I probably am not the best guy to spearhead anything along this line. I will be glad to help if I can. I can tell you two things, "Python Rocks!" and pjsip is "Awesome!"
DB
Danny Brown
Thu, Apr 10, 2008 1:42 PM

here is the python port I used.
http://pythonce.sourceforge.net/
and the Tkinter instructions are here
http://pythonce.sourceforge.net/Wikka/Tkinter.
And yeah it does just work. Except for as noted earlier.
On Thu, Apr 10, 2008 at 4:23 AM, Benny Prijono bennylp@pjsip.org wrote:

On Wed, Apr 9, 2008 at 7:01 PM, Roland Klabunde
roland.klabunde@freenet.de wrote:

Is that available somewhere?

Not in our svn repository I'm afraid. But assuming you have Python SDK
ported to WM, wouldn't you just need to create a WM project for
py_pjsua and things should "just work"?

Cheers
Beny


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

here is the python port I used. http://pythonce.sourceforge.net/ and the Tkinter instructions are here http://pythonce.sourceforge.net/Wikka/Tkinter. And yeah it does just work. Except for as noted earlier. On Thu, Apr 10, 2008 at 4:23 AM, Benny Prijono <bennylp@pjsip.org> wrote: > On Wed, Apr 9, 2008 at 7:01 PM, Roland Klabunde > <roland.klabunde@freenet.de> wrote: > > Is that available somewhere? > > > > Not in our svn repository I'm afraid. But assuming you have Python SDK > ported to WM, wouldn't you just need to create a WM project for > py_pjsua and things should "just work"? > > Cheers > Beny > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
RK
Roland Klabunde
Thu, Apr 10, 2008 2:40 PM

Thansk for your efforts, Danny.

Regards

----- Original Message -----
From: "Danny Brown" danbrwn@gmail.com
To: "pjsip list" pjsip@lists.pjsip.org
Sent: Thursday, April 10, 2008 3:42 PM
Subject: Re: [pjsip] Python wrapper for pjsip on WM devices?

here is the python port I used.
http://pythonce.sourceforge.net/
and the Tkinter instructions are here
http://pythonce.sourceforge.net/Wikka/Tkinter.
And yeah it does just work. Except for as noted earlier.
On Thu, Apr 10, 2008 at 4:23 AM, Benny Prijono bennylp@pjsip.org wrote:

On Wed, Apr 9, 2008 at 7:01 PM, Roland Klabunde
roland.klabunde@freenet.de wrote:

Is that available somewhere?

Not in our svn repository I'm afraid. But assuming you have Python SDK
ported to WM, wouldn't you just need to create a WM project for
py_pjsua and things should "just work"?

Cheers
Beny


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Thansk for your efforts, Danny. Regards ----- Original Message ----- From: "Danny Brown" <danbrwn@gmail.com> To: "pjsip list" <pjsip@lists.pjsip.org> Sent: Thursday, April 10, 2008 3:42 PM Subject: Re: [pjsip] Python wrapper for pjsip on WM devices? > here is the python port I used. > http://pythonce.sourceforge.net/ > and the Tkinter instructions are here > http://pythonce.sourceforge.net/Wikka/Tkinter. > And yeah it does just work. Except for as noted earlier. > On Thu, Apr 10, 2008 at 4:23 AM, Benny Prijono <bennylp@pjsip.org> wrote: >> On Wed, Apr 9, 2008 at 7:01 PM, Roland Klabunde >> <roland.klabunde@freenet.de> wrote: >> > Is that available somewhere? >> > >> >> Not in our svn repository I'm afraid. But assuming you have Python SDK >> ported to WM, wouldn't you just need to create a WM project for >> py_pjsua and things should "just work"? >> >> Cheers >> Beny >> >> >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
RK
Roland Klabunde
Thu, Apr 10, 2008 8:09 PM

Hi Sasa,

meanwhile I managed to build your PJSIP DLL for ARM. Not sure, whether this works or not. Basically one just has follow the build steps for pjsua-wince. Import the pjsipdll project and change the include pathes from

"$(SolutionDir)/pjsip/include";"$(SolutionDir)/pjlib/include";"$(SolutionDir)/pjlib-util/include";"$(SolutionDir)/pjmedia/include";"$(SolutionDir)/pjnath/include"

to

include,../../pjsip/include,../../pjlib-util/include,../../pjlib/include,../../pjmedia/include,../../pjnath/include

and replace the additional libs with the one which may be found in pjsua-wince project.

Regards

----- Original Message -----
From: Sasa Coh
To: pjsip list
Sent: Wednesday, April 09, 2008 10:58 PM
Subject: Re: [pjsip] To SasaCoh: Question concering Sipek for WM

Hi Roland,

pjsipDll project is just another kind of pjsua. I suggest you to follow pjsip instructions for WinCE compilation. I didn't try it by myself, but I remember at least one post where someone managed to build pjsipDll for WinCE.

FYI: for more details on pjsip .Net projects visit http://code.google.com/p/sipek2/ or http://code.google.com/p/sipeksdk

Regards,
Sasa

On Wed, Apr 9, 2008 at 8:35 PM, Roland Klabunde roland.klabunde@freenet.de wrote:

Question to sasacoh:

Would it be possible to compile pjsipDll against the WinCE libraries? Would
like to use your managed wrapper for .net CF.

Regards


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi Sasa, meanwhile I managed to build your PJSIP DLL for ARM. Not sure, whether this works or not. Basically one just has follow the build steps for pjsua-wince. Import the pjsipdll project and change the include pathes from "$(SolutionDir)/pjsip/include";"$(SolutionDir)/pjlib/include";"$(SolutionDir)/pjlib-util/include";"$(SolutionDir)/pjmedia/include";"$(SolutionDir)/pjnath/include" to include,../../pjsip/include,../../pjlib-util/include,../../pjlib/include,../../pjmedia/include,../../pjnath/include and replace the additional libs with the one which may be found in pjsua-wince project. Regards ----- Original Message ----- From: Sasa Coh To: pjsip list Sent: Wednesday, April 09, 2008 10:58 PM Subject: Re: [pjsip] To SasaCoh: Question concering Sipek for WM Hi Roland, pjsipDll project is just another kind of pjsua. I suggest you to follow pjsip instructions for WinCE compilation. I didn't try it by myself, but I remember at least one post where someone managed to build pjsipDll for WinCE. FYI: for more details on pjsip .Net projects visit http://code.google.com/p/sipek2/ or http://code.google.com/p/sipeksdk Regards, Sasa On Wed, Apr 9, 2008 at 8:35 PM, Roland Klabunde <roland.klabunde@freenet.de> wrote: Question to sasacoh: Would it be possible to compile pjsipDll against the WinCE libraries? Would like to use your managed wrapper for .net CF. Regards _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org ------------------------------------------------------------------------------ _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org