Update of /cvsroot/freevo/freevo/src/video
In directory sc8-pr-cvs1:/tmp/cvs-serv14474
Modified Files:
mplayer.py videoitem.py xml_parser.py
Log Message:
Added patch from Matthieu Weber for better mplayer_options and subitem
handling
Index: mplayer.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/mplayer.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** mplayer.py 23 Mar 2003 15:19:39 -0000 1.28
--- mplayer.py 23 Mar 2003 20:00:26 -0000 1.29
***************
*** 10,13 ****
--- 10,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.29 2003/03/23 20:00:26 dischi
+ # Added patch from Matthieu Weber for better mplayer_options and subitem
+ # handling
+ #
# Revision 1.28 2003/03/23 15:19:39 gsbarbieri
# Fixed a bug when ESC was pressed while watching a movie. Freevo used to crash.
***************
*** 271,276 ****
skin.PopupBox('%s\nnot found!' % os.path.basename(filename))
time.sleep(2.0)
- menuwidget.refresh()
# XXX We should really use return more.
return 0
--- 275,282 ----
skin.PopupBox('%s\nnot found!' % os.path.basename(filename))
time.sleep(2.0)
+ # This event allows the videoitem which contains subitems to
+ # try to play the next subitem
+ rc.post_event(rc.PLAY_END)
# XXX We should really use return more.
return 0
Index: videoitem.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/videoitem.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** videoitem.py 22 Mar 2003 20:03:02 -0000 1.24
--- videoitem.py 23 Mar 2003 20:00:26 -0000 1.25
***************
*** 10,13 ****
--- 10,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.25 2003/03/23 20:00:26 dischi
+ # Added patch from Matthieu Weber for better mplayer_options and subitem
+ # handling
+ #
# Revision 1.24 2003/03/22 20:03:02 dischi
# add detailed information for tv shows
***************
*** 302,306 ****
if self.subitems:
self.current_subitem = self.subitems[0]
! self.current_subitem.mplayer_options = self.mplayer_options # Pass along
the options
self.current_subitem.play(arg, menuw)
return
--- 306,323 ----
if self.subitems:
self.current_subitem = self.subitems[0]
! # Pass along the options, without loosing the subitem's own
! # options
! if self.current_subitem.mplayer_options:
! if self.mplayer_options:
! self.current_subitem.mplayer_options += ' ' + self.mplayer_opions
! else:
! self.current_subitem.mplayer_options = self.mplayer_options
! # When playing a subitem, the menu must be hidden. If it is not,
! # the playing will stop after the first subitem, since the
! # PLAY_END/USER_END event is not forwarded to the parent
! # videoitem.
! # And besides, we don't need the menu between two subitems.
! menuw.hide()
!
self.current_subitem.play(arg, menuw)
return
Index: xml_parser.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/xml_parser.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** xml_parser.py 14 Mar 2003 16:24:34 -0000 1.9
--- xml_parser.py 23 Mar 2003 20:00:26 -0000 1.10
***************
*** 10,13 ****
--- 10,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.10 2003/03/23 20:00:26 dischi
+ # Added patch from Matthieu Weber for better mplayer_options and subitem
+ # handling
+ #
# Revision 1.9 2003/03/14 16:24:34 dischi
# Patch from Matthieu Weber with some bugfixes
***************
*** 274,280 ****
if len(variant['parts']) > 1:
vitem = VideoItem('', None)
- vitem.mplayer_options = variant['mplayer-options']
- if video['items'][variant['parts'][0]['ref']]['mplayer-options']:
- vitem.mplayer_options += " " +
video['items'][part_ref]['mplayer-options']
for part in variant['parts']:
part_ref = part['ref']
--- 278,281 ----
***************
*** 287,295 ****
subitem.subtitle_file = part['subtitle']
subitem.audio_file = part['audio']
! subitem.mplayer_options = variant['mplayer-options']
if video['items'][part_ref]['mplayer-options']:
! if not subitem.mplayer_options:
! subitem.mplayer_options = ""
! subitem.mplayer_options += " " +
video['items'][part_ref]['mplayer-options']
vitem.subitems += [ subitem ]
--- 288,302 ----
subitem.subtitle_file = part['subtitle']
subitem.audio_file = part['audio']
! subitem.mplayer_options = ''
! if video['mplayer-options']:
! subitem.mplayer_options += ' ' + video['mplayer-options']
if video['items'][part_ref]['mplayer-options']:
! subitem.mplayer_options += ' ' +
video['items'][part_ref]['mplayer-options']
! if variant['mplayer-options']:
! subitem.mplayer_options += ' ' + variant['mplayer-options']
! if part['mplayer-options']:
! subitem.mplayer_options += " " + part['mplayer-options']
! if not subitem.mplayer_options:
! subitem.mplayer_options = None
vitem.subitems += [ subitem ]
***************
*** 303,311 ****
vitem.subtitle_file = variant['parts'][0]['subtitle']
vitem.audio_file = variant['parts'][0]['audio']
! vitem.mplayer_options = variant['mplayer-options']
if video['items'][part_ref]['mplayer-options']:
! if not vitem.mplayer_options:
! vitem.mplayer_options = ""
! vitem.mplayer_options += " " +
video['items'][part_ref]['mplayer-options']
else:
if len(video['items-list']) > 1:
--- 310,325 ----
vitem.subtitle_file = variant['parts'][0]['subtitle']
vitem.audio_file = variant['parts'][0]['audio']
!
! vitem.mplayer_options = ''
! if video['mplayer-options']:
! vitem.mplayer_options += ' ' + video['mplayer-options']
if video['items'][part_ref]['mplayer-options']:
! vitem.mplayer_options += ' ' +
video['items'][part_ref]['mplayer-options']
! if variant['mplayer-options']:
! vitem.mplayer_options += ' ' + variant['mplayer-options']
! if variant['parts'][0]['mplayer-options']:
! vitem.mplayer_options += " " + variant['parts'][0]['mplayer-options']
! if not vitem.mplayer_options:
! vitem.mplayer_options = None
else:
if len(video['items-list']) > 1:
***************
*** 317,321 ****
if subitem.media_id:
vitem.rom_id += [ subitem.media_id ]
! subitem.mplayer_options = video['items'][v]['mplayer-options']
vitem.subitems += [ subitem ]
else:
--- 331,341 ----
if subitem.media_id:
vitem.rom_id += [ subitem.media_id ]
! subitem.mplayer_options = ''
! if video['mplayer-options']:
! subitem.mplayer_options += ' ' + video['mplayer-options']
! if video['items'][v]['mplayer-options']:
! subitem.mplayer_options += ' ' +
video['items'][v]['mplayer-options']
! if not subitem.mplayer_options:
! subitem.mplayer_options = None
vitem.subitems += [ subitem ]
else:
***************
*** 326,330 ****
if vitem.media_id:
vitem.rom_id += [ vitem.media_id ]
! vitem.mplayer_options = video['items'][ref]['mplayer-options']
return vitem
--- 346,356 ----
if vitem.media_id:
vitem.rom_id += [ vitem.media_id ]
! vitem.mplayer_options = ''
! if video['mplayer-options']:
! vitem.mplayer_options += ' ' + video['mplayer-options']
! if video['items'][ref]['mplayer-options']:
! vitem.mplayer_options += ' ' + video['items'][ref]['mplayer-options']
! if not vitem.mplayer_options:
! vitem.mplayer_options = None
return vitem
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog