Op ma 08-11-2004, om 06:13 schreef mike lewis:

> Also, if you get time, un-hack your hack, make it a 'feature'  (ie
> make edl and sub work together), and submit a patch!

Hereby...
The full package (freevo patch, mplayer patch, some skinny
documentation) can be found at http://japie.deserver.nl/ftp/freevo
-- 
Groetjes Japie
diff -Naur freevo-1.5.2/ChangeLog freevo-1.5.2-comercials_patch/ChangeLog
--- freevo-1.5.2/ChangeLog	2004-10-31 16:11:18.000000000 +0100
+++ freevo-1.5.2-comercials_patch/ChangeLog	2004-11-09 10:38:12.026256784 +0100
@@ -3,6 +3,11 @@
 
 $Id: ChangeLog,v 1.119.2.4 2004/10/20 18:37:03 dischi Exp $
 
+Release 1.5.2 comercials patch (2004-11-08):
+---------------------------
+ * Added comercials option to the video fxd format. (patched Mplayer version needed, record tv with "-vf bfdetect=64:20:35:$1.edl" option...)
+
+
 Release 1.5.2 (2004-10-24):
 ---------------------------
  * Fix memory leak when running image viewer in slideshow mode
diff -Naur freevo-1.5.2/src/video/fxdhandler.py freevo-1.5.2-comercials_patch/src/video/fxdhandler.py
--- freevo-1.5.2/src/video/fxdhandler.py	2004-07-11 13:47:02.000000000 +0200
+++ freevo-1.5.2-comercials_patch/src/video/fxdhandler.py	2004-11-08 16:28:20.000000000 +0100
@@ -61,6 +61,7 @@
         <variants>
             <variant>
                 <part ref mplayer_options>
+                    <comercials media_id>file</comercials>
                     <subtitle media_id>file</subtitle>
                     <audio media_id>file</audio>
                 </part>+
@@ -166,6 +167,16 @@
                     subtitle = {}
                 v.subtitle_file = subtitle
 
+                comercials = fxd.get_children(parts[0], 'comercials')
+                if comercials:
+                    comercials = { 'media_id': fxd.getattr(comercials[0], 'media-id'),
+                                 'file'    : fxd.gettext(comercials[0]) }
+                    if not comercials['media_id']:
+                        comercials['file'] = os.path.join(dirname, comercials['file'])
+                else:
+                   comercials  = {}
+                v.comercials_file = comercials
+
                 # global <video> mplayer_options
                 if mplayer_options:
                     v.mplayer_options += mplayer_options
@@ -193,9 +204,18 @@
                     else:
                         subtitle = {}
 
+                    if comersials:
+                        comersials = { 'media_id': fxd.getattr(comersials[0], 'media-id'),
+                                     'file'    : fxd.gettext(comersials[0]) }
+                        if not comersials['media_id']:
+                            comersials['file'] = os.path.join(dirname, comersials['file'])
+                    else:
+                        comersials = {}
+
                     sub = VideoItem(id[ref][1], parent=v, info=item.info, parse=False)
                     sub.files = None
                     sub.media_id, sub.mplayer_options, player, is_playlist = id[ref][2:]
+                    sub.comersials_file = comersials
                     sub.subtitle_file = subtitle
                     sub.audio_file    = audio
                     # global <video> mplayer_options
diff -Naur freevo-1.5.2/src/video/plugins/mplayer.py freevo-1.5.2-comercials_patch/src/video/plugins/mplayer.py
--- freevo-1.5.2/src/video/plugins/mplayer.py	2004-09-11 18:25:34.000000000 +0200
+++ freevo-1.5.2-comercials_patch/src/video/plugins/mplayer.py	2004-11-08 16:30:16.000000000 +0100
@@ -324,6 +324,11 @@
             
             child.wait()
 
+        if item.comercials_file:
+            d, f = util.resolve_media_mountdir(item.comercials_file)
+            util.mount(d)
+            command += ['-edl', f]
+
         if item.subtitle_file:
             d, f = util.resolve_media_mountdir(item.subtitle_file)
             util.mount(d)
diff -Naur freevo-1.5.2/src/video/videoitem.py freevo-1.5.2-comercials_patch/src/video/videoitem.py
--- freevo-1.5.2/src/video/videoitem.py	2004-10-20 20:33:20.000000000 +0200
+++ freevo-1.5.2-comercials_patch/src/video/videoitem.py	2004-11-08 16:35:35.000000000 +0100
@@ -102,25 +102,27 @@
         if info:
             self.info.set_variables(info)
 
-        self.variants          = []         # if this item has variants
-        self.subitems          = []         # more than one file/track to play
-        self.current_subitem   = None
-        self.media_id          = ''
-
-        self.subtitle_file     = {}         # text subtitles
-        self.audio_file        = {}         # audio dubbing
-
-        self.mplayer_options   = ''
-        self.tv_show           = False
-
-        self.video_width       = 0
-        self.video_height      = 0
-
-        self.selected_subtitle = None
-        self.selected_audio    = None
-        self.elapsed           = 0
+        self.variants            = []         # if this item has variants
+        self.subitems            = []         # more than one file/track to play
+        self.current_subitem     = None
+        self.media_id            = ''
+
+        self.comercials_file     = {}         # comercials skipping
+        self.subtitle_file       = {}         # text subtitles
+        self.audio_file          = {}         # audio dubbing
+
+        self.mplayer_options     = ''
+        self.tv_show             = False
+
+        self.video_width         = 0
+        self.video_height        = 0
+
+        self.selected_comercials = None
+        self.selected_subtitle   = None
+        self.selected_audio      = None
+        self.elapsed             = 0
         
-        self.possible_player   = []
+        self.possible_player     = []
 
         # find image for tv show and build new title
         if config.VIDEO_SHOW_REGEXP_MATCH(self.name) and not self.network_play and \

Reply via email to