Edward Hervey [Thu, 28 May 2020 06:06:59 +0000 (08:06 +0200)]
gstinfo: Improve usage of libdw for backtraces
When getting backtraces, we were always creating a new Dwfl context and then
discarding it. The problem with that is that it resulted in having to re-scan a
lot of information for every single backtrace.
In order to fix that issue, use a global on-demand Dwfl context and use it with
a lock.
Furthermore, we were scanning the mappings of the
process (dwfl_linux_proc_report) for *every single step* in the backtrace, and
that function is horrendously expensive (does sscanf on /proc/PID/maps
...). While there is a possibility that new mappings might be available (new
plugins being loaded for example), we can limit ourselves to just do it once per
backtrace.
These two modifications speed up the elements_leaks unit test (which traces all
pads with full backtraces) by a factor of 6.
Partially fixes #567
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/504>
Jan Schmidt [Thu, 1 Jul 2021 15:59:18 +0000 (01:59 +1000)]
parse: Fix a critical when using the : operator.
Fix "has no handler with id" output criticals when the :
multilink operator is used. These were caused by disconnecting
a signal handler multiple times.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/846>
Sebastian Dröge [Thu, 24 Jun 2021 08:28:28 +0000 (11:28 +0300)]
basesink: Post a latency message whenever we're ready to answer the query
Usually the latency message is only posted whenever latency of an
element changes but that might be too early as the sinks might not be
able to query the latency at that point yet.
Similarly adding a new sink should cause latency reconfiguration once
that new sink is able to report its latency.
This fixes latency configuration in pipelines where webrtcbin is the
only "sink", i.e. it is used in a sendonly session. Before, the latency
would always be configured to 0.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/843>
Sebastian Dröge [Thu, 24 Jun 2021 07:00:28 +0000 (10:00 +0300)]
basesrc: Print segments with GST_SEGMENT_FORMAT and not GST_PTR_FORMAT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/842>
Víctor Manuel Jáquez Leal [Tue, 22 Jun 2021 11:02:41 +0000 (13:02 +0200)]
Fix GI annotations.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/840>
Corentin Damman [Tue, 15 Jun 2021 08:10:16 +0000 (08:10 +0000)]
Update COPYING to LGPL 2.1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/835>
Jan Schmidt [Tue, 8 Jun 2021 16:35:00 +0000 (02:35 +1000)]
parse: Don't do delayed property setting for top-level properties.
If a property is supplied to gst-launch-1.0 to set on a property that
implements GstChildProxy, it would always accept any property name
and try to set it later. This means that (for example) decodebin
will accept and not complain about property names that can never exist like:
gst-launch-1.0 videotestsrc ! decodebin NON-EXISTING_PROPERTY=adsfdasf ! fakesink
Instead, only try to do deferred property setting for property names
that contain the :: separator that indicates it's a setting on a child
that might appear later.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/832>
François Laignel [Wed, 16 Jun 2021 09:59:20 +0000 (11:59 +0200)]
Check mandatory ClockTime arguments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/837>
Doug Nazar [Fri, 23 Apr 2021 16:12:58 +0000 (12:12 -0400)]
Use g_memdup2() where available and add fallback for older GLib versions
glib 2.68 deprecates g_memdup(). Replace with g_memdup2() and
add fallback if compiling against older versions, since we
want to avoid deprecation warnings.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/803>
Alba Mendez [Mon, 7 Jun 2021 09:29:58 +0000 (09:29 +0000)]
introspection: annotate ownership in more vfuncs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/831>
Alba Mendez [Thu, 3 Jun 2021 23:46:06 +0000 (23:46 +0000)]
introspection: annotate handle_message ownership
(fixup/improvement to !747) Correct the ownership
annotation for `message` in the `handle_message` vfunc,
and remove the equivalent phrase elsewhere (following
rules of !747.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/830>
Guillaume Desmottes [Tue, 25 May 2021 11:26:11 +0000 (13:26 +0200)]
tracers: leaks: log when tracer is exiting
Useful when debugging leaks to make sure that the tracer is properly
finalized (gst_deinit() being actually called, etc).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/828>
Tim-Philipp Müller [Tue, 1 Jun 2021 14:28:13 +0000 (15:28 +0100)]
Back to development
Tim-Philipp Müller [Mon, 31 May 2021 23:07:53 +0000 (00:07 +0100)]
Release 1.19.1
tyler-aicradle [Thu, 27 May 2021 21:01:17 +0000 (16:01 -0500)]
systemclock: fall back to g_get_monotonic_time
This allows us to cover the case where we're on some unknown system that
doesn't have a known native precision monotonic time source. Sadly this
reintroduces some of the complexity removed in previous commits.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/829>
tyler-aicradle [Thu, 27 May 2021 14:44:29 +0000 (09:44 -0500)]
systemclock: reorg real and mono time functions for macOS and win32
This simplifies the pre-processor checks a little to make it easier to
follow the code.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/829>
tyler-aicradle [Wed, 26 May 2021 19:55:55 +0000 (14:55 -0500)]
systemclock: Use g_get_real_time on Windows and macOS for realtime clock
These targets previously were unable to produce wall clock times when
using GstSystemClock, this change makes it possible.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/829>
tyler-aicradle [Wed, 26 May 2021 17:55:42 +0000 (12:55 -0500)]
systemclock: Reorganize defined checks for parts of GstSystemClock
The gst_system_clock_get_internal_time and
gst_system_clock_get_resolution functions had some nested defined checks
making this code somewhat harder to reason about and much harder to
change. The logical meaning of the checks has changed but the actual
code coming out of the pre-processor should not have changed
significantly. The main logical change was flattening the checks for
existence of posix timing functionality, from what I can tell these
functions aren't available on Windows where they were trying to be
included. I have checked the Linux and macOS output and they are
functionally unchanged.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/829>
Tim-Philipp Müller [Mon, 24 May 2021 17:27:08 +0000 (18:27 +0100)]
buffer: rename new gst_buffer_new_copy() to gst_buffer_new_memdup()
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/826
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/827>
Tim-Philipp Müller [Sat, 22 May 2021 18:32:55 +0000 (19:32 +0100)]
buffer: add gst_buffer_new_copy() convenience function
More convenient and discoverable variant of the fairly widely-used
gst_buffer_new_wrapped(g_memdup(data,size),size).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/826>
Tim-Philipp Müller [Sun, 16 May 2021 01:10:55 +0000 (02:10 +0100)]
docs: random: clean up outdated documents
Most of these are only of historical interest, and for that it's
fine if they're maintained in the git history. They're confusing
for anyone stumbling across them expecting documentation relating
to current versions of GStreamer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/824>
Mathieu Duponchelle [Tue, 11 May 2021 19:16:01 +0000 (21:16 +0200)]
concat: adjust running time offsets on events
When concat adjusts the base of the segments it forwards
downstream, it needs to also adjust the running time offsets,
as GstPad does when an offset is set by the application on a pad.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/819>
Nicolas Dufresne [Wed, 5 May 2021 19:45:40 +0000 (15:45 -0400)]
doc: base: Fix reference to virtual function
The hotdoc syntax is #ClassName::function, but the code was using
without anything before.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/808>
Doug Nazar [Thu, 6 May 2021 17:03:15 +0000 (13:03 -0400)]
gstcheck: Ensure unused threadpool threads are stopped
Ensures that all unused threads are exited before the atexit()
handlers run.
This prevents a race with any thread that used the OpenSSL library
between it's thread cleanup routine and it's atexit() cleanup routine
which can cause a SIGSEGV.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/812>
Mathieu Duponchelle [Tue, 11 May 2021 17:02:28 +0000 (19:02 +0200)]
concat: fix locking in SEGMENT event handler
concat->current_start_offset needs the lock taken for safe access,
as it can be accessed from outside of the streaming thread, eg
in release_pad.
An early break is also added for an error case.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/818>
Doug Nazar [Fri, 7 May 2021 03:02:35 +0000 (23:02 -0400)]
sparsefile: Fix sparsefile on Win32
When switching between read/write a fseek() or fflush() is required.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/814>
Doug Nazar [Fri, 7 May 2021 03:00:57 +0000 (23:00 -0400)]
downloadbuffer: close file before trying to remove
On Windows, the file handles must be closed before you can delete a file.
Also, it would cause an error if you try to close an already closed handle.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/814>
Doug Nazar [Fri, 7 May 2021 03:00:07 +0000 (23:00 -0400)]
downloadbuffer: return flow error on read error
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/814>
Nikolay Sivov [Thu, 6 May 2021 19:20:57 +0000 (22:20 +0300)]
gstutils: Fix typo in the comment.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/813>
Jan Alexander Steffens (heftig) [Thu, 6 May 2021 10:54:46 +0000 (12:54 +0200)]
multiqueue: Ensure peer pad exists when iterating internal links
The pads can be NULL when we're racing with pad removal, e.g. when the
pads get removed between `gst_pad_iterate_internal_links` acquiring the
parent element and `gst_multi_queue_iterate_internal_links` locking the
multiqueue.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/810>
Chris White [Fri, 2 Apr 2021 23:48:26 +0000 (19:48 -0400)]
gst_child_proxy_get_property: accept G_VALUE_INIT
gst_child_proxy_get_property() can now take a value initialized to
G_VALUE_INIT. This parallels the corresponding change in
g_object_get_property(), GLib 2.60+.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/724#note_738531
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/809>
François Laignel [Thu, 22 Apr 2021 15:53:44 +0000 (17:53 +0200)]
Introduce gst_element_request_pad_simple
The name `gst_element_get_request_pad()` is confusing to people
learning GStreamer. `gst_element_request_pad_simple()` aims at
providing the exact same functionality, while making it more
explicit it is a simplified `gst_element_request_pad()`.
`gst_element_request_pad_simple()` is consistent with other
functions such as `gst_element_seek_simple`.
This commit deprecates `gst_element_get_request_pad()` so that a
compilation warning is emitted when used and incite developers
to use the more explicit `gst_element_request_pad_simple()`.
See also https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/743#note_886586
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/802>
Doug Nazar [Wed, 21 Apr 2021 03:54:52 +0000 (23:54 -0400)]
harness: Fix object used to log caps warning.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/801>
Miguel Paris [Fri, 16 Apr 2021 09:14:31 +0000 (11:14 +0200)]
pad: clear probes holding mutex
Protect clearing probes against concurrent modification which might happen
due to dispose does NOT guarantee that the object is not used anymore, as
it could be referenced again and so being continued used.
So, as in the rest of places where probes hook list is used, on dispose
it should be accessed holding the mutex "GST_OBJECT_LOCK (pad);" as
GHookList is not thread-safe.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/798>
Edward Hervey [Fri, 16 Apr 2021 09:36:33 +0000 (11:36 +0200)]
queue2: Refuse all serialized queries when posting buffering messages
When posting buffering messages there are no safe places or timing to avoid
deadlocks.
Previously the code was trying to be "smart" by only forwarding serialized
queries if the queue was empty ... but that could happen when queue2 hadn't yet
posted a 100% buffering message. Meaning the pipeline might be paused and
pushing a serialized query downstream might never complete.
Therefore let's completely disable forwarding of serialized queries when
`queue2` is used as a buffering element (meaning `ALLOCATION` and `DRAIN`
queries).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/796>
Doug Nazar [Sun, 11 Apr 2021 12:23:27 +0000 (08:23 -0400)]
tests: Remove invalid buffer test in test_get_allowed_caps.
Passing a non-GObject pointer causes SIGSEGV on certain architectures.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/790>
Doug Nazar [Sun, 11 Apr 2021 14:24:01 +0000 (10:24 -0400)]
leaks: Fix SIGSEGV detecting object type.
G_IS_OBJECT & GST_IS_OBJECT work by following pointers which is unsafe
on certain architectures. GstMiniObject detection however does a lookup
to see if it's a valid type derived from G_TYPE_BOXED.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/791>
Chris White [Sat, 10 Apr 2021 14:46:28 +0000 (10:46 -0400)]
allocator: add gst_allocation_params_new()
This permits creating GstAllocationParams instances on the heap, which
is useful for language bindings that can handle GBoxed types.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/683
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/788>
Doug Nazar [Wed, 7 Apr 2021 08:46:23 +0000 (04:46 -0400)]
clocksync: Fix providing system clock by default
clocksync defaults to sync=true so should advertise it by default.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/786>
Jose Quaresma [Sat, 10 Oct 2020 19:09:03 +0000 (19:09 +0000)]
gstpluginloader: when env var is set do not fall through to system plugin scanner
If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that.
Falling through to the one installed on the system is problamatic in cross-compilation
environemnts, regardless of whether one pointed to by the env var succeeded or failed.
taken from:
http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch?id=
0db7ba34ca41b107042306d13a6f0162885c123b
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/669>
Jan Alexander Steffens (heftig) [Fri, 19 Mar 2021 12:46:13 +0000 (13:46 +0100)]
gst-inspect: Allow overriding DEFAULT_LESS_OPTS with GST_LESS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/777>
Sebastian Dröge [Tue, 6 Apr 2021 17:56:55 +0000 (20:56 +0300)]
aggregator: Release pads' peeked buffer when removing the pad or finalizing it
The peeked buffer was always reset after calling ::aggregate() but under
no other circumstances. If a pad was removed after peeking and before
::aggregate() returned then the peeked buffer would be leaked.
This can easily happen if pads are removed from the aggregator from a
pad probe downstream of the source pad but still in the source pad's
streaming thread.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/784>
Chris White [Wed, 31 Mar 2021 00:24:07 +0000 (20:24 -0400)]
caps: Add gst_caps_features_new_single()
For use with a single feature now that gst_caps_features_new() is
G_GNUC_NULL_TERMINATED.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774#note_855357
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774>
Chris White [Sat, 27 Mar 2021 21:10:06 +0000 (17:10 -0400)]
typefind: add gst_type_find_suggest_empty_simple()
For cases where you only need a media type and no other fields.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774#note_848664
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774>
Chris White [Thu, 18 Mar 2021 23:06:20 +0000 (19:06 -0400)]
gst: Add missing G_GNUC_NULL_TERMINATED markers
Functions that require NULL as their last vararg are marked so the
compiler can warn on missing NULL.
Also, document the NULL terminator for gst_make_element_message_details()
and gst_tracer_record_new().
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/669
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774>
Pieter Willem Jordaan [Wed, 31 Mar 2021 19:13:45 +0000 (21:13 +0200)]
systemclock: Fix deadlock on clock_nanosleep
Always use the monotonic clock's diff and end time for clock_nanosleep to have predictable behaviour even with other clock types.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/779>
Jason Carrete [Fri, 26 Mar 2021 21:00:54 +0000 (21:00 +0000)]
Update gst-launch-1.0.1
Fixed a small typo in the gst-launch-1.0 man page
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/780>
Sebastian Dröge [Fri, 19 Mar 2021 08:33:13 +0000 (10:33 +0200)]
bin: Don't special-case G_SIGNAL_RUN_CLEANUP stage in latency signal accumulator
This signal don't run the class handler in the CLEANUP stage.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/776>
Aaron Boxer [Sun, 11 Aug 2019 23:13:57 +0000 (19:13 -0400)]
gst: enforce gst_deinit one call per process
unit tests do not need to call deinit as it is already called in exit handler
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/236>
Aaron Boxer [Sun, 11 Aug 2019 18:20:42 +0000 (14:20 -0400)]
gst: disable indent for parse_goption_arg
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/236>
Stéphane Cerveau [Wed, 17 Mar 2021 15:39:30 +0000 (16:39 +0100)]
device provider: add custom register macro
This macro allows to register a device provider with
a custom function which gives more flexibility when
registering it (see v4l2 register).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/773>
Matthew Waters [Thu, 18 Mar 2021 03:46:15 +0000 (14:46 +1100)]
gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead. GCC 11 has started warning about using volatile
with atomic operations.
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/775>
Seungha Yang [Wed, 18 Nov 2020 13:32:30 +0000 (22:32 +0900)]
clocksync: Add a new property "sync-to-first" for automatic ts-offset setup
Add a new property so that clocksync can setup "ts-offset" value
based on the first buffer and pipeline's running time when the
first arrived. Newly update "ts-offset" in this case would be
a value that allows outputting the first buffer without clock waiting.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/702>
Olivier Crête [Tue, 16 Mar 2021 23:02:06 +0000 (19:02 -0400)]
aggregator: Release the SRC lock while querying latency
This is required because the query could be intercepted and the
application could send any other requests to the element from this
thread.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/771>
Mathieu Duponchelle [Wed, 17 Mar 2021 13:06:51 +0000 (14:06 +0100)]
value: fix parsing of explicit value casts
Since
acdb4ce03d525a18f6c351a040b8446c7bbd98bd , parsing of the
value for a property can use the pspec to determine what type
a value should be casted to.
However, this broke the case where the value is explicitly casted
to a type (eg <(float) 0.0>). In that situation, we want to respect
the casting decision, and only use the pspec to perform "implicit"
casts.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/881
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/772>
Guillaume Desmottes [Thu, 11 Mar 2021 14:41:16 +0000 (15:41 +0100)]
clock: define AUTO_CLEANUP_FREE_FUNC for GstClockID
GstClockID is secretly a gpointer so we can't use g_autoptr(),
instead user can do:
g_auto (GstClockID) clock_id = 0;
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/769>
Stéphane Cerveau [Mon, 8 Mar 2021 09:27:15 +0000 (10:27 +0100)]
element: remove useless ret test
The ret test is unrelevant and confusing.
We dont want the code to fail and the register
to succeed by example.
In the case of a conditional element_init,
the element should be defined with
GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/768>
Stéphane Cerveau [Fri, 26 Feb 2021 09:47:38 +0000 (10:47 +0100)]
bash-completion: various bash fixes
-d tests the folder which is existing but with .in file, so I prefered
the -f to test if the gst file was available which is not the case, so
it fallbacks on the pkg-config
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/766>
Stéphane Cerveau [Fri, 26 Feb 2021 09:01:56 +0000 (10:01 +0100)]
meson: add uninstalled var for bash-completion
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/766>
Guillaume Desmottes [Wed, 24 Feb 2021 12:03:47 +0000 (13:03 +0100)]
miniobject: add GST_TYPE_MINI_OBJECT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/764>
Mathieu Duponchelle [Wed, 17 Feb 2021 17:35:33 +0000 (18:35 +0100)]
docs: standardize debugutils documentation
* add a SECTION comment
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/760>
Mathieu Duponchelle [Tue, 16 Feb 2021 15:18:08 +0000 (16:18 +0100)]
docs: standardize GstControlSource, GstDateTime documentation
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/759>
Mathieu Duponchelle [Thu, 21 Jan 2021 01:04:25 +0000 (02:04 +0100)]
Revert "baseparse: always use incoming DTS"
This reverts commit
fc5cd9591a3fe09458342cfedfff88d57bc330c7.
Mathieu Duponchelle [Mon, 15 Feb 2021 14:06:46 +0000 (15:06 +0100)]
docs: standardize GstContext, GstControlBinding documentation
* Document virtual methods in standalone comments, in order to properly
annotate them
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Mark GstControlBinding ABI field as private
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/758>
Mathieu Duponchelle [Fri, 12 Feb 2021 16:50:21 +0000 (17:50 +0100)]
docs: standardize GstClock documentation
* Don't mention explicitly that API is MT safe, this implies that
other API is not. GStreamer API is assumed to be MT safe, thread
safety should only be explicitly mentioned when API is *not* MT safe
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Document virtual methods in standalone comments, so that parameters
can be documented. This is not critical here, as parameters do not
need annotations / specific documentation, but serves as an up to
date example
* Document enumeration members in standalone comments, so that their
Since tag is accounted for by gobject-introspection
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/756>
Stéphane Cerveau [Mon, 15 Feb 2021 08:54:51 +0000 (09:54 +0100)]
features: remove extra G_BEGIN_DECLS/G_END_DECLS
_GST_ELEMENT_REGISTER_DEFINE_BEGIN
_GST_ELEMENT_REGISTER_DEFINE_END was introducing
an extra extern "C" in case of c++ build.
Add missing ";" in GST_ELEMENT_REGISTER_DECLARE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/757>
Mathieu Duponchelle [Thu, 11 Feb 2021 15:04:01 +0000 (16:04 +0100)]
docs: standardize GstCapsFeatures, GstChildProxy documentation
* Don't mention explicitly that API is MT safe, this implies that
other API is not. GStreamer API is assumed to be MT safe, thread
safety should only be explicitly mentioned when API is *not* MT safe
* Document virtual methods in standalone comments, in order to properly
annotate them
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/755>
Mathieu Duponchelle [Wed, 10 Feb 2021 13:19:18 +0000 (14:19 +0100)]
docs: standardize GstCaps documentation
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Reword the warnings for caps nestability in light of the 1.20
improvements
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/754>
Jan Schmidt [Tue, 9 Feb 2021 17:14:48 +0000 (04:14 +1100)]
tests: Add disjoint pad probe removal test.
Add a test that removing a blocking probe on events when there
is a different blocking probe on buffers releases the data flow.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/749>
Jan Schmidt [Fri, 5 Feb 2021 16:58:54 +0000 (03:58 +1100)]
pad: Improve the documentation for GstPadProbeReturn.
Explain that GST_PAD_PROBE_PASS will pass data even if there is
another pad probe that says to block, and that GST_PAD_PROBE_REMOVE
passes data and potentially unblocks the pad.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/749>
Jan Schmidt [Fri, 5 Feb 2021 16:41:23 +0000 (03:41 +1100)]
pad: Fix for multiple blocking probes interaction.
Change the way the marshalled flag in the internal ProbeMarshall state
is handled when iterating over pad probes so that it only counts
probes that still exist and would be called when retrying.
This improves the way that removing a blocking probe works when
there are multiple blocking probes for different conditions (data vs
events for example).
As a side-effect, probes aren't put into the the called_probes array
unless they actually match the current probe type and would be called,
potentially reducing the number of hooks that get stored in the
called_probes array, and the cost of the looping check on retries.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/658
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/749>
Mathieu Duponchelle [Tue, 9 Feb 2021 14:30:50 +0000 (15:30 +0100)]
docs: standardize GstBus documentation
* Don't mention explicitly that API is MT safe, this implies that
other API is not. GStreamer API is assumed to be MT safe, thread
safety should only be explicitly mentioned when API is *not* MT safe
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Document virtual methods and the class structure
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/753>
Mathieu Duponchelle [Mon, 8 Feb 2021 14:17:05 +0000 (15:17 +0100)]
docs: standardize GstBufferPool documentation
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Document virtual methods in standalone comments, so that parameters
can be documented. This is functionally useful here, as parameters
require annotations, and should make the class more usable by
bindings.
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/752>
Mathieu Duponchelle [Mon, 8 Feb 2021 13:31:09 +0000 (14:31 +0100)]
docs: standardize GstBufferList documentation
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/752>
Mathieu Duponchelle [Mon, 8 Feb 2021 12:53:51 +0000 (13:53 +0100)]
docs: fix GST_BUFFER_COPY_DEEP comment title
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/752>
Mathieu Duponchelle [Fri, 5 Feb 2021 13:55:37 +0000 (14:55 +0100)]
docs: standardize GstBuffer documentation
* Don't mention explicitly that API is MT safe, this implies that
other API is not. GStreamer API is assumed to be MT safe, thread
safety should only be explicitly mentioned when API is *not* MT safe
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Document enumeration members in standalone comments, so that their
Since tag is accounted for by gobject-introspection
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/748>
Mathieu Duponchelle [Thu, 4 Feb 2021 15:15:39 +0000 (16:15 +0100)]
docs: standardize GstBin documentation
* Don't mention explicitly that API is MT safe, this implies that
other API is not. GStreamer API is assumed to be MT safe, thread
safety should only be explicitly mentioned when API is *not* MT safe
* Don't repeat what annotations are stating with respect to ownership
transfer, nullability
* Document virtual methods in standalone comments, so that parameters
can be documented. This is not critical here, as parameters do not
need annotations / specific documentation, but serves as an up to
date example
* Document enumeration members in standalone comments, so that their
Since tag is accounted for by gobject-introspection
* Misc cleanup / typo fixes / addition of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/747>
Mathieu Duponchelle [Thu, 4 Feb 2021 14:18:04 +0000 (15:18 +0100)]
docs: reformat and cleanup GstBin SECTION comment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/747>
Mathieu Duponchelle [Tue, 2 Feb 2021 15:41:28 +0000 (16:41 +0100)]
docs: clean up GstAllocator documentation
In particular, there is no need to explicitly mention free
functions / ownership transfers, this should be obvious from
the annotations.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/745>
Mathieu Duponchelle [Tue, 2 Feb 2021 15:34:03 +0000 (16:34 +0100)]
docs: sort GstAllocator doc so that GstAllocator appears first
The default ordering is alphabetical, causing GstAllocationParams
to appear first in the page if left auto-sorted
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/745>
Mathieu Duponchelle [Tue, 2 Feb 2021 15:19:46 +0000 (16:19 +0100)]
docs: cleanup gst.c documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/745>
Seungha Yang [Fri, 29 Jan 2021 14:07:34 +0000 (23:07 +0900)]
filesrc/filesink: Use g_open/g_fopen and g_close instead of ours
There should be no more cross-CRT issue on Windows since we bumped
MinGW toolchain
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/744>
Sebastian Dröge [Sun, 31 Jan 2021 10:12:09 +0000 (12:12 +0200)]
info: Don't leak log function user_data if the debug system is compiled out
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/742>
Aleksandr Slobodeniuk [Mon, 25 Jan 2021 21:51:33 +0000 (22:51 +0100)]
gstvalue: fix compilation warning in "holds" macros
GST_VALUE_HOLDS_... macros may cause -Waddress warning
on gcc if GValue is allocated on stack:
gstvalue.h:145:46: warning: the comparison will always
evaluate as ‘true’ for the address of ‘v’ will never
be NULL [-Waddress]
#define GST_VALUE_HOLDS_CAPS(x) ((x) != NULL &&
G_VALUE_TYPE(x) == _gst_caps_type)
Fixes #653
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/738>
Chris White [Thu, 24 Dec 2020 19:06:29 +0000 (14:06 -0500)]
structure: add tests of deserializing strings with escapes
Shows the issue described in
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303#note_272629>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
Henry Wilkes [Mon, 28 Oct 2019 18:06:14 +0000 (18:06 +0000)]
gstvalue: preserve parse behaviour with warning
Preserve the previous behaviour where:
name, val="5";
passed to gst_structure_from_string would have resulted in an int value,
rather than a string, despite the quote marks.
This will be changed to being interpreted as a string in the future, but
for the time being we will issue a warning about this to give users time
to fix their code to no longer rely on this bug.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
Henry Wilkes [Wed, 23 Oct 2019 11:48:32 +0000 (12:48 +0100)]
gstvalue: make gst_string_unwrap less strict
Allow a string in gst_string_unwrap to include unescaped characters that
are not in GST_STRING_IS_ASCII. This extra leniency allows
gst_structure_from_string to, e.g., receive
name, val=(string)"string with space";
Note that many gst tests, and potentially users, exploited this behaviour
by giving
name, val="string with space";
i.e. without the (string) type specifier. This was allowed before
because, without a type specifier, the string was passed to
_priv_gst_value_parse_string with unescape set to TRUE, *rather* than
being sent to gst_string_unwrap. This caused a difference in behaviour
between strings that are or are not preceded by (string). E.g.
name, val=(string)"string with space";
would fail, whilst
name, val="string with space";
would not. And
name, val=(string)"\316\261";
would produce a val="α", whereas
name, val=(string)"\316\261";
would produce a val="316261" (a bug).
The current behaviour is to treat both of these cases the same, which is
desirable. But in order to not break potentially common usage of this
discrepancy (it was in our own tests), the best option is to make string
parsing less strict in general.
New behaviour would be for
name, val=(string)"string with space";
to pass and give val="string with space", and
name, val="\316\261";
would produce a val="α".
Also changed deserializing string test to expect successes where
previously a failure was expected.
In a similar way, this also effected the deserializing of GstStructure,
GstCaps, GstTagList and GstCapsFeatures. So, now
name, val=(structure)"sub-name, sub-val=(string)\"a: \\316\\261\";";
will also pass and give sub-val="a: α". Note that the quote marks
and backslash still need to be escaped for the sub-structure, but other
characters need not be.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
Henry Wilkes [Fri, 18 Oct 2019 22:11:44 +0000 (23:11 +0100)]
value: add serialize-deserialize tests
Added tests to ensure that the gst_value_deserialize reverses
gst_value_serialize.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
Henry Wilkes [Fri, 18 Oct 2019 12:00:33 +0000 (13:00 +0100)]
structure: don't unescape values before deserializing
No longer call _priv_gst_value_parse_string with unescape set to TRUE
before passing a value to gst_value_deserialize in
_priv_gst_value_parse_value. This latter function is called by
gst_structure_from_string and gst_caps_from_string.
When gst_structure_to_string and gst_caps_to_string are called, no
escaping is performed after calling gst_value_serialize. Therefore, by
unescaping the value string, we were introducing an additional operation
that was not performed by the original *_to_string functions. In
particular, this has meant that the derialization functions for many
non-basic types are incomplete reverses of the corresponding
serialization function (i.e., if you pipe the output of the
serialization function into the deserialization function it could fail)
because they have to compensate for this additional escaping operation,
when really this should be the domain of the deserialization functions
instead.
Correspondingly changed a few deserialization functions.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/452
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
Seungha Yang [Thu, 14 Jan 2021 16:16:34 +0000 (01:16 +0900)]
task: Use SetThreadDescription Win32 API for setting thread name
Since Windows 10 1607, we can make use of SetThreadDescription() API
for setting thread name. Unlike previously used exception based
method, this API will preserve configured thread name on dump file.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/735>
Jan Alexander Steffens (heftig) [Thu, 14 Jan 2021 14:50:05 +0000 (15:50 +0100)]
tests: systemclock: Stop all stress threads before joining them
This reduces the chance of the main thread getting starved while trying
to shut down the test, potentially causing a timeout.
Even on an idle 96-processor system this reduces the duration of the
systemclock tests from ~8s to ~3s.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/734>
Marijn Suijten [Thu, 14 Jan 2021 09:18:51 +0000 (10:18 +0100)]
gstmemory: Mark memory_map @info as `caller-allocates`
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/730>
Marijn Suijten [Thu, 14 Jan 2021 09:20:41 +0000 (10:20 +0100)]
gstbuffer: Mark buffer_map* @info as `caller-allocates`
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/730>
Marijn Suijten [Thu, 7 Jan 2021 08:53:41 +0000 (09:53 +0100)]
gst,base: Take GstAllocationParams parameter by const ptr
This parameter is only informational and should not be modified. Enforce
this at compile-time and to get the right signature in G-IR.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/730>
Seungha Yang [Tue, 12 Jan 2021 18:01:57 +0000 (03:01 +0900)]
uri: Remove leftover documentation
Follow-up from https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/728
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/732>
Seungha Yang [Fri, 8 Jan 2021 11:23:23 +0000 (20:23 +0900)]
gst: Add non-inline methods for bindings to able to use core APIs
Provide non-inline version of refcounting APIs so that it can be
consumed by bindings
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer-sharp/-/issues/46
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/728>
Philippe Normand [Thu, 7 Jan 2021 11:04:48 +0000 (11:04 +0000)]
concat: Fix active-pad property doc typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/727>
Dmitry Samoylov [Wed, 23 Dec 2020 17:40:33 +0000 (00:40 +0700)]
gst: Fix doc comments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/725>
Michael Tretter [Fri, 23 Oct 2020 15:44:10 +0000 (17:44 +0200)]
pipeline: clarify that applications should handle bus messages
The pipeline posts messages on the bus even if an application does not
handle the messages. This is expected behavior but may leak messages if
the messages are not handled.
Clarify the documentation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/680>
Fredrik Pålsson [Sat, 12 Dec 2020 22:28:46 +0000 (22:28 +0000)]
gstbus: change log level of repeated messages from INFO to DEBUG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/722>