Update of /cvsroot/freevo/freevo/src/video
In directory sc8-pr-cvs1:/tmp/cvs-serv6841

Modified Files:
        mplayer.py videoitem.py 
Log Message:
Some changes for the bookmarks
    o videoitem.py - Added bookmark menu, bookmark "parser" and menu generation,
            haven't figured out how to pass the timecode to mplayer though. I tried
            setting mplayer_options, but self.play seems to just ignore them. I don't
            know how to pass anything to self.play either. ARGH.
    o mplayer.py - commented out two extraneous prints.




Index: mplayer.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/mplayer.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** mplayer.py  17 Mar 2003 16:34:33 -0000      1.26
--- mplayer.py  17 Mar 2003 18:54:44 -0000      1.27
***************
*** 10,13 ****
--- 10,21 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.27  2003/03/17 18:54:44  outlyer
+ # Some changes for the bookmarks
+ #     o videoitem.py - Added bookmark menu, bookmark "parser" and menu generation,
+ #             haven't figured out how to pass the timecode to mplayer though. I tried
+ #             setting mplayer_options, but self.play seems to just ignore them. I 
don't
+ #             know how to pass anything to self.play either. ARGH.
+ #     o mplayer.py - commented out two extraneous prints.
+ #
  # Revision 1.26  2003/03/17 16:34:33  outlyer
  # Added preliminary movie bookmarks (i.e. places to jump to on next play)
***************
*** 385,393 ****
                  return TRUE
              else:
-                 print self.item
                  self.stop()
                  self.thread.item = None
                  rc.app = None
-                 print self.item
                  return self.item.eventhandler(event)
  
--- 393,399 ----

Index: videoitem.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/videoitem.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** videoitem.py        16 Mar 2003 19:28:05 -0000      1.20
--- videoitem.py        17 Mar 2003 18:54:45 -0000      1.21
***************
*** 10,13 ****
--- 10,21 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.21  2003/03/17 18:54:45  outlyer
+ # Some changes for the bookmarks
+ #     o videoitem.py - Added bookmark menu, bookmark "parser" and menu generation,
+ #             haven't figured out how to pass the timecode to mplayer though. I tried
+ #             setting mplayer_options, but self.play seems to just ignore them. I 
don't
+ #             know how to pass anything to self.play either. ARGH.
+ #     o mplayer.py - commented out two extraneous prints.
+ #
  # Revision 1.20  2003/03/16 19:28:05  dischi
  # Item has a function getattr to get the attribute as string
***************
*** 124,128 ****
  
          self.filename = filename
-         
          self.name    = util.getname(filename)
  
--- 132,135 ----
***************
*** 213,221 ****
          return a list of possible actions on this item.
          """
-         
          items = [ (self.play, 'Play'), (self.settings, 'Change play settings') ]
          if self.variants:
              items += [ (self.show_variants, 'Show variants') ]
!         
          # show DVD/VCD title menu for DVDs, but only when we aren't in a
          # submenu of a such a menu already
--- 220,227 ----
          return a list of possible actions on this item.
          """
          items = [ (self.play, 'Play'), (self.settings, 'Change play settings') ]
          if self.variants:
              items += [ (self.show_variants, 'Show variants') ]
! 
          # show DVD/VCD title menu for DVDs, but only when we aren't in a
          # submenu of a such a menu already
***************
*** 226,229 ****
--- 232,242 ----
              if self.mode == 'vcd':
                  items += [( self.dvd_vcd_title_menu, 'VCD title list' )]
+             for m in self.subitems:
+                 # Allow user to watch one of the subitems instead of always both
+                 items += [( self.play, 'Play %s' % (m.filename))]
+                 if os.path.exists(util.get_bookmarkfile(m.filename)):
+                     myfilename = util.get_bookmarkfile(m.filename)
+                     self.current_subitem = myfilename
+                     items += [( self.bookmark_menu, 'Bookmark list %s' % 
(myfilename))]
          return items
  
***************
*** 350,353 ****
--- 363,392 ----
              menuw.hide()
          self.video_player.play('', mplayer_options, self, 'dvdnav')
+ 
+     def bookmark_menu(self,arg=None, menuw=None):
+         """
+         Bookmark list
+         """
+         bookmarkfile = self.current_subitem
+         items = []
+         m = open(bookmarkfile,'r')
+         lines = open(bookmarkfile,'r').readlines()
+         for line in lines: 
+             file = copy.copy(self)
+             sec = int(line)
+             hour = int(sec/3600)
+             min = int(sec/60)
+             sec = int(sec%60)
+             file.filename = '%0.2d:%0.2d:%0.2d' % (hour,min,sec)
+             file.name = 'Jump to %s' % (file.filename)
+             file.mplayer_options += " -ss %s" % (file.filename)
+             items += [file]
+         
+         moviemenu = menu.Menu(self.name, items)
+         menuw.pushmenu(moviemenu)
+ 
+         return
+ 
+ 
  
  




-------------------------------------------------------
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

Reply via email to