Possible problem with mplayer
#1
i've done as much research as i can and i can't find a similar problem reported on sourceforge, or on these forums.

first the essentials, i'm using a softmodded xbox version 1.1 with xbmc 1.1.0 t3ch cvs build 3-28-2006.

i had been helping to rewrite the shoutcast video x python script when i noticed an odd behavior. i was trying to add a bit of code to have xbmc.player() retry the connection up to 50 times before giving up.

i began to notice that after it tried the connection several times xbmc's ability to make any connections to the internet would begin to fail, and restarting the xbox was the only cure. i tried waiting several minutes, but it didn't seem to help either.

i tinkered with trying different streams from shoutcast, and different retry counts, but it seemed that after 50 or so retries, xbmc's ability to connect to the internet would stop. it wouldn't matter if i started and stopped the process, or used different streams. 50 attempts = no access.

it seemed like xbmc.mplayer() was creating sockets to the internet, but not closing them.

here's the snippet of code that facilitates the problem:

Quote: retrydialog = xbmcgui.dialogprogress()
retrydialog.create("shoutcast video x", "trying stream...")
tmpstreamitem = self.vidlist.getselectedposition()
webfile = str(vid_stream[tmpstreamitem])
try:
badurl=0
loc = urllib.urlopener()
loc.retrieve(webfile, localfile)
except:
badurl=1
retrydialog.close()
self.message("unable to contact server")

if badurl==0:
pls = xbmc.playlist(0)
pls.clear()
#dialog.close()
pls.load(localfile)

try:
for i in range (0,50):
if retrydialog.iscanceled()==true:
retrydialog.close()
break
try:
player = xbmc.player()
player.play(pls)
except:
self.message("playing stream failed: "+str(sys.exc_info()[0]))

if player.isplayingvideo() == true:
retrydialog.close()
break
else:
retrydialog.update((i+1)*2)
if i>=49:
retrydialog.close()
except:
self.message("fatal error: "+str(sys.exc_info()[0]))
retrydialog.close()
i'm interested in any insight into how to solve the problem.
if it's a problem in my code, or if it's a problem in xbmc.
here's the relevant log file:
Quote:07-04-2006 17:35:40 debug msg:failed to connect to server with af_inet
07-04-2006 17:35:40 error getsocketforindex() invalid index:0
07-04-2006 17:35:40 error releasesocket() invalid index:0
07-04-2006 17:35:40 debug msg:unable to open url: http://70.85.182.122:15851;stream.nsv
07-04-2006 17:35:40 debug msg:unable to open stream
07-04-2006 17:35:40 error cmplayer::openfile() http://70.85.182.122:15851;stream.nsv failed
07-04-2006 17:35:40 debug msg: mplayer_close_file()
07-04-2006 17:35:40 debug msg:
07-04-2006 17:35:40 debug msg: uninit_player
07-04-2006 17:35:40 debug msg: uninit_player - done
07-04-2006 17:35:40 debug freeing fs segment @ 0xab41c0
07-04-2006 17:35:40 error playlist player: skipping unplayable item: 0, path [http://70.85.182.122:15851;stream.nsv]
07-04-2006 17:35:40 debug playlist player: no more playable items... aborting playback
07-04-2006 17:35:42 info loading skin file: dialogprogress.xml
07-04-2006 17:35:42 error getsocketforindex() invalid index:0
07-04-2006 17:35:42 error getsocketforindex() invalid index:0
07-04-2006 17:35:42 error releasesocket() invalid index:0
07-04-2006 17:35:42 info loading skin file: dialogok.xml
07-04-2006 17:35:43 debug activating window id: 10020
07-04-2006 17:35:43 info loading skin file: myscripts.xml
07-04-2006 17:35:43 debug cguimediawindow::getdirectory (q:\scripts\shoutcast video x)
07-04-2006 17:35:43 debug parentpath = [q:\scripts\shoutcast video x]
07-04-2006 17:35:43 debug cguimediawindow::getdirectory (q:\scripts\shoutcast video x)
07-04-2006 17:35:43 debug parentpath = [q:\scripts\shoutcast video x]
07-04-2006 17:35:44 info loading skin file: home.xml

any help appriciated
thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Possible problem with mplayer0