[transmageddon] Small fixes and cleanups to multipass encoding



commit 881d0985a71064e2122aeb139846608343cec75a
Author: Christian Fredrik Kalager Schaller <uraeus linuxrising org>
Date:   Fri Mar 21 11:13:39 2014 +0100

    Small fixes and cleanups to multipass encoding

 src/transcoder_engine.py |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/transcoder_engine.py b/src/transcoder_engine.py
index ef5c9ea..276acf2 100644
--- a/src/transcoder_engine.py
+++ b/src/transcoder_engine.py
@@ -70,8 +70,8 @@ class Transcoder(GObject.GObject):
            videoencoder = Gst.ElementFactory.make(videoencoderplugin,"videoencoder")
            properties=videoencoder.get_property_names()
            if "multipass-cache-file" in properties:
-               self.cachefile = (str (GLib.get_user_cache_dir()) + "/" + \
-                   "multipass-cache-file" + self.streamdata['timestamp'] + ".log")
+               self.cachefile = (str (GLib.get_user_cache_dir()) + "/transmageddon/" + \
+                   "multipass-cache-file" + ".log")
            else:
                self.streamdata['multipass']=0
 
@@ -324,8 +324,10 @@ class Transcoder(GObject.GObject):
        elif mtype == Gst.MessageType.EOS:
            self.usedstreamids=[]
            #removing multipass cache file when done
-           if os.access(self.cachefile, os.F_OK):
-               os.remove(self.cachefile)
+           if (self.streamdata['multipass'] != 0) and (self.streamdata['passcounter'] != 
self.streamdata['multipass']):
+               if os.access(self.cachefile, os.F_OK):
+                   os.remove(self.cachefile)
+                   os.remove(self.cachefile+'.mbtree')
            self.emit('got-eos')
            self.pipeline.set_state(Gst.State.NULL)
        elif mtype == Gst.MessageType.APPLICATION:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]