Commit graph

74 commits

Author SHA1 Message Date
Mathieu Duponchelle
c8298a2787 BaseSrc, PushSrc: add nullable annotations to virtual methods
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3806>
2023-01-26 22:35:31 +00:00
Jan Alexander Steffens (heftig)
e3fa65abab aggregator: Warn about the right segment's format
We were checking the head segment here, not the current segment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/611>
2023-01-26 10:39:08 +01:00
Jan Alexander Steffens (heftig)
08d4b0051a aggregator: Always lock aggpad around update_time_level
`aggpad->segment` is protected by the `aggpad`'s object lock. We need to
take the lock before calling `update_time_level`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/611>
2023-01-26 10:39:08 +01:00
Seungha Yang
621feb32e9 gst-plugin-scanner: Add support for Windows
Adding Win32 specific plugin loader implementation.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/11
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3512>
2023-01-25 18:24:28 +00:00
Tim-Philipp Müller
45aac1e938 base: bitwriter: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
78149326c9 libs: base: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
1919030363 baseparse: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
ba6d952cd5 gstcheck: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
bda6287075 controller: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Alicia Boya García
2c2767b94a Use automatic pad activation in elements that can take advantage of it
Pads are activated automatically when they are added if the element
state is >=PAUSED, so it's not necessary to activate them manually
anymore.

This patch removes manual pad activation from gstaggregator, gstconcat,
gstfunnel, and gstinputselector.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3636>
2023-01-24 14:42:35 +00:00
Xavier Claessens
cd78cbac86 Fix API visibility macros
This copies the logic from GLib discussed there:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2936

Beside being simpler, it also fix all public symbols being annotated
with dllexport when doing a static build, as discovered there:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3540#note_1678335

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3567>
2022-12-20 14:03:35 +00:00
Mathieu Duponchelle
f8b732563b basesrc: respect FIXED_CAPS flag in caps query implementation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3590>
2022-12-17 12:04:49 +00:00
Mathieu Duponchelle
b5cd758230 aggregator: Implement force_live API
Setting force_live lets aggregator behave as if it had at least one of
its sinks connected to a live source, which should let us get rid of the
fake live test source hack that is probably present in dozens of
applications by now.

+ Expose API for subclasses to set and get force_live
+ Expose force-live properties in GstVideoAggregator and GstAudioAggregator
+ Adds a simple test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3008>
2022-11-18 18:14:26 +00:00
Sebastian Dröge
72c5105312 typefindhelper: Fix docs/annotations for the new functions
Follow-up for https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3296

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3418>
2022-11-16 04:07:09 +00:00
Sanchayan Maity
30841dae99 typefindhelper: Use the new GstTypeFind * API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3296>
2022-11-15 14:05:40 +00:00
Sanchayan Maity
89da632219 typefindhelper: Introduce a new API for working with a GstTypeFind *
Introduce a new API that can return a GstTypeFind * with helper functions
and data set around buffer data.

While at it, drop factory field from GstTypeFindBufHelper. While it was
useful for logging, it was not passed through function arguments and keeping
it for logging would require an additional API increasing the API surface
and making it harder to use.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3296>
2022-11-15 14:05:40 +00:00
Sanchayan Maity
036b77b519 typefindhelper: Add helpers to improve type finding given the caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3296>
2022-11-15 14:05:40 +00:00
Sanchayan Maity
58f7d88585 typefindhelper: Update annotation for function parameters
Fix the nullable/optional situation. allow-none is deprecated and
replaced by either or both of the others.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3296>
2022-11-15 14:05:40 +00:00
Sebastian Dröge
c878d0f68b core/base: Only post latency messages if the latency values have actually changed
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1525

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3282>
2022-10-27 15:25:22 +00:00
Sebastian Dröge
366893e9ac Fix various warnings from gobject-introspection
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3261>
2022-10-25 09:45:25 +03:00
Sebastian Dröge
fee144bca5 net: Add missing nullable annotation on the name parameter in the net/NTP clock constructors
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3249>
2022-10-22 15:59:16 +00:00
Sebastian Dröge
0a513e9168 check: Add/fix various annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3194>
2022-10-18 08:56:58 +00:00
Sebastian Dröge
3e7f684609 net: Add/fix various annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3194>
2022-10-18 08:56:58 +00:00
Sebastian Dröge
07f8c012c7 base: Add/fix annotations in GstQueueArray
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3194>
2022-10-18 08:56:58 +00:00
Sebastian Dröge
2ede719b4b controller: Add/fix various annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3194>
2022-10-18 08:56:58 +00:00
Guillaume Desmottes
2df2dfce55 aggregator: fix input buffering
We need to be able to buffer at least the aggregator latency +
upstream latency, which is the value used to compute the aggregator
deadline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3138>
2022-10-07 16:27:51 +02:00
Philipp Zabel
3b900e1fa4 buffer: drop parent meta in deep copy/foreach_metadata
The purpose of a deep buffer copy is to be able to release the source
buffer and all its dependencies. Attaching the parent buffer meta to
the newly created deep copy needlessly keeps holding a reference to the
parent buffer.

The issue this solves is the fact you need to allocate more
buffers, as you have free buffers being held for no reason. In the good
cases it will use more memory, in the bad case it will stall your
pipeline (since codecs often need a minimum number of buffers to
actually work).

Fixes #283

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2928>
2022-09-28 12:34:44 -06:00
Edward Hervey
b2701418d7 basetransform: Avoid useless codepath
If QoS is disabled, skip the whole computation (avoids calculating values which
won't be needed)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3034>
2022-09-22 13:45:50 +00:00
Xavier Claessens
5f0493d33a meson: Set install_tag on some targets
Trying to follow recommendation from Meson documentation:
https://mesonbuild.com/Installing.html#installation-tags

Move tools into 'bin' or 'bin-devel' categories to keep only libs and
plugins in the default 'runtime' category. This simplifies distribution
of GStreamer application skipping parts that are not needed, similarly
to what Cerbero does by hardcoding huge list of files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3017>
2022-09-20 10:08:15 +00:00
Edward Hervey
7a5846d69d baseparse: If available, return average bitrate upstream
Helps improve queue2 buffering for single stream playback (ex: FLAC or mp3)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3033>
2022-09-16 16:12:03 +00:00
Thibault Saunier
bc9c1e3956 meson: Namespace the plugins_doc_dep/libraries variables
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2970>
2022-09-01 21:17:35 +00:00
Sebastian Dröge
d9bd870db4 aggregator: Improve debug output to better understand why pads are not ready or can't accept more data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2907>
2022-08-17 19:06:35 +00:00
Rafael Sobral
e9a642feb8 aggregator: fix reversed active/flushing arguments in debug log output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2813>
2022-08-01 23:03:59 +01:00
Sebastian Dröge
205034dea9 aggregator: Reset EOS flag after receiving a stream-start event
And also don't assert that there are no buffers queued up when handling
an EOS event. The pad's streaming thread might've already received a new
stream-start event and queued up a buffer in the meantime.

This still leaves a race condition where the srcpad task sees all pads
in EOS state and finishes the stream, while shortly afterwards a pad
might receive a stream-start event again, but this doesn't seem to be
solveable with the current aggregator design.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2769>
2022-07-18 15:46:21 +03:00
Adam Doupe
e77ed17f15 queuearray: Fix potential heap overflow when expanding GstQueueArray
Check that elt_size*newsize doesn't overflow when expanding a
GstQueueArray, which has the potential for a heap overwrite.

Co-authored-by: Sebastian Dröge <sebastian@centricular.com>

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2606>
2022-06-15 15:42:40 +00:00
Víctor Manuel Jáquez Leal
428b66cfae docs: harness: Fix example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2602>
2022-06-15 13:22:20 +02:00
Guillaume Desmottes
0086d7b016 basetransform: handle gst_base_transform_query_caps() returning NULL
If gst_base_transform_transform_caps() returns NULL, gst_base_transform_query_caps()
will return NULL as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2532>
2022-06-01 09:55:53 +02:00
Guillaume Desmottes
4cb935bcea basetransform: fix critical if transform_caps() returned NULL
klass->transform_caps() may return NULL, which was raising this
critical:

  GStreamer-CRITICAL **: 12:23:56.243: gst_caps_is_subset: assertion 'subset != NULL' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2528>
2022-05-31 14:27:51 +02:00
Sebastian Dröge
b247305bfd aggregator: Don't send multiple caps events with the same caps
Every time aggregator is reconfiguring it will try to negotiate new
caps. If these resulting caps are the same as the previously negotiated
caps then don't send a new caps event with the same caps again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2372>
2022-05-05 17:41:58 +00:00
Sebastian Dröge
90584e29d7 aggregator: Only send events up to CAPS event from gst_aggregator_set_src_caps()
Otherwise setting the srcpad caps based on the sinkpad caps event will
already push a segment event downstream before the upstream segment is
known.

If the upstream segments are just forwarded when the upstream segment
event arrives this would result in two segment events being sent
downstream, of which the first one will usually be simply wrong.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2372>
2022-05-05 17:41:58 +00:00
Mathieu Duponchelle
da25b95bdf aggregator: forward gap event information to gap buffer
When the GAP event was flagged with MISSING_DATA, subclasses
may want to adopt a different behaviour, for example by repeating
the last buffer.

As we turn these gap events into gap buffers, we need to flag
those, we do so with a new custom meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/708>
2022-04-22 17:43:50 +00:00
Xavier Claessens
b225f4215b meson: Add PYTHONPATH to load GDB helper module
Meson generates a gdbinit file that will automatically load gstreamer
script. However that script uses a helper python module that needs
PYTHONPATH to be pointing into the right location in the source
tree to be able to find gst_gdb.py.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1796>
2022-04-22 11:53:31 +00:00
Xavier Claessens
b99ecc78ca Replace gst-i18n-*.h with gi18n-lib.h
GLib guarantees libintl is always present, using proxy-libintl as
last resort. There is no need to mock gettex API any more.

This fix static build on Windows because G_INTL_STATIC_COMPILATION must
be defined before including libintl.h, and glib does it for us as part
as including glib.h.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2028>
2022-04-19 18:01:06 +00:00
Sebastian Dröge
83a0232225 ptpclock: Fix wrong condition order from last commit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2171>
2022-04-13 17:00:25 +03:00
Sebastian Dröge
416e16aefd ptpclock: Allow at least 100ms delay between Sync/Follow_Up and Delay_Req/Delay_Resp messages
It doesn't matter for measurement purposes whether receiving them takes
a while and various PTP servers are not prioritizing to send them,
causing them to be dropped unnecessarily and preventing proper
synchronization with such servers.

This is especially a problem if the RTTs in the network are very low
compared to the additional delay imposed by the server.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2161>
2022-04-12 18:57:23 +00:00
Jan Schmidt
029d6a4a19 aggregator: Improve debugging of arriving buffers
Log some details about the buffers that are arriving and
being enqueued on each sink pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2096>
2022-04-01 19:05:44 +00:00
Xavier Claessens
b004464ac6 Remove glib and gobject dependencies everywhere
They are part of gst_dep already and we have to make sure to always have
gst_dep. The order in dependencies matters, because it is also the order
in which Meson will set -I args. We want gstreamer's config.h to take
precedence over glib's private config.h when it's a subproject.

While at it, remove useless fallback args for gmodule/gio dependencies,
only gstreamer core needs it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2031>
2022-04-01 16:32:17 +00:00
Vivienne Watermeier
6fd7e7699d compositor: send translated navigation events to the relevant sink pads
Fixes #888

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1495>
2022-03-18 06:22:02 +00:00
Corentin Noël
a451b66479 basesink: Fix annotations
We should annotate the Class and not the object itself.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1965>
2022-03-16 10:37:44 +00:00
Xavier Claessens
0fa7923937 Meson: Set install_tag on some files
Meson tries to guess the tag (runtime, devel, etc) for every installed
file, but it cannot guess them all. There is a list at the end of
meson-log.txt of files we need to tag manually.

See https://mesonbuild.com/Installing.html#installation-tags.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1934>
2022-03-14 08:56:54 -04:00