[transmageddon] Small fix for audio only transcoding



commit 65cdfdf221202c864980b098b070cb025ecaf2c5
Author: Christian Fredrik Kalager Schaller <christian schaller collabora co uk>
Date:   Tue Aug 9 14:29:49 2011 +0100

    Small fix for audio only transcoding

 src/transcoder_engine.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/transcoder_engine.py b/src/transcoder_engine.py
index a677711..6797c96 100644
--- a/src/transcoder_engine.py
+++ b/src/transcoder_engine.py
@@ -125,13 +125,13 @@ class Transcoder(gobject.GObject):
            self.encodebinprofile = gst.pbutils.EncodingContainerProfile ("containerformat", None , self.containercaps, None)
        if self.audiocaps != False:
            if self.container==False:
-               self.encodebinprofile = gst.pbutils.EncodingAudioProfile (self.audiocaps, None, gst.caps_new_any(), 0)
+               self.encodebinprofile = gst.pbutils.EncodingAudioProfile (self.audiocaps, "Quality Normal", gst.caps_new_any(), 0)
            else:
-               self.audioprofile = gst.pbutils.EncodingAudioProfile (self.audiocaps, None, gst.caps_new_any(), 0)
+               self.audioprofile = gst.pbutils.EncodingAudioProfile (self.audiocaps, "Quality Normal", gst.caps_new_any(), 0)
                self.encodebinprofile.add_profile(self.audioprofile)
        if self.videocaps != "novid":
            if (self.videocaps != False):
-               self.videoprofile = gst.pbutils.EncodingVideoProfile (gst.Caps(self.videocaps), None, gst.caps_new_any(), 0)
+               self.videoprofile = gst.pbutils.EncodingVideoProfile (gst.Caps(self.videocaps), "Quality Normal", gst.caps_new_any(), 0)
                self.encodebinprofile.add_profile(self.videoprofile)
        self.encodebin = gst.element_factory_make ("encodebin", None)
        self.encodebin.set_property("profile", self.encodebinprofile)
@@ -348,7 +348,7 @@ class Transcoder(gobject.GObject):
        else:
            if self.videocaps == "novid":
                c = origin.to_string()
-               if a.startswith("audio/"):
+               if c.startswith("audio/"):
                    sinkpad = self.encodebin.emit("request-pad", origin)
                    d = sinkpad.get_caps().to_string()
                    if d.startswith("audio/"):



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