From 249c4c18d062893f43dd19bd10a6dbe6ef3ad867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 5 Jul 2010 18:54:45 +0200 Subject: [PATCH] basesink: Implement GstElement::get_query_types() --- libs/gst/base/gstbasesink.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 324b0d347a..a4ba27eb37 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -340,6 +340,7 @@ static void gst_base_sink_get_property (GObject * object, guint prop_id, static gboolean gst_base_sink_send_event (GstElement * element, GstEvent * event); static gboolean gst_base_sink_query (GstElement * element, GstQuery * query); +static const GstQueryType *gst_base_sink_get_query_types (GstElement * element); static GstCaps *gst_base_sink_get_caps (GstBaseSink * sink); static gboolean gst_base_sink_set_caps (GstBaseSink * sink, GstCaps * caps); @@ -511,6 +512,8 @@ gst_base_sink_class_init (GstBaseSinkClass * klass) GST_DEBUG_FUNCPTR (gst_base_sink_change_state); gstelement_class->send_event = GST_DEBUG_FUNCPTR (gst_base_sink_send_event); gstelement_class->query = GST_DEBUG_FUNCPTR (gst_base_sink_query); + gstelement_class->get_query_types = + GST_DEBUG_FUNCPTR (gst_base_sink_get_query_types); klass->get_caps = GST_DEBUG_FUNCPTR (gst_base_sink_get_caps); klass->set_caps = GST_DEBUG_FUNCPTR (gst_base_sink_set_caps); @@ -4636,6 +4639,20 @@ gst_base_sink_get_duration (GstBaseSink * basesink, GstFormat format, return res; } +static const GstQueryType * +gst_base_sink_get_query_types (GstElement * element) +{ + static const GstQueryType query_types[] = { + GST_QUERY_DURATION, + GST_QUERY_POSITION, + GST_QUERY_SEGMENT, + GST_QUERY_LATENCY, + 0 + }; + + return query_types; +} + static gboolean gst_base_sink_query (GstElement * element, GstQuery * query) {