[transmageddon] Put back audiocaps settings that somehow got lost along the way
- From: Christian Fredrik Kalager Schaller <uraeus src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [transmageddon] Put back audiocaps settings that somehow got lost along the way
- Date: Wed, 14 Oct 2009 14:09:15 +0000 (UTC)
commit de64950b6d2f0eac63d25a82ae9bd0a2aed19be7
Author: Christian F.K. Schaller <christian schaller collabora co uk>
Date: Wed Oct 14 15:08:41 2009 +0100
Put back audiocaps settings that somehow got lost along the way
src/transcoder_engine.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/transcoder_engine.py b/src/transcoder_engine.py
index 2d70c8e..1008064 100644
--- a/src/transcoder_engine.py
+++ b/src/transcoder_engine.py
@@ -71,6 +71,7 @@ class Transcoder(gobject.GObject):
self.fratenum = FRATENUM
self.frateden = FRATEDEN
self.achannels = ACHANNELS
+ print "transcoder_engine achannels is " + str(self.achannels)
self.blackborderflag = False
self.multipass = MULTIPASS
self.passcounter = PASSCOUNTER
@@ -176,6 +177,7 @@ class Transcoder(gobject.GObject):
# calculate number of channels
chanmin, chanmax = preset.acodec.channels
+ print "chanmin, chanmax is " + str(chanmin) + " " + str(chanmax)
if int(self.achannels) < int(chanmax):
if int(self.achannels) > int(chanmin):
self.channels = int(self.achannels)
@@ -183,7 +185,7 @@ class Transcoder(gobject.GObject):
self.channels = int(chanmin)
else:
self.channels = int(chanmax)
-
+ print "final self.channels is " + str(self.channels)
# Check if rescaling is needed and calculate new video width/height keeping aspect ratio
# Also add black borders if needed
wmin, wmax = preset.vcodec.width
@@ -348,6 +350,11 @@ class Transcoder(gobject.GObject):
self.acaps = gst.Caps()
self.acaps.append_structure(gst.Structure("audio/x-raw-float"))
self.acaps.append_structure(gst.Structure("audio/x-raw-int"))
+ for acap in self.acaps:
+ acap["rate"] = self.samplerate
+ acap["channels"] = self.channels
+
+ print "caps is " + str(self.acaps)
self.acapsfilter = gst.element_factory_make("capsfilter")
self.acapsfilter.set_property("caps", self.acaps)
self.pipeline.add(self.acapsfilter)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]