platform/upstream/gstreamer.git
2 years agoMove the defines from spec to meson.build 55/269655/4
Gilbok Lee [Thu, 20 Jan 2022 01:15:56 +0000 (10:15 +0900)]
Move the defines from spec to meson.build

Change-Id: Ic7483b9b364186652edb075b6681a6992185bde2

2 years agofix tv profile option bug
Eunhye Choi [Thu, 13 Jan 2022 14:09:08 +0000 (23:09 +0900)]
fix tv profile option bug

Change-Id: Ibdb6db6df54241508910f4345d434534f9719f22

2 years agoapply meson option and fix build error 98/269298/3
Eunhye Choi [Wed, 12 Jan 2022 20:57:38 +0000 (05:57 +0900)]
apply meson option and fix build error

- apply meson option
- fix packaging error
- .gbs.conf will be applied after

Change-Id: Ic53c05c010f88e43500fbd09334f0d12f1a38aa5

2 years agoMerge remote-tracking branch 'upstream/master' into tizen
Gilbok Lee [Wed, 12 Jan 2022 05:31:00 +0000 (14:31 +0900)]
Merge remote-tracking branch 'upstream/master' into tizen

Change-Id: If3cf3c18b851741dcaec1b5a01796b7ba12242bc

2 years agoUse g_memdup2() where available and add fallback for older GLib versions 33/267933/1 accepted/tizen/unified/20211222.230738 submit/tizen/20211212.233427
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>

Change-Id: I1adcb816a0cc48003200b46c08d2d58985a79b59
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
2 years agoRelease 1.19.2
Tim-Philipp Müller [Thu, 23 Sep 2021 00:32:32 +0000 (01:32 +0100)]
Release 1.19.2

2 years agoclocksync: Add some debug output to the clock waiting code
Sebastian Dröge [Wed, 23 Jun 2021 13:41:20 +0000 (16:41 +0300)]
clocksync: Add some debug output to the clock waiting code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/841>

2 years agogst: Initialize optional event/message fields when parsing
Sebastian Dröge [Mon, 20 Sep 2021 10:12:12 +0000 (13:12 +0300)]
gst: Initialize optional event/message fields when parsing

These might not exist inside the structure and then we would potentially
keep around uninitialized memory from the caller in the out parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/887>

2 years agotest: bitwriter: Add a test for reset_and_get_data when not byte unaligned.
He Junyan [Sun, 19 Sep 2021 13:01:21 +0000 (21:01 +0800)]
test: bitwriter: Add a test for reset_and_get_data when not byte unaligned.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/886>

2 years agobitwriter: Fix a memory leak in reset_and_get_buffer.
He Junyan [Sun, 19 Sep 2021 14:39:09 +0000 (22:39 +0800)]
bitwriter: Fix a memory leak in reset_and_get_buffer.

We should record the ownership of the data before we reset the bitwriter.
Or we will always dup the buffer data and leak the memory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/886>

2 years agobitwriter: Fix the trailing bits lost when getting its data.
He Junyan [Sat, 18 Sep 2021 16:19:43 +0000 (00:19 +0800)]
bitwriter: Fix the trailing bits lost when getting its data.

In reset_and_get_data and reset_and_get_buffer, it fails to include
the trailing bits less than 8. So, when the bit_size is not byte
aligned, the trailing bits are lost in the return buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/886>

2 years agomultiqueue: fix obsolete comment re initial flow status
Mathieu Duponchelle [Thu, 9 Sep 2021 23:43:18 +0000 (01:43 +0200)]
multiqueue: fix obsolete comment re initial flow status

The initial single queue srcresult is OK, it hasn't been
NOT_LINKED since 2007.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/885>

2 years agomultiqueue: never consider a queue that is not waiting
Mathieu Duponchelle [Thu, 9 Sep 2021 18:25:25 +0000 (20:25 +0200)]
multiqueue: never consider a queue that is not waiting

.. when computing the high id.

After a flush for instance, sq->srcresult is reset to OK,
yet it doesn't make sense to pick a non-existing position
id as the high id when a queue doesn't contain any items
in that situation either.

It is in any case completely OK to let the not-linked stream
get consumed without throttling at this stage, as any
first packet arriving on other single queues will get assigned
a higher position id.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/885>

2 years agoadd missing space
Andika Triwidada [Thu, 9 Sep 2021 04:08:22 +0000 (04:08 +0000)]
add missing space

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/884>

2 years agomultiqueue: Use running time of gap events for wakeups.
Jan Schmidt [Sun, 5 Sep 2021 15:43:57 +0000 (01:43 +1000)]
multiqueue: Use running time of gap events for wakeups.

Use gap events to update the next_time of a queue the same
as buffers or segment events. Fixes problems where a group
consisting only of sparse streams primarily driven by
gap events would stall with a full multiqueue because
unlinked streams in the group were not being woken to
push data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/879>

2 years agoelement: NULL the lists of contexts in dispose()
Matthew Waters [Fri, 27 Aug 2021 03:51:07 +0000 (13:51 +1000)]
element: NULL the lists of contexts in dispose()

If dispose() is called more than once, we may double unref the list of
GstContext's.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/875>

2 years agopad: Keep IDLE probe hook alive during immediate callback
Jan Alexander Steffens (heftig) [Tue, 24 Aug 2021 12:53:30 +0000 (14:53 +0200)]
pad: Keep IDLE probe hook alive during immediate callback

When the probe returns GST_PAD_PROBE_REMOVE and gets called concurrently
from the streaming thread while we're in the callback here, the hook has
already been destroyed by the time we've reacquired the object lock.
Consequently, cleanup_hook gets passed an invalid pointer.

Keep another reference to the hook alive to avoid this situation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/873>

2 years agoconcat: Properly propagate seqnum of segment events
Edward Hervey [Fri, 20 Aug 2021 14:34:16 +0000 (16:34 +0200)]
concat: Properly propagate seqnum of segment events

Was broken by https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/819

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/871>

2 years agotests: elementfactory: add element creation tests
Théo MAILLART [Sun, 10 Jan 2021 22:37:21 +0000 (23:37 +0100)]
tests: elementfactory: add element creation tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/736>

2 years agoelementfactory: enable construct only property passing
Théo MAILLART [Fri, 29 Jan 2021 19:36:51 +0000 (20:36 +0100)]
elementfactory: enable construct only property passing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/736>

2 years agotracer: Add new tracer to list loaded elements and other features
Olivier Crête [Wed, 31 Mar 2021 22:36:00 +0000 (18:36 -0400)]
tracer: Add new tracer to list loaded elements and other features

This new tracer will list loaded elements and plugins. This should
make it easier to generate minimal builds of GStreamer.

This also traces other features such as typefind functions, device
providers and dynamic types.

The format of the output of gst-stats should match the parameters
expected by the meson based gst-build system.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/782>

2 years agotracers: Add tracepoint when a plugin feature it loaded
Olivier Crête [Fri, 23 Apr 2021 19:34:26 +0000 (15:34 -0400)]
tracers: Add tracepoint when a plugin feature it loaded

This makes it possible to trace which ones are loaded in a specific
program to make nice statistics.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/782>

2 years agopad: Ensure last flow return is set on sink pads in push mode
Edward Hervey [Wed, 18 Aug 2021 08:23:38 +0000 (10:23 +0200)]
pad: Ensure last flow return is set on sink pads in push mode

The last flow return field was never updated on sink pads in push mode. This
fixes it and makes it consistent.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/868>

2 years agogstbuffer: Use g_memdup2 instead of g_memdup
Nirbheek Chauhan [Fri, 13 Aug 2021 13:51:41 +0000 (19:21 +0530)]
gstbuffer: Use g_memdup2 instead of g_memdup

This was added in !826 which was created after !803 (which changes
g_memdup -> g_memdup2), but merged before it, so it slipped through.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/866>

2 years agoplugin: load plugins with unknown license strings
Tim-Philipp Müller [Tue, 10 Aug 2021 12:35:14 +0000 (13:35 +0100)]
plugin: load plugins with unknown license strings

We shouldn't fail to load plugins just because we don't
recognise the license string. It's not our job to validate
licenses, and the license list is outdated and ambiguous
anyway.

Also add MPL-2.0 to the list, and fix some defunct license
URLs in the code comments.

Get rid of the hard-coded skip index, doesn't really buy us
much versus just skipping with a few strlens, and is harder
to maintain.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/864>

2 years agoidentity: provide a log to check the buffers
Stéphane Cerveau [Mon, 2 Aug 2021 12:23:58 +0000 (14:23 +0200)]
identity: provide a log to check the buffers

In order to not rely only on app to display the
message from identity, display the message in the logs
too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/863>

2 years agoexamples: controller-graph: Fix build with MSVC
Seungha Yang [Sat, 31 Jul 2021 18:36:31 +0000 (03:36 +0900)]
examples: controller-graph: Fix build with MSVC

To use macros in math.h, one needs to define _USE_MATH_DEFINES
before including the math.h file. Use glib's math define instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/862>

2 years agogst-launch: Enable Windows high-resolution clock
Seungha Yang [Tue, 11 May 2021 15:54:43 +0000 (00:54 +0900)]
gst-launch: Enable Windows high-resolution clock

Default timer precision of Windows is dependent on system, but
usually it's known to be about 15ms in worst case.
That's not an enough precision for multimedia application.

Enable high-resolution clock in gst-launch to demonstrate
the usage of Windows high-precision clock for application developers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/817>

2 years agoinput-selector: Use proper segments when cleaning cached buffers
Jan Alexander Steffens (heftig) [Fri, 23 Jul 2021 14:20:20 +0000 (16:20 +0200)]
input-selector: Use proper segments when cleaning cached buffers

We need to use the segment associated with the cached buffer, not the
current segment of the pad, otherwise we miscalculate the running time
of cached buffers from before a segment change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/859>

2 years agogitlab: update bug template
Stéphane Cerveau [Tue, 20 Jul 2021 07:51:04 +0000 (09:51 +0200)]
gitlab: update bug template

Finetune the bug description.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/854>

2 years agogsturi: Set GError if uri is invalid
Zhao, Gang [Sun, 9 May 2021 03:45:49 +0000 (11:45 +0800)]
gsturi: Set GError if uri is invalid

GError should be set if function call failed and the failed reason is
not a programmer error.

Fixed: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1380
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/816>

2 years agogsturi: Don't treat invalid format of uri as critical error
Zhao, Gang [Sun, 9 May 2021 03:13:48 +0000 (11:13 +0800)]
gsturi: Don't treat invalid format of uri as critical error

Normally uri is get from user input and invalid user input should not
be treated as critical error. Moved gst_uri_is_valid outside of
g_return_val_if_fail.

NULL uri is checked inside of gst_uri_is_valid and is correctly
treated as critical error, removed unneeded checks of NULL uri outside
of gst_uri_is_valid function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/816>

2 years agosystemclock: Restore default clock mode to monotonic for non-linux system
Seungha Yang [Tue, 20 Jul 2021 07:52:12 +0000 (16:52 +0900)]
systemclock: Restore default clock mode to monotonic for non-linux system

Before the MR https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/829
Windows and macOS system clock used monotonic clock regardless of
selected clock mode. And because of clock resolution, we should prefer
monotonic over realtime unless realtime clock is selected explicitly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/855>

2 years agobasesink: Don't swap rstart/rstop when stepping
Seungha Yang [Wed, 7 Jul 2021 11:11:13 +0000 (20:11 +0900)]
basesink: Don't swap rstart/rstop when stepping

Step handling is implemented based on unmodified start/stop
segment running time, and basesink takes rate into account for
stepping. This commit is partially undoing new behavior introduced by
the commit of 39b9cc554c960fec8d41f8394c41390883cadeed when stepping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/848>

2 years agogstptpclock: Don't leak the GList
Nirbheek Chauhan [Mon, 19 Jul 2021 14:34:16 +0000 (20:04 +0530)]
gstptpclock: Don't leak the GList

120 bytes in 5 blocks are definitely lost in loss record 7,615 of 9,510
   at 0x484486F: malloc (vg_replace_malloc.c:380)
   by 0x58A2938: g_malloc (gmem.c:106)
   by 0x58BA1F4: g_slice_alloc (gslice.c:1069)
   by 0x588F059: g_list_prepend (glist.c:335)
   by 0x5B9C5C0: select_best_master_clock (gstptpclock.c:756)
   by 0x5B9CA8E: cleanup_cb (gstptpclock.c:1930)
   by 0x589AD20: g_timeout_dispatch (gmain.c:4889)
   by 0x589A4CE: UnknownInlinedFun (gmain.c:3337)
   by 0x589A4CE: g_main_context_dispatch (gmain.c:4055)
   by 0x58EE4E7: g_main_context_iterate.constprop.0 (gmain.c:4131)
   by 0x5899A92: g_main_loop_run (gmain.c:4329)
   by 0x5B9BA4C: ptp_helper_main (gstptpclock.c:1980)
   by 0x58C8C31: g_thread_proxy (gthread.c:826)

576 bytes in 24 blocks are definitely lost in loss record 8,782 of 9,510
   at 0x484486F: malloc (vg_replace_malloc.c:380)
   by 0x58A2938: g_malloc (gmem.c:106)
   by 0x58BA1F4: g_slice_alloc (gslice.c:1069)
   by 0x588F059: g_list_prepend (glist.c:335)
   by 0x5B9C5C0: select_best_master_clock (gstptpclock.c:756)
   by 0x5B9EFA0: handle_announce_message (gstptpclock.c:934)
   by 0x5B9EFA0: handle_ptp_message (gstptpclock.c:1765)
   by 0x5B9EFA0: have_stdin_data_cb (gstptpclock.c:1851)
   by 0x589A4CE: UnknownInlinedFun (gmain.c:3337)
   by 0x589A4CE: g_main_context_dispatch (gmain.c:4055)
   by 0x58EE4E7: g_main_context_iterate.constprop.0 (gmain.c:4131)
   by 0x5899A92: g_main_loop_run (gmain.c:4329)
   by 0x5B9BA4C: ptp_helper_main (gstptpclock.c:1980)
   by 0x58C8C31: g_thread_proxy (gthread.c:826)
   by 0x5DA4298: start_thread (pthread_create.c:481)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/852>

2 years agogstpad: Don't spam INFO when default-chaining a buffer list
Nirbheek Chauhan [Tue, 6 Jul 2021 07:34:04 +0000 (13:04 +0530)]
gstpad: Don't spam INFO when default-chaining a buffer list

This is being logged for each buffer, so it should not use INFO.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/853>

2 years agogitlab: add bug template
Stéphane Cerveau [Tue, 15 Jun 2021 08:23:33 +0000 (10:23 +0200)]
gitlab: add bug template

To clarify what is expected in an issue description and avoid
issue which is just an usage issue, add a bug template in gitlab.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/836>

2 years agoAdd meson description for tracer_hooks
Kasper Steensig Jensen [Thu, 8 Jul 2021 09:48:58 +0000 (11:48 +0200)]
Add meson description for tracer_hooks

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/849>

2 years agogstinfo: Improve usage of libdw for backtraces
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>

2 years agoparse: Fix a critical when using the : operator.
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>

2 years agobasesink: Post a latency message whenever we're ready to answer the query
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>

2 years agobasesrc: Print segments with GST_SEGMENT_FORMAT and not GST_PTR_FORMAT
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>

2 years agoFix GI annotations.
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>

2 years agoUpdate COPYING to LGPL 2.1
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>

2 years agoparse: Don't do delayed property setting for top-level properties.
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>

2 years agoCheck mandatory ClockTime arguments
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>

3 years agoUse g_memdup2() where available and add fallback for older GLib versions
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>

3 years agointrospection: annotate ownership in more vfuncs
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>

3 years agointrospection: annotate handle_message ownership
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>

3 years agotracers: leaks: log when tracer is exiting
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>

3 years agoBack to development
Tim-Philipp Müller [Tue, 1 Jun 2021 14:28:13 +0000 (15:28 +0100)]
Back to development

3 years agomultiqueue: skip buffering except audio and video 92/259092/1 accepted/tizen_6.5_unified tizen_6.5 accepted/tizen/6.5/unified/20211029.013458 accepted/tizen/unified/20210624.131907 submit/tizen/20210616.025147 submit/tizen/20210621.051655 submit/tizen_6.5/20211028.163401 tizen_6.5.m2_release
Eunhye Choi [Mon, 31 May 2021 11:41:40 +0000 (20:41 +0900)]
multiqueue: skip buffering except audio and video

- invalid buffering msg is posted by text track which data is too small.
  so consider the audio and video track only for buffering.

Change-Id: Ib4d579dbbba7c3c105ed67e8f287c972ba9386fa

3 years agoRelease 1.19.1
Tim-Philipp Müller [Mon, 31 May 2021 23:07:53 +0000 (00:07 +0100)]
Release 1.19.1

3 years agosystemclock: fall back to g_get_monotonic_time
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>

3 years agosystemclock: reorg real and mono time functions for macOS and win32
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>

3 years agosystemclock: Use g_get_real_time on Windows and macOS for realtime clock
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>

3 years agosystemclock: Reorganize defined checks for parts of GstSystemClock
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>

3 years agobuffer: rename new gst_buffer_new_copy() to gst_buffer_new_memdup()
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>

3 years agobuffer: add gst_buffer_new_copy() convenience function
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>

3 years agodocs: random: clean up outdated documents
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>

3 years agoconcat: adjust running time offsets on events
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>

3 years agodoc: base: Fix reference to virtual function
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>

3 years agogstcheck: Ensure unused threadpool threads are stopped
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>

3 years agoconcat: fix locking in SEGMENT event handler
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>

3 years agosparsefile: Fix sparsefile on Win32
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>

3 years agodownloadbuffer: close file before trying to remove
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>

3 years agodownloadbuffer: return flow error on read error
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>

3 years agogstutils: Fix typo in the comment.
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>

3 years agomultiqueue: Ensure peer pad exists when iterating internal links
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>

3 years agogst_child_proxy_get_property: accept G_VALUE_INIT
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>

3 years agoIntroduce gst_element_request_pad_simple
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>

3 years agoharness: Fix object used to log caps warning.
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>

3 years agoclocksync: Add new clocksync element 75/253675/3 accepted/tizen/unified/20210422.005314 submit/tizen/20210421.120517
Jan Schmidt [Mon, 24 Feb 2020 17:47:35 +0000 (04:47 +1100)]
clocksync: Add new clocksync element

The clocksync element is a generic element that can be
placed in a pipeline to synchronise passing buffers to the
clock at that point. This is similar to 'identity sync=true',
but because it isn't GstBaseTransform-based, it can process
GstBufferLists without breaking them into separate GstBuffers

Change-Id: Iacf0e49aa9e595c0270852f5ce1369bae18e25cd

3 years agogsturi: Add new API for storing unmodified userinfo / fragment 79/253379/3
Nirbheek Chauhan [Thu, 30 Jul 2020 14:01:55 +0000 (19:31 +0530)]
gsturi: Add new API for storing unmodified userinfo / fragment

New API: gst_uri_from_string_escaped()

Identical to gst_uri_from_string() except that the userinfo and
fragment components of the URI will not be unescaped while parsing.

This is needed for correctly parsing usernames or passwords with `:`
in them such as reported at:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/831

Change-Id: Ib46abff5f24e259a5e505092fcc99b3fdc82ca3e
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/583>

3 years agotests: Add more tests for gsturi 78/253378/3
Nirbheek Chauhan [Fri, 31 Jul 2020 20:27:06 +0000 (01:57 +0530)]
tests: Add more tests for gsturi

Add tests that exercise unescaping of userinfo and fragments.

Also convert to a modular macro-based definition so that we can reuse
the list of tests in the next commit.

Change-Id: I2229a7d106096ce4525059cff3d4c3c329bb98fc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/583>

3 years agopad: clear probes holding mutex
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>

3 years agoqueue2: Refuse all serialized queries when posting buffering messages
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>

3 years agotests: Remove invalid buffer test in test_get_allowed_caps.
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>

3 years agoleaks: Fix SIGSEGV detecting object type.
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>

3 years agoallocator: add gst_allocation_params_new()
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>

3 years agoclocksync: Fix providing system clock by default
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>

3 years agogstpluginloader: when env var is set do not fall through to system plugin scanner
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>

3 years agogst-inspect: Allow overriding DEFAULT_LESS_OPTS with GST_LESS
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>

3 years agoaggregator: Release pads' peeked buffer when removing the pad or finalizing it
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>

3 years agocaps: Add gst_caps_features_new_single()
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>

3 years agotypefind: add gst_type_find_suggest_empty_simple()
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>

3 years agogst: Add missing G_GNUC_NULL_TERMINATED markers
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>

3 years agosystemclock: Fix deadlock on clock_nanosleep
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>

3 years agoUpdate gst-launch-1.0.1
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>

3 years agobin: Don't special-case G_SIGNAL_RUN_CLEANUP stage in latency signal accumulator
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>

3 years agogst: enforce gst_deinit one call per process
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>

3 years agogst: disable indent for parse_goption_arg
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>

3 years agodevice provider: add custom register macro
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>

3 years agogst: don't use volatile to mean atomic
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>

3 years agoclocksync: Add a new property "sync-to-first" for automatic ts-offset setup
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>

3 years agoaggregator: Release the SRC lock while querying latency
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>

3 years agovalue: fix parsing of explicit value casts
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>

3 years agoclock: define AUTO_CLEANUP_FREE_FUNC for GstClockID
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>

3 years agoelement: remove useless ret test
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>

3 years agobash-completion: various bash fixes
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>