summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2007-04-10 18:01:25 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2007-04-10 18:01:25 +0000
commitd3a4c03c2b578b7fd63b259ad0967731f2c1cc16 (patch)
treede0d6e5f0bde852c28581f491d18cefb25a6626e /examples
parent4ecf760ec1e993d6337cd97fe0169970ccacbe8b (diff)
Implement pad query proxying so that python elements can answer pad queries. Fixes: #428299
Original commit message from CVS: * examples/pyidentity.py: * gst/common.h: * gst/gstpad.override: Implement pad query proxying so that python elements can answer pad queries. Fixes: #428299
Diffstat (limited to 'examples')
-rw-r--r--examples/pyidentity.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/pyidentity.py b/examples/pyidentity.py
index e864892..184c8c5 100644
--- a/examples/pyidentity.py
+++ b/examples/pyidentity.py
@@ -32,6 +32,7 @@ class PyIdentity(gst.Element):
self.srcpad = gst.Pad(self._srcpadtemplate, "src")
self.srcpad.set_event_function(self.srceventfunc)
+ self.srcpad.set_query_function(self.srcqueryfunc)
self.srcpad.set_getcaps_function(gst.Pad.proxy_getcaps)
self.srcpad.set_setcaps_function(gst.Pad.proxy_setcaps)
self.add_pad (self.srcpad)
@@ -43,6 +44,8 @@ class PyIdentity(gst.Element):
def eventfunc(self, pad, event):
return self.srcpad.push_event (event)
+ def srcqueryfunc (self, pad, query):
+ return self.sinkpad.query (query)
def srceventfunc (self, pad, event):
return self.sinkpad.push_event (event)