mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
pwg: fix event function
This commit is contained in:
parent
73b2a3dd66
commit
3f3473772f
1 changed files with 5 additions and 11 deletions
|
@ -13,18 +13,11 @@
|
||||||
Below follows a very simple event function that we install on the sink
|
Below follows a very simple event function that we install on the sink
|
||||||
pad of our element.
|
pad of our element.
|
||||||
</para>
|
</para>
|
||||||
<programlisting><!-- example-begin event.c a --><!--
|
<programlisting>
|
||||||
#include "init.func"
|
<![CDATA[
|
||||||
#include "caps.func"
|
|
||||||
static gboolean
|
|
||||||
gst_my_filter_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|
||||||
{
|
|
||||||
return gst_pad_event_default (pad, parent, event);
|
|
||||||
}
|
|
||||||
--><!-- example-end event.c a -->
|
|
||||||
static gboolean gst_my_filter_sink_event (GstPad *pad,
|
static gboolean gst_my_filter_sink_event (GstPad *pad,
|
||||||
GstObject *parent,
|
GstObject *parent,
|
||||||
GstBuffer *buf);
|
GstEvent *event);
|
||||||
|
|
||||||
[..]
|
[..]
|
||||||
|
|
||||||
|
@ -34,7 +27,7 @@ gst_my_filter_init (GstMyFilter * filter)
|
||||||
[..]
|
[..]
|
||||||
/* configure event function on the pad before adding
|
/* configure event function on the pad before adding
|
||||||
* the pad to the element */
|
* the pad to the element */
|
||||||
gst_pad_set_event_function (filter->sinkpad,
|
gst_pad_set_event_function (filter->sinkpad,
|
||||||
gst_my_filter_sink_event);
|
gst_my_filter_sink_event);
|
||||||
[..]
|
[..]
|
||||||
}
|
}
|
||||||
|
@ -67,6 +60,7 @@ gst_my_filter_sink_event (GstPad *pad,
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
It is a good idea to call the default event handler
|
It is a good idea to call the default event handler
|
||||||
|
|
Loading…
Reference in a new issue