diff options
author | David Schleef <ds@schleef.org> | 2012-03-17 11:45:39 -0700 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2012-03-17 12:18:47 -0700 |
commit | b45c206647f669d60c6e23cb03acb1c14882b9a3 (patch) | |
tree | fb70f98ecc51e1ddbbef69a6067d06ddd6837df1 /tools | |
parent | 67f546968c22487b769149dddfb3d11de45acbe3 (diff) | |
download | gstreamer-plugins-bad-b45c206647f669d60c6e23cb03acb1c14882b9a3.tar.gz |
element-templates: chain query/event functions
Chain up to parent class. This fix should be done to all of the
templates.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/element-templates/basesrc | 16 | ||||
-rw-r--r-- | tools/element-templates/element | 12 |
2 files changed, 25 insertions, 3 deletions
diff --git a/tools/element-templates/basesrc b/tools/element-templates/basesrc index 0b7e56fc1..1be325a22 100644 --- a/tools/element-templates/basesrc +++ b/tools/element-templates/basesrc @@ -161,10 +161,16 @@ static gboolean gst_replace_event (GstBaseSrc * src, GstEvent * event) { GstReplace *replace = GST_REPLACE (src); + gboolean ret; GST_DEBUG_OBJECT (replace, "event"); - return TRUE; + switch (GST_EVENT_TYPE (event)) { + default: + ret = GST_BASE_SRC_CLASS (parent_class)->event (src, event); + } + + return ret; } static GstFlowReturn @@ -192,10 +198,16 @@ static gboolean gst_replace_query (GstBaseSrc * src, GstQuery * query) { GstReplace *replace = GST_REPLACE (src); + gboolean ret; GST_DEBUG_OBJECT (replace, "query"); - return TRUE; + switch (GST_QUERY_TYPE (query)) { + default: + ret = GST_BASE_SRC_CLASS (parent_class)->query (src, query); + } + + return ret; } static gboolean diff --git a/tools/element-templates/element b/tools/element-templates/element index ed025ee2b..f0d76ebc3 100644 --- a/tools/element-templates/element +++ b/tools/element-templates/element @@ -123,7 +123,17 @@ gst_replace_send_event (GstElement * element, GstEvent * event) static gboolean gst_replace_query (GstElement * element, GstQuery * query) { + GstReplace *replace = GST_REPLACE (element); + gboolean ret; - return FALSE; + GST_DEBUG_OBJECT (replace, "query"); + + switch (GST_QUERY_TYPE (query)) { + default: + ret = GST_ELEMENT_CLASS (parent_class)->query (element, query); + break; + } + + return ret; } % end |