wav player eof (python)

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

 



Reaching eof mean wav player played whole file to conference bridge (not
looping). I have a couple of .wav files that comes through the socket (in
order) and i want to play them to conference birdge. So after one file ends
and i have read next file from the socket (to disc, cache..) i want to play
this file. Ideally it shouldn't be any gaps between files. All files are
played in the same call.
Thanks for your advice - i think i do it in that way.

2008/7/9 Turnaev Eugeny <turnaev at t72.ru>:

> On Wednesday 09 July 2008 13:34:29 you wrote:
> > Hi,
> >
> > How can I detect (in python) that the file reading has reached the end of
> > file ?
> > In c we have callback functions pjmedia_wav_player_set_eof_cb().
> > Is there similar function in python or we can do it in another way ?
> >
> > Any help is appreciated,
> > Chris
> >
>
> Hi. I am not a developer of pjsua, bat as i can see
> there is no such function wrapper in python module.
>
> What is the meaning of reaching end of file?
>
> If this meaning is in context - that a wav player
> reached the end of file .. in other words wav player played
> whole file to conference bridge.. and it is time to
> disconnect this wav player from conference and destroy a player?
>
> Then i think there are 2 possibilities in python:
> 1) you determine a wav file duration..
>   and after you connect player port to conference -> you are sleeping
>   for the duration of wav player ( time.sleep() )
>
> 2) you determine a wav file duration..
>   and after you connect player port to conference -> you are
>   remembering a time when you have to disconnect this player in
>  some internal structure of you app.
>   And when i time comes you disconnects a player.
>  in other words implementing a callback manually by hand.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080709/a1a48b0b/attachment.html 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux