Author: duncan
Date: Fri Jan 12 20:13:00 2007
New Revision: 8967

Added:
   branches/rel-1/freevo/src/commdetectcore.py   (contents, props changed)
   branches/rel-1/freevo/src/helpers/commdetectserver.py   (contents, props 
changed)
   branches/rel-1/freevo/src/video/commdetectclient.py   (contents, props 
changed)
Modified:
   branches/rel-1/freevo/ChangeLog
   branches/rel-1/freevo/Docs/CREDITS
   branches/rel-1/freevo/freevo_config.py
   branches/rel-1/freevo/local_conf.py.example
   branches/rel-1/freevo/src/helpers/recordserver.py
   branches/rel-1/freevo/src/video/plugins/mplayer.py

Log:
[ 1633567 ] Freevo 1.7 Commercial detection and removal
Patch and server from Justin Wetherell applied


Modified: branches/rel-1/freevo/ChangeLog
==============================================================================
--- branches/rel-1/freevo/ChangeLog     (original)
+++ branches/rel-1/freevo/ChangeLog     Fri Jan 12 20:13:00 2007
@@ -28,6 +28,7 @@
  * New home automation plug-in, allows controlling device in the home! 
(F#1605293)
  * New Linux event device support (F#1579124)
  * New Music Player Daemon (mpd) plug-in (F#1623023)
+ * New record server commerical detection and removal (F#1633567)
  * New RSS server, for getting podcasts, etc. (F#1580407)
  * New Shuttle VFD plug-in (F#1619761)
  * New support for anamorphic skins (F#1625752)

Modified: branches/rel-1/freevo/Docs/CREDITS
==============================================================================
--- branches/rel-1/freevo/Docs/CREDITS  (original)
+++ branches/rel-1/freevo/Docs/CREDITS  Fri Jan 12 20:13:00 2007
@@ -105,6 +105,7 @@
 
 Justin Wetherell <[EMAIL PROTECTED]>
 o RSS feed server
+o record server commerical detection and removal server
 o audio plugin for XM online
 
 Dan Eriksen <[EMAIL PROTECTED]>

Modified: branches/rel-1/freevo/freevo_config.py
==============================================================================
--- branches/rel-1/freevo/freevo_config.py      (original)
+++ branches/rel-1/freevo/freevo_config.py      Fri Jan 12 20:13:00 2007
@@ -1465,6 +1465,9 @@
 # This will enable only new episodes to be recorded
 ONLY_NEW_DETECTION = None
 
+# This will enable the commercial detection. It is quite process intensive.
+REMOVE_COMMERCIALS = None
+
 #
 # Watching TV
 #
@@ -1808,6 +1811,14 @@
 ENCODINGSERVER_IP   = 'localhost'
 ENCODINGSERVER_PORT = 6666
 
+# ======================================================================
+# Freevo builtin commdetect server settings:
+# ======================================================================
+COMMDETECTSERVER_UID = 0
+COMMDETECTSERVER_GID = 0
+
+COMMDETECTSERVER_IP   = 'localhost'
+COMMDETECTSERVER_PORT = 6667
 
 
 # ======================================================================

Modified: branches/rel-1/freevo/local_conf.py.example
==============================================================================
--- branches/rel-1/freevo/local_conf.py.example (original)
+++ branches/rel-1/freevo/local_conf.py.example Fri Jan 12 20:13:00 2007
@@ -1339,6 +1339,16 @@
 
 
 # ======================================================================
+# Freevo builtin commdetect server settings:
+# ======================================================================
+# COMMDETECTSERVER_UID = 0
+# COMMDETECTSERVER_GID = 0
+#
+# COMMDETECTSERVER_IP   = 'localhost'
+# COMMDETECTSERVER_PORT = 6667
+
+
+# ======================================================================
 # Freevo builtin rss server settings:
 # ======================================================================
 # RSSSERVER_UID = 0

Added: branches/rel-1/freevo/src/commdetectcore.py
==============================================================================
--- (empty file)
+++ branches/rel-1/freevo/src/commdetectcore.py Fri Jan 12 20:13:00 2007
@@ -0,0 +1,262 @@
+# -*- coding: iso-8859-1 -*-
+# -----------------------------------------------------------------------
+# commdetectcore.py, part of CommDetectServer - for use with Freevo
+# -----------------------------------------------------------------------
+#
+# Author: Justin Wetherell
+# some parts taken or inspired by Freevo's encodingserver
+#
+# -----------------------------------------------------------------------
+# Copyright (C) 2004 den_RDC (RVDM)
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
+# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation
+#
+# -----------------------------------------------------------------------
+
+#Import statements
+import threading
+from time import sleep
+import sys, os, re, popen2 #, ConfigParser, copy
+import config
+import kaa.metadata as mmpython
+from copy import copy
+from string import split, join
+
+def _debug_(text, level=1):
+    if DEBUG >= level:
+        try:
+            self.log.debug(String(text))
+        except:
+            print(String(text))
+
+class CommDetectJob:
+    """Class for creation & configuration of CommDetectJobs. This generates 
the mencoder commands"""
+
+    def __init__(self, source, idnr):
+        """Initialize class instance"""
+        _debug_('__init__(self, %s)' % (source))
+        self.source = source
+        self.name = source
+        self.idnr = idnr
+        self.pid = 0
+        self.blackframes=[]
+        self.edlList=[]
+        videoCodec='-ovc lavc'
+        nosound='-nosound'
+        videoFilter='-vf blackframe'
+        output='-o /dev/null'
+        grep='| grep vf_blackframe'
+        outfile='> /tmp/blackframes.txt'
+        string=" "+videoCodec+\
+               " "+nosound+\
+               " "+videoFilter+\
+               " "+self.source+\
+               " "+output+\
+               " "+grep+\
+               " "+outfile
+        self.cls = [string]
+
+    def _run(self, program, arguments, source, flushbuffer=0):
+        """Runs a program; supply program name (string) and arguments (list)"""
+        command = program
+        command += arguments
+        self.thread = CommandThread(self, command, flushbuffer=0)
+        self.thread.start()
+
+    class blackframe:
+          frame=0.0
+          seconds=0.0
+          time=0.0
+
+    class edl:
+          startSkipTime=0.0
+          endSkipTime=0.0
+          action=0.0
+
+    def grabBlackFrames(self):
+        #Grab all possible blackframes
+        fileHandle = open('/tmp/blackframes.txt','r')
+        for line in fileHandle.readlines():
+            splitln = line.split("\r")
+            line=splitln[-2]+splitln[-1]
+            #output with blackframe
+            newBlackFrame = self.blackframe()
+            splitframe = line.split("vf_blackframe:")
+            matchSeconds = re.compile('\d+\.\d+s')
+            match = matchSeconds.search(splitframe[0])
+            if match:
+               seconds=re.sub('s','',match.group())
+               newBlackFrame.seconds=float(seconds)
+            matchFrame = re.compile('\d+f')
+            match = matchFrame.search(splitframe[0])
+            if match:
+               frame=re.sub('f','',match.group())
+               newBlackFrame.frame=float(frame)
+            matchTime = re.compile('\d+min')
+            match = matchTime.search(splitframe[0])
+            if match:
+               time=re.sub('min','',match.group())
+               newBlackFrame.time=int(time)
+            self.blackframes.append(newBlackFrame)
+        fileHandle.close()
+
+    def findCommercials(self):
+        startFrame=None
+        startFrameTime=0
+        endFrame=None
+        for bframe in self.blackframes:
+            if bframe.time!=0:
+               #Throw out first black frame
+               if (startFrameTime==0):
+                  #Commerical break
+                  startFrame=bframe
+                  startFrameTime=bframe.time
+               else:
+                  if 
((bframe.time==startFrameTime)or(bframe.time==(startFrameTime-1))):
+                     #Same commercial break
+                     startFrameTime=bframe.time
+                     endFrame=bframe
+                  else:
+                     #New commercial break
+                     if not endFrame:
+                        #Sometimes a blackframe is thrown in the beginning
+                        endFrame=startFrame
+                     if ((endFrame.seconds-startFrame.seconds)>0):
+                        newEdl = self.edl()
+                        newEdl.startSkipTime=startFrame.seconds
+                        newEdl.endSkipTime=endFrame.seconds
+                        self.edlList.append(newEdl)
+                     startFrame=None
+                     startFrameTime=0
+                     endFrame=None
+        if ((len(self.edlList)==0)and(startFrame and endFrame)):
+           #Only one commercial
+           newEdl = self.edl()
+           newEdl.startSkipTime=startFrame.seconds
+           newEdl.endSkipTime=endFrame.seconds
+           self.edlList.append(newEdl)
+
+    def writeEdl(self):
+        if (len(self.edlList)>0):
+           outputFile=self.source.split(".")
+           output=outputFile[0]+".edl"
+           fileHandle = open(output,'w')
+           for skipSegment in self.edlList:
+               fileHandle.write("%d %d %d\n" % (skipSegment.startSkipTime, \
+                                                skipSegment.endSkipTime, \
+                                                skipSegment.action))
+           fileHandle.close()
+
+class CommandThread(threading.Thread):
+    """Handle threading of external commands"""
+    def __init__(self, parent, command, flushbuffer=0):
+        threading.Thread.__init__(self)
+        self.parent = parent
+        self.command = command
+        self.flushbuffer = 0
+        _debug_('command=\"%s\"' % command)
+
+    def run(self):
+        self.pipe = popen2.Popen4(self.command)
+        pid = self.pipe.pid
+        self.parent.pid = copy(pid)
+        totallines = []
+        _debug_("Mencoder running at PID %s" % self.pipe.pid)
+        while 1:
+            if self.flushbuffer:
+                line = self.pipe.fromchild.read(1000)
+            else:
+                line = self.pipe.fromchild.readline()
+            _debug_(line)
+            if not line:
+                break
+            else:
+                #don't save up the output if flushbuffer is enabled
+                if self.flushbuffer != 1:
+                    totallines.append(line)
+        sleep(0.5)
+        try:
+            os.waitpid(pid, os.WNOHANG)
+        except:
+            pass
+        self.kill_pipe()
+        _debug_("Grabbing Blackframes from file")
+        self.parent.grabBlackFrames()
+        _debug_("Finding Commercials")
+        self.parent.findCommercials()
+        _debug_("Writing edl file")
+        self.parent.writeEdl()
+        sys.exit(2)
+
+    def kill_pipe(self):
+        """Kills current process (pipe)"""
+        try:
+            os.kill(self.pipe.pid, 9)
+            os.waitpid(self.pipe.pid, os.WNOHANG)
+        except:
+            pass
+
+class CommDetectQueue:
+    """Class for generating an commdetect queue"""
+    def __init__(self, logger, debug=0):
+        #we keep a list and a dict because a dict doesn't store an order
+        global DEBUG
+        DEBUG = debug
+        self.qlist = []
+        self.qdict = {}
+        self.running = False
+        self.log = logger
+
+    def addCommDetectJob(self, encjob):
+        """Adds an commdetectjob to the queue"""
+        self.qlist += [encjob]
+        self.qdict[encjob.idnr] = encjob
+
+    def startQueue(self):
+        """Start the queue"""
+        if not self.running:
+            self.running = True
+            _debug_("queue started", 0)
+            self._runQueue()
+
+    def listJobs(self):
+        """Returns a list of queue'ed jobs"""
+        if self.qdict == {}:
+            return []
+        else:
+            jlist = []
+            for idnr, job in self.qdict.items():
+                jlist += [ (idnr, job.name) ]
+            return jlist
+
+    def _runQueue(self, line="", data=""):
+        """Executes the jobs in the queue, and gets called after every 
mencoder run is completed"""
+        if self.qlist == []:
+            #empty queue, do nothing
+            self.running = False
+            if hasattr(self,"currentjob"):
+                del self.currentjob
+            _debug_("queue empty, stopping processing...", 0)
+            return
+        _debug_("runQueue callback data : %s" % line)
+        #get the first queued object
+        self.currentjob = self.qlist[0]
+
+        _debug_("PID %s" % self.currentjob.pid)
+
+        _debug_("Running Mencoder, to write the blackframes to a file")
+        self.currentjob._run(config.CONF.mencoder, self.currentjob.cls[0], 
self.currentjob.source)
+        _debug_("Started job %s, PID %s" % (self.currentjob.idnr, 
self.currentjob.pid))
+        del self.qlist[0]
+        del self.qdict[self.currentjob.idnr]
+        self.running = False

Added: branches/rel-1/freevo/src/helpers/commdetectserver.py
==============================================================================
--- (empty file)
+++ branches/rel-1/freevo/src/helpers/commdetectserver.py       Fri Jan 12 
20:13:00 2007
@@ -0,0 +1,145 @@
+#!/usr/bin/env python
+# -*- coding: iso-8859-1 -*-
+# -----------------------------------------------------------------------
+# CommDetectServer.py, part of Commercial Detection Server - for use with 
Freevo
+# -----------------------------------------------------------------------
+#
+# Author: Justin Wetherell
+# some parts taken or inspired by Freevo's encodingserver
+#
+# -----------------------------------------------------------------------
+# Copyright (C) 2004 den_RDC (RVDM)
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
+# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation
+#
+# -----------------------------------------------------------------------
+
+import sys, string, random, time, os, re, pwd, stat
+import config
+from util import vfs
+
+appname = os.path.splitext(os.path.basename(sys.argv[0]))[0]
+appconf = appname.upper()
+
+# change uid
+if __name__ == '__main__':
+    uid='config.'+appconf+'_UID'
+    gid='config.'+appconf+'_GID'
+    try:
+        if eval(uid) and os.getuid() == 0:
+            os.setgid(eval(gid))
+            os.setuid(eval(uid))
+            os.environ['USER'] = pwd.getpwuid(os.getuid())[0]
+            os.environ['HOME'] = pwd.getpwuid(os.getuid())[5]
+    except Exception, e:
+        print e
+
+from twisted.web import xmlrpc, server
+from twisted.internet.app import Application
+from twisted.internet import reactor
+from twisted.python import log
+from util.marmalade import jellyToXML, unjellyFromXML
+import time, random, sys, os
+import logging
+import config
+
+from commdetectcore import CommDetectJob, CommDetectQueue
+
+DEBUG = hasattr(config, appconf+'_DEBUG') and eval('config.'+appconf+'_DEBUG') 
or config.DEBUG
+
+logfile = '%s/%s-%s.log' % (config.LOGDIR, appname, os.getuid())
+log.startLogging(open(logfile, 'a'))
+
+def _debug_(text, level=1):
+    if DEBUG >= level:
+        try:
+            log.debug(String(text))
+        except:
+            print String(text)
+
+tmppath = '/tmp/commdetectserver'
+
+jam = jellyToXML
+unjam = unjellyFromXML
+
+class CommDetectServer(xmlrpc.XMLRPC):
+    def __init__(self, debug=False):
+        self.jobs = {}
+        self.queue = CommDetectQueue(log, DEBUG)
+        _debug_("CommDetectServer started...", 0)
+        
+    def xmlrpc_echotest(self, blah):
+        _debug_("xmlrpc_echotest(self, blah)", 3)
+        return (True, 'CommDetectServer::echotest: %s' % blah)
+
+    def xmlrpc_initCommDetectJob(self, source):
+        _debug_("xmlrpc_initCommDetectJob(self, %s)" % (source))
+        #safety checks
+        if not (source):
+            return (False, 'CommDetectServer::initCommDetectJob:  no source 
given')
+        idnr = int((time.time() / random.random()) / 100)
+        _debug_("idnr=%s" % (idnr), 2)
+        self.jobs[idnr] = CommDetectJob(source,idnr)
+        _debug_("Initialized job %s (idnr : %s)" % (source,idnr), 0)
+        return (True, idnr)
+        
+    def xmlrpc_queueIt(self, idnr, now=False):
+        _debug_("xmlrpc_queueIt(self, idnr, now=False)", 3)
+        self.queue.addCommDetectJob(self.jobs[idnr])
+        del self.jobs[idnr]
+        _debug_("Added job %s to the queue" % idnr, 0)
+        if now:
+            self.queue.startQueue()
+        return (True, "CommDetectServer::queueIt: OK")
+        
+    def xmlrpc_startQueue(self):
+        _debug_("xmlrpc_startQueue(self)", 3)
+        self.queue.startQueue()
+        return (True, "CommDetectServer::startqueue: OK")
+        
+    def xmlrpc_listJobs(self):
+        _debug_("xmlrpc_listJobs(self)", 3)
+        jlist = self.queue.listJobs()
+        return (True, jam(jlist))
+        
+def main():
+    global DEBUG
+    if not (os.path.exists(tmppath) and os.path.isdir(tmppath)):
+        os.mkdir(tmppath)
+    os.chdir(tmppath)
+    app = Application("CommDetectServer")
+    if len(sys.argv) >= 2 and sys.argv[1] == "debug":
+        es = CommDetectServer(True)
+        import commdetectcore
+        commdetectcore.DEBUG=True
+    else:
+        es = CommDetectServer()
+    _debug_('main: DEBUG=%s' % DEBUG, 0)
+    if (DEBUG == 0):
+        app.listenTCP(config.COMMDETECTSERVER_PORT, server.Site(es, 
logPath='/dev/null'))
+    else:
+        app.listenTCP(config.COMMDETECTSERVER_PORT, server.Site(es))
+    app.run(save=0)
+    
+if __name__ == '__main__':
+    import traceback
+    while 1:
+        try:
+            start = time.time()
+            main()
+            break
+        except:
+            traceback.print_exc()
+            if start + 10 > time.time():
+                _debug_('server problem, sleeping 1 min', 0)
+                time.sleep(60)

Modified: branches/rel-1/freevo/src/helpers/recordserver.py
==============================================================================
--- branches/rel-1/freevo/src/helpers/recordserver.py   (original)
+++ branches/rel-1/freevo/src/helpers/recordserver.py   Fri Jan 12 20:13:00 2007
@@ -52,6 +52,9 @@
 from twisted.internet import reactor
 from twisted.python import log
 from util.marmalade import jellyToXML, unjellyFromXML
+from video.commdetectclient import initCommDetectJob
+from video.commdetectclient import queueIt
+from video.commdetectclient import listJobs
 
 import rc
 rc_object = rc.get_singleton(use_pylirc=0, use_netremote=0)
@@ -68,6 +71,7 @@
 from util.videothumb import snapshot
 from event import *
 
+
 DEBUG = hasattr(config, appconf+'_DEBUG') and eval('config.'+appconf+'_DEBUG') 
or config.DEBUG
 
 logfile = '%s/%s-%s.log' % (config.LOGDIR, appname, os.getuid())
@@ -1354,7 +1358,12 @@
                     pass
                 if config.VCR_POST_REC:
                     util.popen3.Popen3(config.VCR_POST_REC)
-
+                if config.REMOVE_COMMERCIALS:
+                    (status, idnr) = initCommDetectJob(prog.filename)
+                    (status, output) = queueIt(idnr, True)
+                    print output
+                    (status, output) = listJobs()
+                    print output
             else:
                 print 'not handling event %s' % str(event)
                 return

Added: branches/rel-1/freevo/src/video/commdetectclient.py
==============================================================================
--- (empty file)
+++ branches/rel-1/freevo/src/video/commdetectclient.py Fri Jan 12 20:13:00 2007
@@ -0,0 +1,134 @@
+#!/usr/bin/env python
+# -*- coding: iso-8859-1 -*-
+# -----------------------------------------------------------------------
+# commdetectclient.py - A client interface to the commercial detecting server.
+# -----------------------------------------------------------------------
+#
+# Author: Justin Wetherell
+# some parts taken or inspired by Freevo's encodingserver
+#
+# -----------------------------------------------------------------------
+# Copyright (C) 2004 den_RDC (RVDM)
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
+# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation
+#
+# -----------------------------------------------------------------------
+
+import xmlrpclib, sys
+from util.marmalade import jellyToXML, unjellyFromXML
+import config
+
+
+server_string = 'http://%s:%s/' % \
+                (config.COMMDETECTSERVER_IP, config.COMMDETECTSERVER_PORT)
+
+server = xmlrpclib.Server(server_string, allow_none=1)
+#server = object() - uncomment this and comment the previous line to enable 
pychecker testing
+
+jam = jellyToXML
+unjam = unjellyFromXML
+
+def returnFromJelly(status, response):
+    """Un-serialize CommDetectServer responses"""
+    if status:
+        return (status, unjam(response))
+    else:
+        return (status, response)
+
+def connectionTest(teststr='testing'):
+    """
+    Test connectivity
+    Returns false if the CommDetectServer cannot be reached
+    """
+    try:
+        (status, response) = server.echotest(teststr)
+    except:
+        return (False, 'CommDetectClient: connection error')
+    return (status, response)
+    
+def initCommDetectJob(source):
+    """Initialize the commdetectjob."""
+    _debug_('initCommDetectJob(%s)' % (source))
+    if not (source):
+        return (False, "CommDetectClient: no source")
+    try:
+        (status, response) = server.initCommDetectJob(source)
+    except:
+        print "Unexpected error:", sys.exc_info()[0]
+        raise
+        return (False, 'CommDetectClient: connection error')
+    return (status, response)
+    
+def queueIt(idnr, now=False):
+    """
+    Insert the current job in the commdetectqueue
+        If now is true, the commdetect queue is automatically started
+    """
+    if not idnr:
+        return (False, "CommDetectClient: no idnr")
+    try:
+        (status, response) = server.queueIt(idnr, now)
+    except:
+        return (False, 'CommDetectClient: connection error')
+    return (status, response)
+    
+def startQueue():
+    """Start the commdetect queue"""
+    try:
+        (status, response) = server.startQueue()
+    except:
+        return (False, 'CommDetectClient: connection error')
+    
+    return (status, response)
+    
+def listJobs():
+    """
+    Get a list with all jobs in the commdetect queue and their current state
+    """
+    try:
+        (status, response) = server.listJobs()
+    except:
+        return (False, 'CommDetectClient: connection error')
+    return returnFromJelly(status, response)
+
+if __name__ == '__main__':
+    if len(sys.argv) >= 2: 
+        function = sys.argv[1]
+    else:
+        function = 'none'
+
+    from time import sleep
+    
+    if function == "test":
+        (result, response) = connectionTest('connection test')
+        print 'result: %s, response: %s ' % (result, response)
+        print listJobs()
+        
+    if function == "runtest":
+        (status, idnr) = 
initCommDetectJob('/opt/media/tv/01-09_21_00_Dirty_Jobs_-_Bug_Breeder.mpeg')
+        print "Job has idnr nr : %s" % idnr
+        print idnr
+        sleep(5)
+        print queueIt(idnr, True)
+
+'''
+To run this as standalone use the following before running python v4l2.py
+pythonversion=$(python -V 2>&1 | cut -d" " -f2 | cut -d"." -f1-2)
+export PYTHONPATH=/usr/lib/python${pythonversion}/site-packages/freevo
+export FREEVO_SHARE=/usr/share/freevo
+export FREEVO_CONFIG=/usr/share/freevo/freevo_config.py
+export FREEVO_CONTRIB=/usr/share/freevo/contrib
+export RUNAPP=""
+
+python encodingclient.py test
+'''

Modified: branches/rel-1/freevo/src/video/plugins/mplayer.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/mplayer.py  (original)
+++ branches/rel-1/freevo/src/video/plugins/mplayer.py  Fri Jan 12 20:13:00 2007
@@ -199,6 +199,9 @@
                 additional_args += [ '-vf', config.MPLAYER_VF_INTERLACED ]
         elif config.MPLAYER_VF_PROGRESSIVE:
                 additional_args += [ '-vf', config.MPLAYER_VF_PROGRESSIVE ]
+
+        if os.path.isfile(os.path.splitext(item.filename)[0]+'.edl'):
+           additional_args += [ '-edl', 
str(os.path.splitext(item.filename)[0]+'.edl') ]
                 
         mode = item.mimetype
         if not config.MPLAYER_ARGS.has_key(mode):

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to