basesink: Implement GstElement::get_query_types()

This commit is contained in:
Sebastian Dröge 2010-07-05 18:54:45 +02:00
parent b2e7c4bd45
commit 249c4c18d0

View file

@ -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)
{