[pitivi] When ghosting pads with negotiaged caps, set the caps to the ghosts.
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] When ghosting pads with negotiaged caps, set the caps to the ghosts.
- Date: Wed, 12 Aug 2009 14:21:08 +0000 (UTC)
commit df05598cb2d92993004f78a1a1ee0deb2057acf5
Author: Alessandro Decina <alessandro d gmail com>
Date: Tue Aug 11 21:18:50 2009 +0200
When ghosting pads with negotiaged caps, set the caps to the ghosts.
pitivi/factories/base.py | 3 +++
pitivi/factories/file.py | 2 ++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/factories/base.py b/pitivi/factories/base.py
index 0784b2f..2980fc6 100644
--- a/pitivi/factories/base.py
+++ b/pitivi/factories/base.py
@@ -364,6 +364,9 @@ class SourceFactory(ObjectFactory):
topbin.ghostpad = gst.GhostPad("src", topbin.volume.get_pad("src"))
else:
topbin.ghostpad = gst.GhostPad("src", pad)
+
+ if pad.props.caps is not None:
+ topbin.ghostpad.set_caps(pad.props.caps)
topbin.ghostpad.set_active(True)
topbin.add_pad(topbin.ghostpad)
diff --git a/pitivi/factories/file.py b/pitivi/factories/file.py
index 675050e..3db5675 100644
--- a/pitivi/factories/file.py
+++ b/pitivi/factories/file.py
@@ -102,6 +102,8 @@ class PictureFileSourceFactory(FileSourceFactory):
pad.link(scale.get_pad("sink"))
ghost = gst.GhostPad("src", freeze.get_pad("src"))
ghost.set_active(True)
+ if pad.props.caps is not None:
+ ghost.set_caps(pad.props.caps)
container.add_pad(ghost)
def _dbinPadRemovedCb(self, unused_dbin, pad, scale, freeze, container):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]