diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-10-16 11:12:38 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-10-16 11:23:13 +0200 |
commit | 3f3473772f12bdf598bc655201baaa237db5b90d (patch) | |
tree | 9a7766a03f2f4015eeda5345c00b5fbe42632640 /docs | |
parent | 73b2a3dd66adfb4e63502afd9d6ca9e01e0edfdd (diff) |
pwg: fix event function
Diffstat (limited to 'docs')
-rw-r--r-- | docs/pwg/building-eventfn.xml | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/docs/pwg/building-eventfn.xml b/docs/pwg/building-eventfn.xml index 51836effb..b72e376bf 100644 --- a/docs/pwg/building-eventfn.xml +++ b/docs/pwg/building-eventfn.xml @@ -13,18 +13,11 @@ Below follows a very simple event function that we install on the sink pad of our element. </para> - <programlisting><!-- example-begin event.c a --><!-- -#include "init.func" -#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 --> + <programlisting> +<![CDATA[ static gboolean gst_my_filter_sink_event (GstPad *pad, GstObject *parent, - GstBuffer *buf); + GstEvent *event); [..] @@ -34,7 +27,7 @@ gst_my_filter_init (GstMyFilter * filter) [..] /* configure event function on the pad before adding * the pad to the element */ - gst_pad_set_event_function (filter->sinkpad, + gst_pad_set_event_function (filter->sinkpad, gst_my_filter_sink_event); [..] } @@ -67,6 +60,7 @@ gst_my_filter_sink_event (GstPad *pad, } return ret; } +]]> </programlisting> <para> It is a good idea to call the default event handler |