Commit graph

19071 commits

Author SHA1 Message Date
Jan Schmidt f9364a3024 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/850>
2021-07-08 13:16:11 +01:00
Sebastian Dröge 2023446da1 basesrc: Print segments with GST_SEGMENT_FORMAT and not GST_PTR_FORMAT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/844>
2021-06-24 10:11:02 +01:00
Olivier Crête 63350d1930 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/834>
2021-06-11 14:36:35 +01:00
Mathieu Duponchelle 53c68d92d8 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/823>
2021-05-14 19:27:02 +01:00
Mathieu Duponchelle 96800c0b4a 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/822>
2021-05-14 17:12:57 +01:00
Doug Nazar ab4ec53d56 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/821>
2021-05-14 14:36:57 +01:00
Doug Nazar 20d4184a69 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/821>
2021-05-14 14:36:57 +01:00
Doug Nazar a16492a61f downloadbuffer: return flow error on read error
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/821>
2021-05-14 14:36:57 +01:00
Jan Alexander Steffens (heftig) 1dcdde9fdf 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/811>
2021-05-06 12:59:58 +01:00
Miguel Paris 0d1fad0e92 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/800>
2021-04-20 15:13:22 +01:00
Edward Hervey b566cbe022 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/797>
2021-04-17 09:28:46 +01:00
Edward Hervey 93e6261db7 systemclock: Update monotonic reference time when re-scheduling
There is no guarantee that the clock is currently advancing, therefore if we
re-schedule (because of timeouts) a clock wait, we need to re-acquire the
current monotonic clock value against which we will wait.

Avoids spinning the cpu like mad (due to constant timeout) when clocks are
PAUSED.

Fixes #673

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/794>
2021-04-13 12:24:02 +00:00
Doug Nazar daf4e5b410 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/795>
2021-04-13 11:19:54 +01:00
Matthew Waters fdf6a793dc 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/793>
2021-04-13 01:58:54 +01:00
Sebastian Dröge 934e6bb114 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/785>
2021-04-06 20:02:43 +01:00
Tim-Philipp Müller 102232fa62 Back to development 2021-03-15 19:48:45 +00:00
Tim-Philipp Müller eacb7aa8d1 Release 1.18.4 2021-03-15 17:47:25 +00:00
Guillaume Desmottes 5700308701 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/770>
2021-03-11 17:48:40 +00:00
Sebastian Dröge f90e9a71dd 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/743>
2021-01-31 13:41:41 +00:00
Seungha Yang d5150b7c54 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/741>
2021-01-30 15:10:16 +00:00
Marijn Suijten 41999d974e gstmemory: Mark memory_map @info as caller-allocates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/740>
2021-01-28 17:55:51 +00:00
Marijn Suijten 50214723d7 gstbuffer: Mark buffer_map* @info as caller-allocates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/740>
2021-01-28 17:55:50 +00:00
Marijn Suijten 8922fc6436 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/740>
2021-01-28 17:55:50 +00:00
Tim-Philipp Müller 615d4b511a Back to development 2021-01-14 02:16:45 +00:00
Tim-Philipp Müller a42fe476d3 Release 1.18.3 2021-01-13 21:05:14 +00:00
Seungha Yang 968f261fe2 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/731>
2021-01-13 03:47:34 +09:00
Seungha Yang 9aa009ab45 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/731>
2021-01-12 15:26:08 +00:00
Jakub Adam 16178d46c8 harness: don't use GST_DEBUG_OBJECT with GstHarness
GstHarness is not a GObject. Fixes assert on recently added check in
gst_debug_log_valist() if GST_ENABLE_EXTRA_CHECKS is enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/721>
2020-12-11 16:03:10 +00:00
Tim-Philipp Müller eb4c1ffb96 Back to development 2020-12-06 23:56:34 +00:00
Tim-Philipp Müller 6a62351b8a Release 1.18.2 2020-12-06 13:21:20 +00:00
Marijn Suijten 865cfb8ea2 check: gst_test_clock_process_next_clock_id returns nullable
It is possible there are no more pending clocks in the chain, in which
case this function returns null.

See also tests like test_single_shot_async_future that validate NULL
returns.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/716>
2020-12-04 16:13:26 +00:00
Sebastian Dröge 877f2b6800 streams: gst_stream_type_get_name() is not nullable
It takes an enum and only the defined values are valid to pass in here
as it's not extensible from the outside.

Add a g_return_val_if_reached() for the unreachable case and return
"invalid".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/713>
2020-12-02 16:41:43 +00:00
Khem Raj 12937488ae gst_private.h: increse padding in struct _GstClockEntryImpl
When compiling for 32bit architectures with 64bit time_t e.g. riscv32,
the static assert that the GstClockEntryImpl smaller or
equal to the struct _GstClockEntryImpl triggered.
(they were 12bytes off).

To fix this, the padding is increased by 8 bytes (on 32bit).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/695>
2020-11-20 14:59:43 +00:00
Bing Song b39a06065a identity/clocksync: Also provide system clock if sync=false
identity should provide when sync=true. Don't provide when sync=false.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/697>
2020-11-20 14:00:16 +00:00
Jonathan Matthew d1fb776782 typefind: copy seqnum to new segment event
Fixes: #635
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/701>
2020-11-16 10:47:28 +00:00
Sebastian Dröge 2334f5451f Add some missing nullable annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/699>
2020-11-05 15:48:50 +00:00
Jonathan Matthew 39df723ba5 queue2: Fix modes in scheduling query handling
Create a new query to send upstream and copy the flags across from it,
rather than reusing the same query, as this allows us to prevent use
of pull mode when we don't have a download file.

Fixes: #629
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/696>
2020-11-04 10:00:18 +00:00
Chris White e231f1d3af gstinfo: colorize PIDs in log messages
The PIDs on log lines were supposed to be colorized before, but the
escape sequence was incorrect.  With this change, the code uses the
correct sequence to colorize those PIDs.  E.g., instead of `\033[334m`
(incorrect), use `\033[34m` (correct).

This makes the log messages easier to read.  It also reduces the chance
that a buggy terminal will choke on the invalid escape sequence.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/624

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/691>
2020-11-02 11:55:30 +00:00
Jan Schmidt 34b4a03f01 harness: Handle element not being set cleanly.
If a harness is created with gst_harness_new_empty(), there
might not be an internal element to unref on cleanup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/687>
2020-10-30 15:01:25 +00:00
Jan Schmidt 882175dc43 bin: When removing a sink, check if the EOS status changed.
Removing a sink that hasn't posted EOS might change the bin itself
to EOS if it's the last remaining non-EOSed sink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/685>
2020-10-30 12:41:36 +00:00
Nicolas Dufresne c983df161c aggregator: Include min-upstream-latency in buffering time
While we can fixe the upstream latency using the min-upstream-latency, we
are now forced to use queues (hence more thread) in order to store the pending
data whenever we have an upstream source that has lower latency.

This fixes the issue by allowing to buffer the fixed upstream latency. This is
particularly handy on single core systems were having too many threads can
cause serious performance issues.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/684>
2020-10-29 17:53:53 +00:00
Tim-Philipp Müller 6493920826 Back to development 2020-10-27 12:33:56 +00:00
Tim-Philipp Müller 29a8099d1d Release 1.18.1 2020-10-26 11:08:37 +00:00
Mathieu Duponchelle 6ae7d4ec91 aggregator: make peek() has() pop() drop() buffer API threadsafe
Enforce that the last buffer that was peeked (or had its existence
checked) on a pad is the one that gets popped / dropped, resetting
at the end of each aggregation cycle.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/675>
2020-10-14 14:06:54 +01:00
Mathieu Duponchelle a613240c57 gstvalue: don't write to const char *
Our various deserializing functions require NULL terminators
to not over consume substrings (eg fields of an array). Instead
of writing a NULL terminator to the passed-in string, which may
result in segfaults, make a copy of the substring we're interested
in.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/673>
2020-10-13 12:03:06 +01:00
Seungha Yang 9526b56cfd meson: Disallow DbgHelp for UWP build
Most symbols in DbgHelp.h are not allowed for UWP

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/670>
2020-10-12 12:54:32 +01:00
Seungha Yang 41eaa6bf42 info: Fix build on Windows ARM64 device
gstinfo.c(3086): error C2094: label 'done' was undefined

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/668>
2020-10-10 11:46:09 +00:00
Matthew Waters 11e16ee62f build: use cpu_family for arch checks
e.g. on 32-bit arm, we may have armv6, armv7l, armv7hf, etc which all
generally have the same layouts.  cpu_family() groups all of these into
just 'arm' that the ABI check table is expecting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/667>
2020-10-10 11:20:23 +00:00
Jan Alexander Steffens (heftig) 33f2263a0b basetransform: Fix in/outbuf confusion of _default_transform_meta
The default implementation doesn't actually use its buffer parameters,
but this error might have been the cause of some actual confusion in
the plugins code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/666>
2020-10-10 11:44:59 +01:00
Víctor Manuel Jáquez Leal f97a4e2300 padtemplate: add missing annotation
Adds missing "transfer full" annotation for caps parameter in
gst_pad_template_set_documentation_caps()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/660>
2020-10-03 16:04:41 +00:00