From 82129244894697cd6d6869f54f3afa79a787c916 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 4 Aug 2009 14:55:06 +0200 Subject: [PATCH] pango: Send queries from the srcpad directly to the video sinkpad --- ext/pango/gsttextoverlay.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ext/pango/gsttextoverlay.c b/ext/pango/gsttextoverlay.c index d05f3d4..49d0b62 100644 --- a/ext/pango/gsttextoverlay.c +++ b/ext/pango/gsttextoverlay.c @@ -292,6 +292,7 @@ static GstCaps *gst_text_overlay_getcaps (GstPad * pad); static gboolean gst_text_overlay_setcaps (GstPad * pad, GstCaps * caps); static gboolean gst_text_overlay_setcaps_txt (GstPad * pad, GstCaps * caps); static gboolean gst_text_overlay_src_event (GstPad * pad, GstEvent * event); +static gboolean gst_text_overlay_src_query (GstPad * pad, GstQuery * query); static gboolean gst_text_overlay_video_event (GstPad * pad, GstEvent * event); static GstFlowReturn gst_text_overlay_video_chain (GstPad * pad, @@ -554,6 +555,8 @@ gst_text_overlay_init (GstTextOverlay * overlay, GstTextOverlayClass * klass) GST_DEBUG_FUNCPTR (gst_text_overlay_getcaps)); gst_pad_set_event_function (overlay->srcpad, GST_DEBUG_FUNCPTR (gst_text_overlay_src_event)); + gst_pad_set_query_function (overlay->srcpad, + GST_DEBUG_FUNCPTR (gst_text_overlay_src_query)); gst_element_add_pad (GST_ELEMENT (overlay), overlay->srcpad); overlay->line_align = DEFAULT_PROP_LINE_ALIGNMENT; @@ -888,6 +891,21 @@ gst_text_overlay_get_property (GObject * object, guint prop_id, } static gboolean +gst_text_overlay_src_query (GstPad * pad, GstQuery * query) +{ + gboolean ret = FALSE; + GstTextOverlay *overlay = NULL; + + overlay = GST_TEXT_OVERLAY (gst_pad_get_parent (pad)); + + ret = gst_pad_peer_query (overlay->video_sinkpad, query); + + gst_object_unref (overlay); + + return ret; +} + +static gboolean gst_text_overlay_src_event (GstPad * pad, GstEvent * event) { gboolean ret = FALSE; -- 2.7.4