[pitivi: 15/16] Included the audio depth to the audio caps created in ExportSettings.
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 15/16] Included the audio depth to the audio caps created in ExportSettings.
- Date: Tue, 7 Jun 2011 16:28:00 +0000 (UTC)
commit 7c58fa57400eaa69a02cec078f9ce04e94fd2334
Author: Alex BÄ?luÈ? <alexandru balut gmail com>
Date: Tue Jun 7 17:20:24 2011 +0200
Included the audio depth to the audio caps created in ExportSettings.
pitivi/settings.py | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/pitivi/settings.py b/pitivi/settings.py
index b2c5670..709ea01 100644
--- a/pitivi/settings.py
+++ b/pitivi/settings.py
@@ -530,24 +530,25 @@ class ExportSettings(Signallable, Loggable):
def getVideoCaps(self, render=False):
""" Returns the GstCaps corresponding to the video settings """
videowidth, videoheight = self.getVideoWidthAndHeight(render=render)
- astr = "width=%d,height=%d,pixel-aspect-ratio=%d/%d,framerate=%d/%d" % (
+ vstr = "width=%d,height=%d,pixel-aspect-ratio=%d/%d,framerate=%d/%d" % (
videowidth, videoheight,
self.videopar.num, self.videopar.denom,
self.videorate.num, self.videorate.denom)
- vcaps = gst.caps_from_string("video/x-raw-yuv,%s;video/x-raw-rgb,%s" % (astr, astr))
+ caps_str = "video/x-raw-yuv,%s;video/x-raw-rgb,%s" % (vstr, vstr)
+ video_caps = gst.caps_from_string(caps_str)
if self.vencoder:
- return get_compatible_sink_caps(self.vencoder, vcaps)
- return vcaps
+ return get_compatible_sink_caps(self.vencoder, video_caps)
+ return video_caps
def getAudioCaps(self):
""" Returns the GstCaps corresponding to the audio settings """
- astr = "rate=%d,channels=%d" % (self.audiorate, self.audiochannels)
- astrcaps = gst.caps_from_string("audio/x-raw-int,%s;audio/x-raw-float,%s" % (astr, astr))
+ astr = "rate=%d,channels=%d,depth=%d" % (
+ self.audiorate, self.audiochannels, self.audiodepth)
+ caps_str = "audio/x-raw-int,%s;audio/x-raw-float,%s" % (astr, astr)
+ audio_caps = gst.caps_from_string(caps_str)
if self.aencoder:
- return get_compatible_sink_caps(self.aencoder, astrcaps)
- return astrcaps
-
- # interset with current audioencoder sink pad caps
+ return get_compatible_sink_caps(self.aencoder, audio_caps)
+ return audio_caps
def setVideoProperties(self, width=-1, height=-1, framerate=-1, par=-1,
render_scale=-1):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]