Commit dd65aae9 authored by Wim Taymans's avatar Wim Taymans

pad: rework sticky events

Rewrite sticky events, trying to make it a bit more simple.
When sticky events are pushed on a srcpad, store them in the sticky event
array and mark the event with received = FALSE.
When the sticky event is successfully sent to the peer pad, make
received = TRUE.
Keep a PENDING_EVENTS pad flag that is set when one of the events is in
the received = FALSE state for some reason.
when activating a sinkpad, mark all events received = FALSE on the peer
srcpad.
When pushing a buffer, check the PENDING_EVENTS flag and if it is set, push all
events to the peer pad first.
parent b7ea5ca1
This diff is collapsed.
......@@ -578,7 +578,7 @@ typedef GstFlowReturn (*GstPadStickyEventsForeachFunction) (GstPad *pad, GstEve
* The flag has to be unset manually after
* reconfiguration happened.
* Since: 0.10.34.
* @GST_PAD_FLAG_NEED_EVENTS: the pad has pending events
* @GST_PAD_FLAG_PENDING_EVENTS: the pad has pending events
* @GST_PAD_FLAG_FIXED_CAPS: the pad is using fixed caps this means that once the
* caps are set on the pad, the caps query function only
* returns those caps.
......@@ -596,7 +596,7 @@ typedef enum {
GST_PAD_FLAG_FLUSHING = (GST_OBJECT_FLAG_LAST << 1),
GST_PAD_FLAG_BLOCKING = (GST_OBJECT_FLAG_LAST << 2),
GST_PAD_FLAG_NEED_RECONFIGURE = (GST_OBJECT_FLAG_LAST << 3),
GST_PAD_FLAG_NEED_EVENTS = (GST_OBJECT_FLAG_LAST << 4),
GST_PAD_FLAG_PENDING_EVENTS = (GST_OBJECT_FLAG_LAST << 4),
GST_PAD_FLAG_FIXED_CAPS = (GST_OBJECT_FLAG_LAST << 5),
GST_PAD_FLAG_PROXY_CAPS = (GST_OBJECT_FLAG_LAST << 6),
GST_PAD_FLAG_NEED_PARENT = (GST_OBJECT_FLAG_LAST << 7),
......@@ -725,7 +725,7 @@ struct _GstPadClass {
#define GST_PAD_UNSET_FLUSHING(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_FLUSHING))
#define GST_PAD_NEEDS_RECONFIGURE(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_NEED_RECONFIGURE))
#define GST_PAD_NEEDS_EVENTS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_NEED_EVENTS))
#define GST_PAD_HAS_PENDING_EVENTS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_PENDING_EVENTS))
#define GST_PAD_IS_FIXED_CAPS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_FIXED_CAPS))
#define GST_PAD_NEEDS_PARENT(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_NEED_PARENT))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment