mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
queue2: add element query function
Add an element query function that is a little more efficient than the generic default query handler.
This commit is contained in:
parent
5fdee7e064
commit
0b1beba01d
1 changed files with 10 additions and 0 deletions
|
@ -225,6 +225,8 @@ static gboolean gst_queue2_handle_sink_event (GstPad * pad, GstEvent * event);
|
|||
|
||||
static gboolean gst_queue2_handle_src_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_queue2_handle_src_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_queue2_handle_query (GstElement * element,
|
||||
GstQuery * query);
|
||||
|
||||
static GstCaps *gst_queue2_getcaps (GstPad * pad);
|
||||
static gboolean gst_queue2_acceptcaps (GstPad * pad, GstCaps * caps);
|
||||
|
@ -347,6 +349,7 @@ gst_queue2_class_init (GstQueue2Class * klass)
|
|||
gobject_class->finalize = gst_queue2_finalize;
|
||||
|
||||
gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_queue2_change_state);
|
||||
gstelement_class->query = GST_DEBUG_FUNCPTR (gst_queue2_handle_query);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2063,6 +2066,13 @@ peer_failed:
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_queue2_handle_query (GstElement * element, GstQuery * query)
|
||||
{
|
||||
/* simply forward to the srcpad query function */
|
||||
return gst_queue2_handle_src_query (GST_QUEUE2_CAST (element)->srcpad, query);
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_queue2_get_range (GstPad * pad, guint64 offset, guint length,
|
||||
GstBuffer ** buffer)
|
||||
|
|
Loading…
Reference in a new issue