diff options
author | Alessandro Decina <alessandro.d@gmail.com> | 2013-09-16 09:55:58 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2013-11-11 16:50:42 +0100 |
commit | 7aec5739eb6cc667afde0db8b69f2f069da5e15e (patch) | |
tree | 5c94768c2dfb4c3e1586c1fafef3f85c3f40ea98 /libs/gst/base/gstcollectpads.h | |
parent | f52b5ddcd2de711c1e095d6b4875566cffcc8244 (diff) | |
download | gstreamer-7aec5739eb6cc667afde0db8b69f2f069da5e15e.tar.gz |
collectpads: implement flushing seek support
Implement common flushing seek logic in GstCollectPads. Add new
API so that elements can opt-in to using the new logic
(gst_collect_pads_src_event_default) and can extend it
(gst_collect_pads_set_flush_function) to flush any internal
state.
See https://bugzilla.gnome.org/show_bug.cgi?id=706779 and
https://bugzilla.gnome.org/show_bug.cgi?id=706441 for the
background discussion.
API: gst_collect_pads_set_flush_function()
API: gst_collect_pads_src_event_default()
https://bugzilla.gnome.org/show_bug.cgi?id=708416
Diffstat (limited to 'libs/gst/base/gstcollectpads.h')
-rw-r--r-- | libs/gst/base/gstcollectpads.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/gst/base/gstcollectpads.h b/libs/gst/base/gstcollectpads.h index 4c99d58156..8d8128cc61 100644 --- a/libs/gst/base/gstcollectpads.h +++ b/libs/gst/base/gstcollectpads.h @@ -236,6 +236,23 @@ typedef GstFlowReturn (*GstCollectPadsClipFunction) (GstCollectPads *pads, GstCo GstBuffer *inbuffer, GstBuffer **outbuffer, gpointer user_data); + +/** + * GstCollectPadsFlushFunction: + * @pads: a #GstCollectPads + * @user_data: user data + * + * A function that will be called while processing a flushing seek event. + * + * The function should flush any internal state of the element and the state of + * all the pads. It should clear only the state not directly managed by the + * @pads object. It is therefore not necessary to call + * gst_collect_pads_set_flushing nor gst_collect_pads_clear from this function. + * + * Since: FIXME + */ +typedef void (*GstCollectPadsFlushFunction) (GstCollectPads *pads, gpointer user_data); + /** * GST_COLLECT_PADS_GET_STREAM_LOCK: * @pads: a #GstCollectPads @@ -311,6 +328,9 @@ void gst_collect_pads_set_compare_function (GstCollectPads *pads, void gst_collect_pads_set_clip_function (GstCollectPads *pads, GstCollectPadsClipFunction clipfunc, gpointer user_data); +void gst_collect_pads_set_flush_function (GstCollectPads *pads, + GstCollectPadsFlushFunction func, + gpointer user_data); /* pad management */ GstCollectData* gst_collect_pads_add_pad (GstCollectPads *pads, GstPad *pad, guint size, @@ -349,6 +369,8 @@ GstFlowReturn gst_collect_pads_clip_running_time (GstCollectPads * pads, /* default handlers */ gboolean gst_collect_pads_event_default (GstCollectPads * pads, GstCollectData * data, GstEvent * event, gboolean discard); +gboolean gst_collect_pads_src_event_default (GstCollectPads * pads, GstPad * pad, + GstEvent * event); gboolean gst_collect_pads_query_default (GstCollectPads * pads, GstCollectData * data, GstQuery * query, gboolean discard); |