Commit graph

938 commits

Author SHA1 Message Date
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
Wim Taymans
8f282de37d pad: check sticky events also after pad block
Recheck for sticky events after doing a pad block because the pad block could
have caused a relink and then we need to resend the events to the newly linked
pad.

Fixes things like switching of visualisations.
2012-09-03 11:07:10 +02:00
Jan Schmidt
5aefdbaf10 gstpad: make some debug statements more verbose 2012-08-31 06:25:38 -07:00
Thiago Santos
9285ee9184 pad: add gst_pad_needs_reconfigure
Add an alternative version of gst_pad_check_reconfigure that doesn't
clear the reconfigure flag.

Useful for increasing error resilience without duplicating the
reconfigure code in pad task functions.

API: gst_pad_needs_reconfigure

https://bugzilla.gnome.org/show_bug.cgi?id=681198
2012-08-10 13:58:02 -03:00
Wim Taymans
3b6e5acbce pad: fix debug line
Use QUERY_TYPE on query types.
2012-07-18 17:49:33 +02:00
Wim Taymans
06addca012 pad: add PROXY_SCHEDULING flag
Add a flag that makes the default query handler forward the scheduling query.
2012-07-18 17:49:32 +02:00
Wim Taymans
107007f053 pad: improve query caps function
In the proxy_query_caps function, also filter against the filter in the query.
We don't need to filter against the filter in the query anymore in the default
caps query function because we already did this in the proxy_query_caps.
2012-07-18 17:49:32 +02:00
Jan Schmidt
524b56cb07 gstpad: Move sticky flag clearing code to gst_pad_activate_mode
The ghostpad code directly activates/deactivates the child code by
calling gst_pad_activate_mode, rather than gst_pad_set_active, so
make sure to clear the flags in gst_pad_activate_mode(), which should
catch all cases.
2012-07-12 00:41:23 +10:00
Edward Hervey
d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
Tim-Philipp Müller
95f2cab053 pads: no need to deactivate pads that are already in PAD_MODE_NONE 2012-07-03 22:24:22 +01:00
Tim-Philipp Müller
0841ac48f1 pads: make pad activation debug logs a bit more readable 2012-07-03 22:20:40 +01:00
Tim-Philipp Müller
4f7aa97b21 pad: clear EOS flag when deactivating pads fixing element re-use 2012-07-03 19:04:54 +01:00
Wim Taymans
d2c632fcda pad: improve introspection annotation 2012-06-20 13:27:33 +02:00
Wim Taymans
b2aa56f4e3 task: add separate methods to add enter/leave callback
Remove the structure of callbacks and replace with separate methods to register
each callback. This is much more binding friendly.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=677898
2012-06-20 11:59:09 +02:00
Wim Taymans
76e8b2ecda task: add GDestroyNotify to _new
Add a GDestroyNotify to the user_data we pass to gst_task_new()
Change gst_pad_start_task() to also take the notify
2012-06-20 10:31:49 +02:00
Wim Taymans
61fefbb542 pad: move gst_pad_set_caps() to compat
We want code to explicitly send a caps event instead.
2012-06-18 16:14:19 +02:00
Wim Taymans
2cab15c9f6 docs: improve API docs 2012-06-15 12:57:24 +02:00
Havard Graff
75853fa79b Make sure that unlinked pads do not cause a return false on latency events.
Context: Latency configuration should not be
messed up because of not-linked pads. In general,
one return FALSE on latency distribution causes
the "overall" pipeline latency configuration to
fail. This shows up as noise in logs (warning).

Conflicts:

	gst/gstpad.c
2012-06-06 13:42:32 +02:00
Wim Taymans
d907544ab1 pad: only serialized events can't pass after EOS
Only serialized events can't be sent on pads that are EOS. Otherwise a seek
event would be refused as well.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=677520
2012-06-06 09:14:58 +02:00
Wim Taymans
b0756827f6 pad: don't pause task on EOS
Elements should not rely on core to pause tasks on EOS.
2012-06-05 09:10:05 +02:00
Wim Taymans
bae0c4b0c6 pad: fix event type check 2012-06-05 09:00:01 +02:00
Wim Taymans
66c88c1bb1 pad: fix 'res' may be used uninitialized in this function 2012-06-04 16:19:26 +02:00
Sebastian Dröge
8cc12b05fc pad: Don't accept any buffers or events after EOS 2012-06-04 13:01:40 +02:00
Sebastian Dröge
5a8c901507 pad: Always return errors for EOS events immediately
For non-EOS events things will error out later during data
flow but after EOS events no data flow is happening.

See bug #677340.
2012-06-04 11:25:47 +02:00
Sebastian Dröge
991ac561e1 pad: Only forward caps events to a pad if it accepts the caps
Fixes bug #677335.
2012-06-04 09:27:35 +02:00
Sebastian Dröge
8e6b5c7acf Revert "pad: Return FALSE if pushing of sticky events failed"
This reverts commit 0f924b922c.

Sticky events should always return TRUE when pushing and will
only cause failures during data flow later.
2012-06-02 20:06:39 +02:00
Tim-Philipp Müller
9b308b2b5b pad: fix variable-set-but-not-used compiler warning 2012-06-02 16:18:46 +01:00
Sebastian Dröge
0ca7b85ead pad: If pushing a sticky event failed, make sure to at least push any pending EOS events
Otherwise a pipeline where one sticky event fails to be sent will
never forward EOS events downstream. This can cause pipelines to
wait forever for EOS on errors.
2012-06-02 17:00:48 +02:00
Sebastian Dröge
0f924b922c pad: Return FALSE if pushing of sticky events failed
Instead of just ignoring failure of pushing sticky events and
returning TRUE as if everything is fine.
2012-06-02 16:02:07 +02:00
Wim Taymans
ce67b0e539 docs: update more documentation 2012-03-29 13:34:50 +02:00
Wim Taymans
f9c85a53dc pad: improve docs of get/pull_range
Improve the docs of the get/pull_range functions, define the lifetime of the
buffer in case of errors and short reads.
Make sure the code does what the docs say.
2012-03-20 13:14:55 +01:00
Wim Taymans
db1318ab4a pad: change the semantics of get/pull_range a little
Make it so that one can specify a buffer for get/pull_range where the downstream
element should write into. When passing NULL, upstream should allocate a buffer,
like in 0.10.
We also need to change the probes a little because before the pull probe, there
could already be a buffer passed. This then allows us to use the same PROBE
macro for before and after pulling.
While we're at the probes, make the query probe more powerful by handling the
GST_PAD_PROBE_DROP return value. Returning _DROP from a query probe will now
return TRUE upstream and will not forward the probe to the peer or handler.
Also handle _DROP for get/pull_range properly by not dispatching to the
peer/handler or by generating EOS when the probe returns DROP and no buffer.
Make filesrc handle the non-NULL buffer passed in the get_range function and
skip the allocation in that case, writing directly into the downstream provided
buffer.
Update tests because now we need to make sure to not pass a random value in the
buffer pointer to get/pull_range
2012-03-16 21:37:10 +01:00
Wim Taymans
c8acf02f23 pad: comment and debug improvement 2012-03-15 16:50:31 +01:00
Wim Taymans
e332862985 pad: implement DRAIN handling
When we forward the DRAIN query and there is nothing to forward it to, assume we
are drained.
When a basesink receives a drain query, reply with TRUE.
2012-03-14 16:27:31 +01:00
Wim Taymans
05cd564bea pad: make serialized queries push sticky events first
Before we can proceed with a serialized query, we need to be sure that all
sticky events were pushed.
2012-03-14 16:01:15 +01:00