I'm using python pjsua (great stuff guys!), and I need to support "play
done" functionality from the playlist on my apps.
I see that the wav_playlist supports eof callbacks through
pjmedia_wav_playlist_set_eof_cb()
I need to extend that support through pjsua and python.
My plan is to add a "on_play_done" callback to the PyObj_pjsua_callback
list, connect it up to the wav_player and wav_playlist, plumb the callback
up to pjsua, add support to pjsua_internal to keep track of python
"user_data" as part of the pjsua_file_data struct which goes with each
player so that I can implement a self._lookup_player(playerId) in python
and fire the callback to the correct python object in a manner similar to
how callbacks are implemented on calls, accounts, and buddies.
It's quite a bit of plumbing, so I thought I'd ask the experts:
Thanks for your time.
-Shawn Smith
Hello Shawn,
It turns out I have done this! Well, something close to it anyway. I
didn't use a playlist, just a single wav, but it may actually work
as-is. I don't have access to the source at the moment though so I'll
have to send it tomorrow. I wasn't sure what I did would be palatable to
the code owners--not that it is broken in any way, maybe just not as
clean as it could be.
Shawn Smith wrote:
I'm using python pjsua (great stuff guys!), and I need to support
"play done" functionality from the playlist on my apps.
I see that the wav_playlist supports eof callbacks through it
pjmedia_wav_playlist_set_eof_cb() - but there does not seem to be
support for it at pjsua nor python pjsua.
I need to extend that support through pjsua and python.
My plan is to add a "on_play_done" callback to the
PyObj_pjsua_callback list, connect it up to the wav_player and
wav_playlist, plumb the callback up to pjsua, add support to
pjsua_internal to keep track of python "user_data" as part of the
pjsua_file_data struct which goes with each player so that I can
implement a /self/._lookup_player(playerId) in python and fire the
callback to the correct python object in a manner similar to how
callbacks are implemented on calls, accounts, and buddies.
It's quite a bit of plumbing, so I thought I'd ask the experts:
Thanks for your time.
-Shawn Smith
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
--
Jens B. Jorgensen
jbj1@ultraemail.net