mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
assrender: Implement srcpad query function to always forward to the video sinkpad
This commit is contained in:
parent
876cfb3d26
commit
544c9d0151
1 changed files with 17 additions and 0 deletions
|
@ -110,6 +110,8 @@ static gboolean gst_ass_render_event_src (GstPad * pad, GstEvent * event);
|
|||
static GstFlowReturn gst_ass_render_bufferalloc_video (GstPad * pad,
|
||||
guint64 offset, guint size, GstCaps * caps, GstBuffer ** buffer);
|
||||
|
||||
static gboolean gst_ass_render_query_src (GstPad * pad, GstQuery * query);
|
||||
|
||||
static void
|
||||
gst_ass_render_base_init (gpointer gclass)
|
||||
{
|
||||
|
@ -211,6 +213,9 @@ gst_ass_render_init (GstAssRender * render, GstAssRenderClass * gclass)
|
|||
gst_pad_set_bufferalloc_function (render->video_sinkpad,
|
||||
GST_DEBUG_FUNCPTR (gst_ass_render_bufferalloc_video));
|
||||
|
||||
gst_pad_set_query_function (render->srcpad,
|
||||
GST_DEBUG_FUNCPTR (gst_ass_render_query_src));
|
||||
|
||||
gst_element_add_pad (GST_ELEMENT (render), render->srcpad);
|
||||
gst_element_add_pad (GST_ELEMENT (render), render->video_sinkpad);
|
||||
gst_element_add_pad (GST_ELEMENT (render), render->text_sinkpad);
|
||||
|
@ -360,6 +365,18 @@ gst_ass_render_change_state (GstElement * element, GstStateChange transition)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_ass_render_query_src (GstPad * pad, GstQuery * query)
|
||||
{
|
||||
GstAssRender *render = GST_ASS_RENDER (gst_pad_get_parent (pad));
|
||||
gboolean ret;
|
||||
|
||||
ret = gst_pad_peer_query (render->video_sinkpad, query);
|
||||
|
||||
gst_object_unref (render);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_ass_render_event_src (GstPad * pad, GstEvent * event)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue