François Laignel
067fe7b9bc
gst: structure: add more GstIdStr methods
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7613 >
2024-10-04 11:19:46 +02:00
François Laignel
86776dc62e
gst: structure: fix some GstIdStr documentation
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7613 >
2024-10-03 19:56:06 +02:00
Corentin Damman
16da96653a
macos: Fix race conditions
...
This commit fixes two issues:
- The event must be posted *after* calling stop, otherwise a race condition can occur and the app never stops
- isFinishedLaunching and applicationDidFinishLaunching are not always synchronized, causing sometimes
a deadlock on the g_cond_wait never catching the g_cond_signal
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7593 >
2024-10-03 11:47:45 +02:00
Daniel Morin
50a27da3ad
test: Add more nested caps-in-caps (and likes)
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7572 >
2024-10-01 22:17:51 +00:00
Daniel Morin
a40ed16a0e
value: Fix nested caps intersection
...
Without this change intersection operand containing caps-in-caps need
to be equal for the intersection to work.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7572 >
2024-10-01 22:17:51 +00:00
Seungha Yang
a8f8bbef99
structure,capsfeatures: Fix MSVC build warnings
...
Fixing warning "warning C4068: unknown pragma 'GCC'"
Use portable GLib macro instead
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7589 >
2024-09-30 21:56:28 +00:00
Sebastian Dröge
21af7061eb
gst: caps: Add API for creating caps / setting caps fields from static strings
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432 >
2024-09-26 19:26:18 +03:00
Sebastian Dröge
ba552fb76f
gst: Remove gstquark.c / gstquark.h
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432 >
2024-09-26 19:26:18 +03:00
Sebastian Dröge
b7b24573ce
common: Use more efficient versions of GstCapsFeatures API where possible
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432 >
2024-09-26 19:26:18 +03:00
Sebastian Dröge
eed7c9c66a
gst: capsfeatures: Use GstIdStr for caps features
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432 >
2024-09-26 19:21:29 +03:00
Sebastian Dröge
6233eb0ff3
common: Stop using GQuark-based GstStructure field name API
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432 >
2024-09-26 19:21:29 +03:00
Sebastian Dröge
2df9c4739e
gst: structure: Use GstIdStr for structure field names
...
And add corresponding API with GstIdStr parameters, static string parameters and
deprecate the old GQuark based API.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3567
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432 >
2024-09-26 19:21:29 +03:00
Sebastian Dröge
0c1611d31d
common: Stop using GQuark-based GstStructure name API
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432 >
2024-09-26 19:21:29 +03:00
Sebastian Dröge
8cbc76b180
gst: structure: Use GstIdStr for structure names
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432 >
2024-09-26 19:21:29 +03:00
Sebastian Dröge
0ee18781f9
gst: Add GstIdStr for holding structure names and field names
...
This is an efficient string storage for short strings without heap allocations,
and falling back to the heap for bigger allocations. Almost all structure fields
and structure names in use nowadays are short enough to not require a heap
allocation.
As structure names and fields are sometimes dynamically created, storing them in
a GQuark can create a memory leak and potentially a DoS attack by continously
triggering creating of new quarks.
Thanks to Tim for coming up with the name!
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432 >
2024-09-26 19:21:29 +03:00
Sebastian Dröge
0823c639cc
gst: structure: Stop using private structure name quark field
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432 >
2024-09-26 19:21:29 +03:00
Arun Raghavan
90e58aec3c
gstreamer: parse: Use child proxy for deferred property setting
...
We use that mechanism for the non-deferred path, and this makes sure we are
consistent for deferred set too.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7519 >
2024-09-23 17:47:20 +00:00
Arun Raghavan
92d8da92dc
gstreamer: parse: Minor whitespace fixups
...
Mostly replacing some tabs with spaces.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7519 >
2024-09-23 17:47:20 +00:00
Arun Raghavan
ba69987114
gstreamer: parse: Make sure children are bins before recursing in
...
A deferred set of the form parentbin::childelement::pad works in the
non-deferred property setting path, but the deferred path assumes that all
non-root non-leaf children specify bins. We already have a bin check on the
root, so let's add one for other non-leaves to avoid a critical.
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3806
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7519 >
2024-09-23 17:47:19 +00:00
Sebastian Dröge
389302eb96
dynamictypefactory: Fix name of the class cast macro
...
And deprecate the old name.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3814
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7541 >
2024-09-23 15:04:31 +00:00
Alan Coopersmith
9c0fbfd2eb
gstreamer: netclock-replay: use gst_c_args when building
...
Need HAVE_CONFIG_H to avoid build failure on Solaris 11.4 with gcc 14.1:
../subprojects/gstreamer/tests/misc/../../libs/gst/net/gstnetutils.c:71:7:
error: implicit declaration of function ‘setsockopt’
[-Wimplicit-function-declaration]
71 | if (setsockopt (fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0) {
| ^~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7553 >
2024-09-20 06:20:15 +00:00
Sebastian Dröge
37ef85f268
aggregator: Add gst_aggregator_push_src_event()
...
This ensures that any pending events are pushed before pushing the new event.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7542 >
2024-09-19 17:08:45 +03:00
Sebastian Dröge
075a81b44f
aggregator: Remove unused tag handling code
...
If this becomes API it would now have to be implemented differently because
various elements are implementing tag handling themselves now and this would
conflict.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7542 >
2024-09-19 16:12:14 +03:00
Peter Kjellerstedt
0db32b3b3a
meta: Add missing include of gststructure.h
...
This avoids the following error when only including gstmeta.h:
/usr/include/gstreamer-1.0/gst/gstmeta.h:146:3: error: unknown type
name 'GstStructure'
146 | GstStructure *structure;
| ^~~~~~~~~~~~
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7520 >
2024-09-16 06:58:08 +00:00
Sebastian Dröge
03d2b28559
aggregator: Immediately return NONE from simple_get_next_time() on non-TIME segments
...
Otherwise this gives critical warnings.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7511 >
2024-09-13 12:23:52 +03:00
Arun Raghavan
f30321538b
pad: Check data NULL-ness when probes are stopped
...
We were correctly handling this for buffers, but not events and queries.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7493 >
2024-09-12 05:47:16 +00:00
Sebastian Dröge
e5133033fa
clock: Use external / internal as term for the two clock bases everywhere
...
It was confusing that some functions were using master for the external time and
slave for the internal time. This is not consistently using external / internal
when talking about concrete clock times.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7456 >
2024-09-08 11:42:38 +01:00
Sebastian Dröge
f463d4c3c1
clock: Use nullable
/ optional
annotations instead of ambiguous allow-none
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7456 >
2024-09-08 09:54:56 +00:00
Tim-Philipp Müller
6031f9ece1
gstreamer: use g_sort_array() instead of deprecated g_qsort_with_data()
...
Fixes compiler warnings with the latest GLib versions.
See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4127
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7384 >
2024-09-02 22:31:34 +00:00
Sebastian Dröge
55994477a7
bus: Switch from GstAtomicQueue to GstVecDeque
...
All accesses to it were protected either by a mutex already, or at least
used yet another mutex for gst_poll_read_control() / gst_poll_write_control().
The usage of GstPoll has to stay for backwards compatibility as it is
used to manage the (public) fd that can be used to wait for the bus to
be ready, but this switch at least simplifies the implementation a bit
and results in fewer atomic operations.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6684 >
2024-09-02 09:26:23 +00:00
Sebastian Dröge
8e589eec08
bufferpool: Switch from GstAtomicQueue to GstVecDeque and a mutex/cond
...
While the atomic queue itself is lock-free, all its usage had to be
synchronized externally via a GstPoll and gst_poll_read_control() /
gst_poll_write_control(). Both functions were always taking a mutex
internally since cd06aea1
, so the implementation was just very
complicated but not lock-free at all.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2714
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6684 >
2024-09-02 09:26:23 +00:00
Sebastian Dröge
3c7ddf902a
structure: Remove quadratic behaviour from gst_structure_fixate()
...
It was iterating over each field and after fixating its value was again
iterating over every field to find where to store the value.
Instead directly overwrite the value after validating it.
Also actually check that the structure is writable before modifying its fields
by using gst_structure_map_in_place() instead of gst_structure_fixate().
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7420 >
2024-09-02 07:32:16 +00:00
Sebastian Dröge
8b0ae3ba87
clock: Fix calculation for number of bits needed to store a 64 bit value
...
It was using log2(n) but what actually is needed is log2(n) + 1. Also add a
fast-path that uses __builtin_clzll() on gcc/clang.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7406 >
2024-08-29 10:55:35 +00:00
Sebastian Dröge
41f3fab3d4
clock: Fix unchecked overflows in linear regression code
...
The initial calculation for the precision shift was wrong and would allow for
overflows during the calculations which were not detected and lead to wrong
results.
Also add a test for a case where overflows where previously not detected and
caused a completely wrong result.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7406 >
2024-08-29 10:55:35 +00:00
Daniel Morin
4106ad4ae6
doc: correct delimiters documentation
...
- "<>" are delimiters for GST_TYPE_ARRAY and "{}" are delimiters for
GST_TYPE_LIST.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7419 >
2024-08-29 00:00:43 +00:00
Edward Hervey
8da2ea6fa1
gstreamer: Make dlopen leak suppression more generic
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7415 >
2024-08-28 06:54:02 +00:00
Jan Schmidt
807dbfbebf
check: Add fail_unless_matches_string() and assert macros
...
Add string check macros for checking expected strings against
a regular expression instead of just a direct literal match
as provided by the existing fail_unless_equals_string()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7365 >
2024-08-16 14:18:35 +00:00
Jan Schmidt
e76581fe93
core: Log pad name, not just the pointer
...
Change a debug statement that was just logging a pad pointer where
it could log the pad name more usefully.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6943 >
2024-08-12 12:38:44 +05:30
Sebastian Dröge
9bbb7accb3
bin: Don't keep the object lock while setting a GstContext when handling NEED_CONTEXT
...
This can potentially deadlock.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3707
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7305 >
2024-08-06 07:00:29 +00:00
Jan Schmidt
7bd51afd04
gsturi: Ensure file:// URIs retain //
...
Add the // back after the scheme for file URIs so 'file:///path/to/file'
doesn't become 'file:/path/to/file' in gst_uri_to_string()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969 >
2024-07-30 00:06:50 +00:00
L. E. Segovia
5929829131
gst: clock: Move Android OS check to the __ANDROID__ macro
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6510 >
2024-07-17 22:33:52 +00:00
Guillaume Desmottes
3b47b87038
downloadbuffer: send EOS in push mode
...
gst_download_buffer_read_buffer() returns FLOW_EOS but it was not
handled in the 'out_flushing' goto block which uses srcresult,
so EOS was not sent downstream.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7128 >
2024-07-05 07:34:03 +00:00
Guillaume Desmottes
894bef7a1d
downloadbuffer: initialize upstream_size when activated in push mode
...
Push mode flow relies on upstream_size but it was not initialized when
activated as it is when activated in pull mode.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7128 >
2024-07-05 07:34:03 +00:00
Guillaume Desmottes
560d9b5b91
downloadbuffer: init upstream_size to -1
...
Code in check_upstream_size() is checking for -1 to check if
upstream_size has been set or not.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7128 >
2024-07-05 07:34:03 +00:00
Guillaume Desmottes
523adcfb1d
downloadbuffer: properly log when receiving events
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7128 >
2024-07-05 07:34:03 +00:00
Tim-Philipp Müller
154b84649f
info: remove unused valgrind header include
...
Follow-up to commit a2cbf75523
.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7126 >
2024-07-03 03:46:19 +00:00
Vivia Nikolaidou
331b37ac9a
ptpclock: Fix typo in comments
...
s/continous/continuous/
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7121 >
2024-07-02 00:08:28 +00:00
Edward Hervey
b2edab940a
gstreamer/gst-tester: Don't leak thread
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115 >
2024-07-01 23:19:40 +00:00
Edward Hervey
61a8d4d43d
gst-inspect: Fix leak of plugin/feature
...
Reordering changes the initial list head
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115 >
2024-07-01 23:19:39 +00:00
Xavier Claessens
84b3a0950d
build: Add missing common options that are yielding in subprojects
...
- Align `glib_debug`, `glib_assert` and `glib_checks` options with GLib,
otherwise glib subproject won't inherit their value. Previous names
and values are preserved using Meson's deprecation mechanism.
- Add `extra-checks` and `benchmarks` options in the main project so it
can be inherited in GStreamer subprojects.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1165 >
2024-06-27 15:53:46 +00:00