Thanks Rune. I've verified that I can get playback to work without FLTK. Playback stops, or won't start in the first place, when I enter the FLTK event loop (FL.run). so it looks like this is more of a FLTK question than a pymedia one. Thanks for your help. Garth
On 2/6/07, Rune Devik <[EMAIL PROTECTED]> wrote: > Hi > > I have never used FLTK and it's been a while since I just pyMedia so the > library has changed. So my suggestion is that you try to get the pymedia > thingy working first and then implement the UI. E.g if the following works: > > import sys > import pymedia > import time > > # init player > player = pymedia.Player() > player.start() > # Start playing file (command line arg 1) > player.startPlayback(sys.argv[1]) > time.sleep(5) > # Pause and sleep to see effect > player.pausePlayback() > time.sleep(5) > # Unpause and sleep to see effect > player.unpausePlayback() > time.sleep(10) > > You know that the pymedia part is working and you can concentrate on > debugging the FLTK part. Also if you are interested in UI programming > wxPython.org is highly recommended. Not only is wxPython a great toolkit > it's also surrounded by a very good user community that can help you with > the questions you have. > > Regards, > -- > Rune Devik > http://www.garageinnovation.org > > On 2/6/07, Garth Patil <[EMAIL PROTECTED]> wrote: > > > > Hi, > > Forgive the remedial question, as I may be missing something obvious > > given my noob-ness to both python and pymedia. Given the following > > script, I can't get the audio to play. Any idea what I'm doing wrong? > > Many thanks, > > Garth > > > > #!/usr/bin/python > > > > from fltk import * > > import sys > > import pymedia.player > > > > window = None > > player = None > > > > def startPlay(prt, widget): > > player = pymedia.Player() > > player.start() > > player.startPlayback(sys.argv[1]) > > > > def playPause(ptr, widget): > > if player.isPaused(): > > player.unpausePlayback() > > else: > > player.pausePlayback() > > > > def exitcb(ptr, widget): > > sys.exit(0) > > > > window = Fl_Window(100,100,320, 65,"Button") > > b1 = Fl_Button(20,20,80,25, "Play") > > b1.callback(startPlay,window) > > b2 = Fl_Button(120,20, 80, 25, "Pause") > > b2.callback(playPause,window) > > b3 = Fl_Button(220,20, 80, 25, "Exit"); > > b3.callback(exitcb,window) > > window.end() > > window.show() > > Fl.run() > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > easier. > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Pymedia-users mailing list > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/pymedia-users > > > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Pymedia-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pymedia-users
