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

Modified Files:
        videoitem.py 
Log Message:
Bugfixes to the 'bookmark' facility.

1. Why was I opening the file twice?
2. Clobboring the sub_item variable for use as a temporary holder was a bad idea.
3. Likewise, I shouldn't have clobbered file.filename in the bookmark function.
4. This wasn't working properly for single AVI files, only for XML-style movies.

I've tried it some more, and while I think it works well enough, we really need a way 
to
provide feedback. I don't actually know how without trying to use bmovl which might be
too much. 

I think I may resurrect Krister's slave mode code to pass text to the screen.




Index: videoitem.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/videoitem.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** videoitem.py        17 Mar 2003 19:22:31 -0000      1.22
--- videoitem.py        19 Mar 2003 05:40:58 -0000      1.23
***************
*** 10,13 ****
--- 10,27 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.23  2003/03/19 05:40:58  outlyer
+ # Bugfixes to the 'bookmark' facility.
+ #
+ # 1. Why was I opening the file twice?
+ # 2. Clobboring the sub_item variable for use as a temporary holder was a bad idea.
+ # 3. Likewise, I shouldn't have clobbered file.filename in the bookmark function.
+ # 4. This wasn't working properly for single AVI files, only for XML-style movies.
+ #
+ # I've tried it some more, and while I think it works well enough, we really need a 
way to
+ # provide feedback. I don't actually know how without trying to use bmovl which 
might be
+ # too much.
+ #
+ # I think I may resurrect Krister's slave mode code to pass text to the screen.
+ #
  # Revision 1.22  2003/03/17 19:22:31  outlyer
  # Bookmarks are working now.
***************
*** 145,148 ****
--- 159,163 ----
          self.subitems = []              # if this item has more than one file/track 
to play
          self.current_subitem = None
+         self.bookmarkfile = None
  
          self.subtitle_file = {}         # text subtitles
***************
*** 255,260 ****
                  if os.path.exists(util.get_bookmarkfile(m.filename)):
                      myfilename = util.get_bookmarkfile(m.filename)
!                     self.current_subitem = myfilename
!                     items += [( self.bookmark_menu, 'Bookmark: %s' % 
(os.path.basename(m.filename)))]
          return items
  
--- 270,280 ----
                  if os.path.exists(util.get_bookmarkfile(m.filename)):
                      myfilename = util.get_bookmarkfile(m.filename)
!                     self.bookmarkfile = myfilename
!                     items += [( self.bookmark_menu, 'Bookmarks')]   # % 
(os.path.basename(m.filename)))]
!         else:
!             if os.path.exists(util.get_bookmarkfile(self.filename)):
!                 self.bookmarkfile = util.get_bookmarkfile(self.filename) 
!                 items += [( self.bookmark_menu, 'Bookmarks ')] 
! 
          return items
  
***************
*** 387,394 ****
          Bookmark list
          """
!         bookmarkfile = self.current_subitem
          items = []
!         m = open(bookmarkfile,'r')
!         lines = open(bookmarkfile,'r').readlines()
          for line in lines: 
              file = copy.copy(self)
--- 407,413 ----
          Bookmark list
          """
!         bookmarkfile = self.bookmarkfile
          items = []
!         lines = open(str(bookmarkfile),'r').readlines()
          for line in lines: 
              file = copy.copy(self)
***************
*** 397,403 ****
              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]
          
--- 416,422 ----
              min = int(sec/60)
              sec = int(sec%60)
!             time = '%0.2d:%0.2d:%0.2d' % (hour,min,sec)
!             file.name = 'Jump to %s' % (time)
!             file.mplayer_options += " -ss %s" % (time)
              items += [file]
          




-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to