Commit graph

1072 commits

Author SHA1 Message Date
Stefan Sauer
46ea9729df tracer: split into tracer and tracerutils
Keep tracer base class in tracer and move core support into the utils module.
Add a unstable-api guard to the tracer.h so that external modules would need to
acknowledge the status by setting GST_USE_UNSTABLE_API.
2015-10-05 20:59:39 +02:00
Stefan Sauer
ce7ce2d866 tracer: add more hooks and handle it in the plugins 2015-10-05 20:59:39 +02:00
Stefan Sauer
e08fab7d5f tracer: use macros for hooks
Wrap the hook with a pre and post macro. This looks less intrusive than the
previous version, although it is a little less optimized.
2015-10-05 20:59:39 +02:00
Stefan Sauer
9d3975b5da tracer: pass the timestamp directly
Avoid the structure mashalling (and weird field naming).
2015-10-05 20:59:39 +02:00
Stefan Sauer
764b5833b9 tracer: switch to quarks and add another hook for buffer flow
Use pre-defines quarks as this will be called quite often.
2015-10-05 20:59:39 +02:00
Stefan Sauer
4e5d586c7d tracer: initial prototype for the tracing subsystem 2015-10-05 20:59:39 +02:00
Thiago Santos
4b5e79cd18 pad: don't fallback to caps queries with proxy pads
A proxy-pad should always proxy the caps related queries
and events to its down or upstream peers on the other side
of the element. Falling back to a caps query seems wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=754112
2015-09-26 07:13:45 -03:00
Sebastian Dröge
1176fbf6dc pad: Break sticky event array iterations if the type is bigger than the one we look for
Microoptimization we can do because the array is sorted by type.
2015-08-15 17:59:21 +02:00
Edward Hervey
7f0e0ff3ca gstpad: Add a new GST_PROBE_HANDLED return value for probes
In some cases, probes might want to handle the buffer/event/query
themselves and stop the data from travelling further downstream.

While this was somewhat possible with buffer/events and using
GST_PROBE_DROP, it was not applicable to queries, and would result
in the query failing.

With this new GST_PROBE_HANDLED value, the buffer/event/query will
be considered as successfully handled, will not be pushed further
and the appropriate return value (TRUE or GST_FLOW_OK) will be returned

This also allows probes to return a non-default GstFlowReturn when dealing
with buffer push. This can be done by setting the
GST_PAD_PROBE_INFO_FLOW_RETURN() field accordingly

https://bugzilla.gnome.org/show_bug.cgi?id=748643
2015-08-15 17:00:12 +02:00
Thiago Santos
b76ecfd992 pad: add GST_PAD_FLAG_ACCEPT_TEMPLATE
It will make the default accept-caps handler use the pad template
caps instead of the query-caps result to check if the caps is
acceptable. This is aligned with what the design docs says the
accept-caps should do (be non-recursive) and should be faster. It
is *not* enabled by default, though.

API: GST_PAD_FLAG_ACCEPT_TEMPLATE
API: GST_PAD_IS_ACCEPT_TEMPLATE
API: GST_PAD_SET_ACCEPT_TEMPLATE
API: GST_PAD_UNSET_ACCEPT_TEMPLATE

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 08:56:53 -03:00
Edward Hervey
2ef06fd39d pad: Fix previous commit
We want to get the caps query *result*
2015-08-08 15:29:30 +02:00
Edward Hervey
2499349d94 pad: get_allowed_caps() should go through both pads
The previous implementation was doing a direct call to the peer pad,
which resulted in query probes never being called on the original pad.

Instead of that, get the peer pad caps by using gst_pad_peer_query()
which will call probes in the expected fashion.
2015-08-08 14:51:59 +02:00
George Kiagiadakis
794a08d7e9 pad: fix invalid unref after IDLE probe on non-OK flow return
In case there is an IDLE probe fired from gst_pad_push_data and it
doesn't return GST_FLOW_OK, the code jumps to the probe_stopped
label which tries to unref the data object. However, at this point
the data object belongs downstream and must not be touched.
By setting data = NULL, the code skips this unref.

https://bugzilla.gnome.org//show_bug.cgi?id=753151
2015-08-04 11:10:45 +01:00
Olivier Crête
f126094dce pad: Enforce NEED_PARENT flag also for chain
The check for the presence of the parent in the presence of
the NEED_PARENT flag was missing for the chain function. Also keep
a ref on the parent in case the pad is removed mid-chain.
2015-07-03 12:56:01 -04:00
Song Bing
5109173abf pad: Clear EOS flag after received STREAM_START event
Clear EOS flag after received STREAM_START event

https://bugzilla.gnome.org/show_bug.cgi?id=750761
2015-06-23 10:35:46 +02:00
Vincent Penquerc'h
d0c3e33bbe pad: bump chain function call logs from LOG to DEBUG
They're really useful compared to other LOG stuff in there, so
there is value is including them and not the rest.
2015-05-15 14:57:14 +01:00
Thiago Santos
3d8de8a4f9 pad: block data flow when idle probe is running
When idle probe runs directly from the gst_pad_add_probe() function
we need to make sure that no data flow happens as idle probe
is a blocking probe. The idle probe will prevent that any
buffer, bufferlist or serialized events and queries are not
flowing while it is running.

https://bugzilla.gnome.org/show_bug.cgi?id=747852
2015-04-16 10:09:29 -03:00
Sebastian Dröge
36f7b13658 pad: Print debug output from gst_pad_link_full() if preparing linking failed
Makes it easier to find linking failures in debug logs.
2015-04-04 18:33:50 -07:00
Tim-Philipp Müller
5deb4f658e pad: allow probes to remove the data item whilst returning PROBE_OK
Use case: we want to block the source pad of a leaky queue and
drop the buffer that causes the block. If we return PROBE_DROP
then the buffer gets dropped, but we get called again. If we
return PROBE_OK we can't easily drop the buffer. If we just
replace the item into the GstPadProbeInfo structure with NULL,
GStreamer will push a NULL buffer to the next element when we
unblock the pad probe. This patch ensures it doesn't do that.

https://bugzilla.gnome.org/show_bug.cgi?id=734342
2015-04-03 00:07:26 +01:00
Wonchul Lee
ca380d16a0 pad: Fix a typo in a docstring
https://bugzilla.gnome.org/show_bug.cgi?id=747119
2015-03-31 19:28:51 +01:00
Tim-Philipp Müller
eb2d1f5b96 pad: fix outdated debug message
Buffer lists don't have groups any more in 1.0
2015-03-28 14:47:45 +00:00
Arun Raghavan
be36d34aee pad: Don't fail latency query on unlinked pads
A single unlinked pad can make the latency query fail across the
pipeline, which is probably not desirable. Instead, we return a default
anything goes value.

Perhaps we should also be emitting a gst_message_new_latency() when a
PLAYING element has one of its pads linked.

https://bugzilla.gnome.org/show_bug.cgi?id=745197
2015-02-26 15:57:26 +05:30
Sebastian Dröge
6f9adbe273 pad: If the latency query fails for one of the pads, it fails overall 2015-02-19 01:12:49 +02:00
Sebastian Dröge
9107a5e041 pad: Only initialize GValue to a type once, not on every retry
Otherwise we'll get warnings like this:
cannot initialize GValue with type 'gboolean', the value has already been initialized as 'gboolean'
2015-02-16 11:35:41 +02:00
Sebastian Dröge
ae0b12b109 pad: gst_pad_iterate_internal_links() can return NULL if there are none 2015-02-12 14:03:15 +02:00
Sebastian Dröge
5141641dc8 pad: Return NULL instead of FALSE for pointers 2015-02-12 14:03:03 +02:00
Sebastian Dröge
1937d09a95 pad: Implement more useful default handling for the LATENCY query
Before we just took the values from the first pad that succeded the query,
now we accumulate the results of every sinkpad properly and return that
result.
2015-02-12 13:55:36 +02:00
Tim-Philipp Müller
08167e3234 pad: add "offset" property to go with gst_pad_set_offset()
So we can set the offset via gst-launch.
2015-02-05 13:49:47 +00:00
Jan Schmidt
ae2b0bacb6 gstpad: Fix a typo in a docstring. 2015-02-02 17:38:00 +11:00
Edward Hervey
a6373625f3 gstpad: Inline apply_pad_offset()
Avoid doing a function call for something which will mostly be unused
2015-01-21 14:13:15 +01:00
Edward Hervey
64b451c170 gstpad: Fix debug message 2015-01-21 14:13:15 +01:00
Edward Hervey
93f540bb62 gstpad: Fix PROBE_NO_DATA macro
The problem was that the macro was always used with 'ret' as the defaultval
argument.

This would result in the macro eventually expanding to
    if (G_UNLIKELY (ret != ret && ret != GST_FLOW_OK))

... ret != ret will always fail, and therefore we'd never call the
following line.

Instead of that, store the previous value locally for comparision
2015-01-21 14:11:41 +01:00
Vincent Penquerc'h
d4c551a292 pad: fail dropped queries
Previously, dropping a query from a pad probe would deem the
query succeeded, and the caller might then assume the query's
results are valid, and thus dereference an invalid object
such as a GstCaps.

We now assume dropped queries did not succeed. Dropped events
and buffers are still deemed a success.

Added back after previous revert, as it's been double checked.

https://bugzilla.gnome.org/show_bug.cgi?id=740003
2014-11-12 14:05:19 +00:00
Vincent Penquerc'h
1b06822ce3 Revert "pad: fail dropped queries"
This was pushed by mistake along with an unrelated patch.

This reverts commit c7103ce4b8.
2014-11-12 13:55:23 +00:00
Vincent Penquerc'h
c7103ce4b8 pad: fail dropped queries
Previously, dropping a query from a pad probe would deem the
query succeeded, and the caller might then assume the query's
results are valid, and thus dereference an invalid object
such as a GstCaps.

We now assume dropped queries did not succeed. Dropped events
and buffers are still deemed a success.
2014-11-12 11:04:21 +00:00
Sebastian Dröge
126c511e62 pad: Make sure the buffer to get/pull_range() has at least the requested size
https://bugzilla.gnome.org/show_bug.cgi?id=735861
2014-09-12 15:22:19 +03:00
Wim Taymans
060b16ac75 pad: don't accept flush-stop on inactive pads
Inactive pads should at all times have the flushing flag set. This means
that when we get a flush-stop on an inactive pad we must ignore it.

On sinkpads, make this more explicit. We used to not clear the flush
flag but remove the events and then return an error because the flushing
flag was set. Now just simply refuse the event without doing anything.

On srcpads, check that we are trying to push a flush-stop event and
refuse it. We would allow this and mark the srcpad as non-flushing
anymore.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=735357
2014-09-02 12:04:15 +02:00
Arun Raghavan
d3e411bda4 docs: Trivial pad documentation fix
Presumably a copy-pasto.
2014-08-12 20:04:11 +05:30
Göran Jönsson
d0a808cdc8 pad: Don't unlock while iterating over all sticky events for removal
Otherwise we might end up getting the event removed from elsewhere
at the same time while we're unlocked for g_object_notify().

https://bugzilla.gnome.org/show_bug.cgi?id=732556
2014-07-01 19:26:18 +02:00
Evan Nemerson
4088363aea introspection: add some missing allow-none annotations to in params
https://bugzilla.gnome.org/show_bug.cgi?id=730957
2014-06-26 19:00:58 +02:00
Evan Nemerson
2759882379 introspection: add missing (nullable) annotations to return values
Support for (nullable) was added to G-I at the same time as nullable
return values.  Previous versions of G-I will not mark return values as
nullable, even when an (allow-none) annotation is present, so it is
not necessary to add (allow-none) annotations for compatibility with
older versions of G-I.

https://bugzilla.gnome.org/show_bug.cgi?id=730957
2014-06-26 18:56:38 +02:00
Evan Nemerson
e10266e3f3 docs: convert NULL, TRUE, and FALSE to %NULL, %TRUE, and %FALSE
This should help improve documentation generated for
languages other than C.

https://bugzilla.gnome.org/show_bug.cgi?id=730961
2014-05-30 00:20:27 +01:00
Tim-Philipp Müller
ba3073ffce pad: two minor docs fixes 2014-05-27 13:37:05 +01:00
Thiago Santos
c6f92562b6 pad: store last flow return and provide acessor function
Stores the last result of a gst_pad_push or a pull on the GstPad and provides
a getter and a macro to access this field.

Whenever the pad is inactive it is set to FLUSHING

API: gst_pad_get_last_flow_return

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 15:29:53 -03:00
Tim-Philipp Müller
6eb6d9ec38 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 21:21:51 +01:00
Sebastian Dröge
dabb959747 pad: Add missing space in debug output 2014-04-15 21:16:06 +02:00
Linus Svensson
cb554772e5 pad: don't access unowned and possibly already freed event
Don't print the name of the event when ownership is given away.

https://bugzilla.gnome.org/show_bug.cgi?id=727484
2014-04-12 11:44:36 +01:00
Sebastian Dröge
42cbb7c7c7 pad: Apply pad offsets on all events, not just segment events 2014-04-10 08:25:50 +02:00
Sebastian Dröge
04a204cd4c pad: Include event type in debug output when delaying a sticky event because of not-linked 2014-03-29 10:32:25 +01:00
Tim-Philipp Müller
075cc42f88 pad: simplify gst_pad_link_get_name() and fix Since marker
Has added benefit that compiler might warn if more values
are added to the enum.
2014-03-11 21:46:30 +00:00
Stefan Sauer
4a38acaa10 pad: add debug helper for GstPadLinkReturn names
Add a helper like gst_flow_get_name() for GstPadLinkReturn. Use this in core.
API: gst_pad_link_get_name()
2014-03-11 21:50:36 +01:00
Stefan Sauer
7077d347a3 pad: fix gst_pad_add_probe() return value docs
Also fix comment typos and add more detail in the logs.
2014-03-06 22:54:17 +01:00
Brendan Long
f605472230 docs: gst_pad_new_from_*_template and gst_buffer_pool_new constructors return floating references
https://bugzilla.gnome.org/show_bug.cgi?id=710342
2014-02-06 22:50:53 +01:00
Sebastian Dröge
ba7089cf04 pad: Minor code cleanup
!check_sticky()==GST_FLOW_OK is a bit confusing, compared to
check_sticky()!=GST_FLOW_OK.
2014-01-22 11:10:01 +01:00
Thiago Santos
75fe1004a5 pad: fix sticky event leak after sticky_events_foreach
events_foreach adds an extra ref when giving the event to the
user function. In case it was unrefed by the user, this extra ref
disappeared, but events_foreach still should unref again to
lose its own ref before removing the event from the array.

https://bugzilla.gnome.org/show_bug.cgi?id=722467
2014-01-17 23:11:49 -03:00
Wim Taymans
6d3fc584d5 pad: use new segment offset method to apply the offset
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=721422
2014-01-08 15:04:00 +01:00
Sebastian Dröge
93ce90f833 pad: Check if new probes need to be called when adding/removing some
This allows blocking a pad, add a new blocking probe, removing
the first probe and then having the second probe called. Which
could then decide that data-flow should actually continue
instead of blocking now.

https://bugzilla.gnome.org/show_bug.cgi?id=721289
2014-01-02 13:33:20 +01:00
Sebastian Dröge
d04c8b6d2e pad: Keep an extra ref of the pad when calling an IDLE probe immediately
The callback might destroy the pad.
2013-12-30 19:03:22 +01:00
Sebastian Dröge
0324358ebc pad: Only call IDLE probes if we are actually idle
Also only check the data types for non-IDLE probes. When we
are idle, we have no data type obviously.

Previously we were calling IDLE probes during data flow whenever
a non-blocking probe would be called. The pad was usually not idle
at that time.
2013-12-30 18:53:36 +01:00
Sebastian Dröge
901cd5560c pad: Don't ignore probe callback return value when immediately calling IDLE probe
https://bugzilla.gnome.org/show_bug.cgi?id=721096
2013-12-30 10:53:09 +01:00
Sebastian Rasmussen
53ae1b2c9c docs: Fix typos in function/object descriptions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:11:12 +00:00
Sebastian Rasmussen
e8ecf3c407 Fix some typos in code comments and debug messages
https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:09:39 +00:00
Wim Taymans
34db352879 pad: add ACCEPT_INTERCEPT flag
Make a new flag on the pad that tweaks the default behaviour of the
accept-caps function. By default it will check for a subset of the
query-caps result but this is not always desirable. The query-caps
result contains all the constraints to make a good caps decision
upstream but sometimes, like for parsers, not all the constrained caps
fields are known upstream and then a subset check would fail. Switching
to an intersection makes this work again.

See https://bugzilla.gnome.org/show_bug.cgi?id=705024
    https://bugzilla.gnome.org/show_bug.cgi?id=677401
2013-12-03 22:28:09 +01:00
Sebastian Rasmussen
b40fa2b8c3 docs: cosmetic changes in references/decriptions
* fix typo GstBufferFlag -> GstBufferFlags
 * fix typo GstFeatures -> GstCapsFeatures
 * fix typo GstAllocatorParams -> GstAllocationParams
 * fix typo GstContrlSources -> GstControlSource
 * do not refer to gstcheck as an object
 * make references gtk_init() and tcase_set_timeout() not be references
 * gst_element_get_pad() renamed gst_element_get_static_pad()
 * gst_clock_id_wait_async_full() renamed gst_clock_id_wait_async()
 * _drop_element() is really gst_queue_array_drop_element()
 * gst_pad_accept_caps() was removed, do not refer to it
 * separate GST_META_TAG_MEMORY_STR declaration from description
 * do not describe removed gst_collect_pads_collect()
 * correctly link to GstElementClass' virtual set_context()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=719614
2013-12-02 21:01:08 +00:00
Wim Taymans
62b7d17c2e pad: only check event order when something changed
Check the event order in dataflow only when something changed instead
of for each buffer.
2013-09-26 11:32:50 +02:00
Sebastian Dröge
c279bdb663 pad: A newly activated pad should be marked as needing reconfiguration 2013-07-15 11:36:44 +02:00
Sebastian Dröge
942d905e19 Revert "pad: Don't consider flushing pads as needing reconfiguration"
This reverts commit 948a9d2f2b.

This is racy and trying to reconfigure and fail is still better
than not trying to reconfigure at all.

https://bugzilla.gnome.org/show_bug.cgi?id=704100
2013-07-15 11:32:54 +02:00
Nicolas Dufresne
4656d18fd5 Add few missing allow-none annotation 2013-07-03 14:25:07 -04:00
Sebastian Dröge
948a9d2f2b pad: Don't consider flushing pads as needing reconfiguration
Renegotiation and reconfiguration will fail because all queries
and events won't be accepted by the pad if it's flushing. In the
best case this just causes unneeded work and spurious warnings in
the debug logs, in the worst case it causes elements to fail completely.
2013-06-30 18:40:47 +02:00
Sjoerd Simons
1815e6067a pad: Add a filter to the caps_query done by acceptcaps
Use the caps that the pad is asked to accept as filter for the query

https://bugzilla.gnome.org/show_bug.cgi?id=702632
2013-06-19 15:12:18 +02:00
Sebastian Dröge
73895c05b1 pad: Store sticky events even if the pad is flushing
But do this only for events that are not dropped by flushing,
i.e. do it only for everything except SEGMENT and EOS.

Without this we might drop a CAPS event if flushing happens
at an unfortunate time and nobody is resending the CAPS event.

https://bugzilla.gnome.org/show_bug.cgi?id=700806
2013-05-27 12:40:50 +02:00
Sebastian Dröge
3d44f542ed pad: Only check if we get buffers before stream-start/segment if compiling without G_DISABLE_ASSERT
In releases this is set usually.
2013-05-10 16:03:34 +02:00
Sebastian Dröge
d500ffc300 pad: Fix uninitialized variable compiler warning 2013-05-09 17:55:21 +02:00
Sebastian Dröge
1b87f0c36a pad: Make sure pending, older sticky events are sent downstream in dynamic linking scenarios
If a pad block was triggered from sending a sticky event downstream, it
could happen that the pad block is relinking pads, which then requires
to resend previous sticky events.
2013-05-09 17:55:21 +02:00
Sebastian Dröge
8bedcf450f pad: Warn if data flow happens before stream-start or segment event 2013-05-09 11:05:50 +02:00
Sebastian Dröge
430285b5c8 pad: Only let gst_pad_sticky_events_foreach() iterate over existing events 2013-05-09 10:59:41 +02:00
Sebastian Dröge
e0f59d22eb pad: If we push sticky events because of another sticky event, only push those that come before the new event
https://bugzilla.gnome.org/show_bug.cgi?id=699937
2013-05-09 10:29:11 +02:00
Sebastian Dröge
ae47133360 pad: No sticky events must arrive after EOS 2013-05-09 09:51:13 +02:00
Nicolas Dufresne
e8a9ffa092 pad: Improve warning message naming events type name
With this patch, message should look like ¨Sticky event misordering, got
'caps' before 'stream-start'¨ making it faster to debug.

https://bugzilla.gnome.org/show_bug.cgi?id=688188
2013-05-09 09:35:30 +02:00
Nicolas Dufresne
f6aa4d85c1 pad: Only inforce STREAM_START, CAPS and SEGMENT ordering
Previous patch was inforcing a complete ordering of the sticky events, while
in fact, only STREAM_START, CAPS and SEGMENT events need proper ordering.

See: https://bugzilla.gnome.org/show_bug.cgi?id=688188
2013-05-09 09:35:19 +02:00
Nicolas Dufresne
a68e33712e pad: Detect, fix and warn when sticky events are in wrong order
We can prevent buggy element from causing other elements to fail or crash
by sorting sticky event at insertion. In this case, we also warn as this
is not supposed to happen.

See: https://bugzilla.gnome.org/show_bug.cgi?id=688188
2013-05-08 13:48:59 +02:00
Alessandro Decina
543b92a856 gstpad: run probes for FLUSH events sent with gst_pad_send_event
Move probe handling in gst_pad_send_event_unchecked so that probes are run for
FLUSH events too.
2013-04-25 06:43:29 +02:00
Wim Taymans
43620e1642 pad: notify caps property on NULL as well
Also notify the caps property when it changes to NULL
2013-04-23 11:17:05 +02:00
Wim Taymans
49c9d2f229 pad: clarify locking 2013-04-23 11:16:16 +02:00
Wim Taymans
3e1a430c22 pad: add gst_pad_store_sticky_event()
Rewire some internal functions and expose a new
gst_pad_store_sticky_event() function.

API: gst_pad_store_sticky_event()
2013-04-04 16:36:26 +02:00
Wim Taymans
e857030232 pad: improve debug 2013-04-04 15:45:15 +02:00
Sebastian Dröge
f23db94fef pad: Let gst_pad_get_allowed_caps() pass the caps own caps as filter
This will reduce the number of caps created downstream and we don't
need to intersect in the very end with the pad's own caps.
2013-03-30 11:48:27 +01:00
Edward Hervey
418dcd7277 pad: Remove SEGMENT sticky events when flushing
When flushing, it is expected that upstream will send a SEGMENT
event afterwards.
This also avoids stray SEGMENT events from coming through after a
flush.
2013-03-29 18:43:21 +01:00
Niv Sardi
4b3aee5698 gst_pad_check_reconfigure: only remove flag if set.
the code ifed a debug statement, that can't be right. anyway, the way it is,
we don't really need that branch, as we set the flag to unset only if set
(and that can't fail) hence the end result is always to unset the flag.

Signed-off-by: Niv Sardi <xaiki@evilgiggle.com>

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691985
2013-01-24 15:41:35 +01:00
Tim-Philipp Müller
666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Sebastian Dröge
3f9516cef8 pad: Downgrade GST_WARNING to GST_INFO
It's usually not a problem if a query fails if there's no peer,
especially as it will happen during pad linking (caps query)
quite often and spams the logs.
2012-10-10 11:34:27 +02:00
Wim Taymans
d630a115f9 pad: resend dropped events
If we try to push sticky events but a probe dropped them, we don't mark
the event as received and mark the pad as PENDING_EVENTS. This ensures
that we resend the event the next time. For this we need to let the
custom flow return from the probe trickle up to
gst_pad_push_event_unchecked() so that we can differentiate between
OK and DROPPED probe returns.
2012-10-05 09:51:58 +02:00
Wim Taymans
0ae3492f6b pad: don't store sticky events on flushing/EOS pads
Don't store sticky events on flushing or EOS pads. This was done
correctly for source pads but not for sink pads.
2012-10-05 09:51:29 +02:00
Wim Taymans
ef012f8e58 pad: fix activate docs 2012-09-28 10:41:54 +02:00
Olivier Crête
945e0d2be9 pad: Remove pad probes only once
Also add test to make sure that if a pad probe is removed while it's
callback is running, the cleanup_hook isn't called again if it
returns GST_PAD_PROBE_REMOVE
2012-09-20 15:24:33 -04:00
Olivier Crête
25b3e02b94 pad: Add functions to safely access GstProbeInfo data pointer
This is so that introspection based bindings can access it.

https://bugzilla.gnome.org/show_bug.cgi?id=684402
2012-09-20 15:24:33 -04:00
Sebastian Dröge
8f51345296 pad: Fix refcount bug by unreffing the correct variable 2012-09-18 12:46:37 +02:00
Sebastian Dröge
de635d089f pad: Add parent parameter to the link and unlink functions
Fixes part of bug #683995.
2012-09-17 13:24:36 +02:00
Olivier Crête
bc5cc2eb07 pad: don't try to pretty-print event after we've given away ownership
Might cause crashes with debug logging enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=683996
2012-09-14 01:28:46 +01:00
Tim-Philipp Müller
221d46f438 pad: expose gst_pad_mode_get_name() and use it in baseparse 2012-09-11 19:51:02 +01:00