Commit graph

13 commits

Author SHA1 Message Date
Xavier Claessens 364d0ff45d pad: gst_pad_set_offset is only reliable on source pads
Setting an offset on sink pads won't repush segment event which means
buffer running time won't be adjusted. Better warn about this than being
silently not working.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6464>
2024-04-25 13:49:03 +00:00
Sebastian Dröge 7c1ea2eeab pad: Copy over seqnum when creating a new segment event for applying pad offset
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6057>
2024-02-06 10:24:26 +00:00
Guillaume Desmottes bebcb74801 core: pad: call tracer query-post hook after probes
Tracers are likely interested about the end result of the query, so
after probes have been caled.

Fix a bug where the buffer-lateness tracer was reporting a wrong latency
when pad probes increased the latency.

Also call the tracer hook if the pad has no query function.

Fix https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/486

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5963>
2024-01-30 07:48:30 +00:00
Daniel Moberg 8a89f4eba7 gstpad: Recheck pads when linking after temporary unlock
This commit makes sure that pads are valid for linking
after the pads has been temporarily unlocked in the linking process.
Not doing this opens up for a race condition where
pads potentially can be linked twice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5670>
2023-11-16 08:30:14 +00:00
Guillaume Desmottes 0d254f59b8 core: pad: fully log event being pushed
It's useful when debugging to check the details of the event being sent,
like the segment for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4493>
2023-04-26 18:00:14 +00:00
Jan Alexander Steffens (heftig) aeb262a7e1 pad: Don't leak user_data in gst_pad_start_task
When the task already exists, we forgot to free the passed `user_data`.
This wasn't an issue for most C code, which doesn't pass a
`GDestroyNotify`, but bindings such as gstreamer-rs do!

That said, allocating a trampoline in gstreamer-rs just for it to get
thrown away again is awkward. Maybe we need a `gst_pad_resume_task`?

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3920>
2023-02-09 15:40:56 +00:00
Jan Schmidt bdaa8f83aa pad: Fix sticky event ordering for instant-rate-change
The event type for instant-rate-change events was poorly chosen,
leading to them being re-sent too late and even after EOS.

Add a mechanism in GstPad for the sticky event order to be
different to the value of the event type to fix that up.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3387>
2022-11-21 10:32:02 +00:00
Edward Hervey 64c81b6972 urisourcebin: Remove pending pad handling
This was needed to support the legacy handling of changing streams (add new
pads, send EOS and remove old pads).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2784>
2022-11-16 14:01:46 +00:00
Edward Hervey 605cb6a4d4 gstpad: Avoid race in (un)setting EOS flag on sinkpads
The scenario is the following:

* Thread 1 is pushing an EOS event on a sinkpad
* Thread 2 is pushing a STREAM_START event on the same sinkpad before Thread 1
returns. Note : It starts pushing the event after Thread 1 took the object lock.

There is a potential race between:

* The moment Thread 1 sets the EOS flag once it has finished sending the
event (via store_sticky_event). When it does that it has both the STREAM and
OBJECT lock

* The moment Thread 2 sends the STREAM_START event (Which should release that
EOS status), but removing the EOS flag is only done while holding the OBJECT
lock and not the STREAM_LOCK, which means it could be re-set by Thread 1 before
it then checks again the EOS flag (without the STREAM lock taken).

The EOS flag unsetting by STREAM_START should be done with the STREAM lock
taken, otherwise it will be racy.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1452

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3320>
2022-11-07 06:28:39 +01:00
Edward Hervey 730ed3a69a gstpad: Fix non-serialized sticky event push
With non-serialized sticky events, such as GST_EVENT_INSTANT_RATE, we both want
to store the event (for later re-linking) *AND* push the event in a non-blocking
way.

We therefore must *not* propagate pending sticky events if the event is "sticky
or serialized" but only if it's "serialized"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3254>
2022-11-04 14:20:36 +00:00
Sebastian Dröge de30de865c tracing: add hooks for gst_pad_chain() / gst_pad_chain_list()
This allows tracing buffers when they arrive in a pad instead of just
when they are pushed out of a pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2682>
2022-06-29 21:05:14 +00:00
Jan Schmidt 0a5c2a9afb gstreamer: Remove GST_DATAFLOW debug category
Nothing has logged anything to this category since event and
buffer dataflow was de-unified in 2005.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2097>
2022-04-01 17:56:28 +00:00
Thibault Saunier 6c364d9626 Move files from gstreamer into the "subprojects/gstreamer/" subdir 2021-09-24 16:13:07 -03:00
Renamed from gst/gstpad.c (Browse further)