platform/upstream/gstreamer.git
3 years agotcp: Convert tcpclientsrc to new helpers.
Doug Nazar [Mon, 19 Apr 2021 19:54:04 +0000 (15:54 -0400)]
tcp: Convert tcpclientsrc to new helpers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1105>

3 years agotcp: Convert tcpserversink to new helpers.
Doug Nazar [Mon, 19 Apr 2021 19:53:36 +0000 (15:53 -0400)]
tcp: Convert tcpserversink to new helpers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1105>

3 years agotcp: Convert tcpserversrc to new helpers.
Doug Nazar [Mon, 19 Apr 2021 19:52:35 +0000 (15:52 -0400)]
tcp: Convert tcpserversrc to new helpers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1105>

3 years agotcp: Add helper functions to lookup hostnames and create sockets.
Doug Nazar [Mon, 19 Apr 2021 19:48:18 +0000 (15:48 -0400)]
tcp: Add helper functions to lookup hostnames and create sockets.

Lookup will now maintain the full list of possible IP address(es).
We can now iterate over all available addresses in case certain
address families (IPv6) are disabled or try connecting to additional
addresses for the clients.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1105>

3 years agotests/tcp: Fail if unable to start pipelines.
Doug Nazar [Mon, 19 Apr 2021 15:53:10 +0000 (11:53 -0400)]
tests/tcp: Fail if unable to start pipelines.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1105>

3 years agotcp: cleanup files
Doug Nazar [Mon, 19 Apr 2021 17:22:16 +0000 (13:22 -0400)]
tcp: cleanup files

consolidate gsttcp.h & gsttcpelements.h
rename gsttcpelement.c to match header

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1105>

3 years agovideodecoder: use DTS if PTS unknown
Stéphane Cerveau [Mon, 19 Apr 2021 11:28:39 +0000 (13:28 +0200)]
videodecoder: use DTS if PTS unknown

The buffer should be set according to DTS if exists
when we are guessin the PTS instead of segment start.
The decoder can receive buffers which are before the segment
in case of seek for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1111>

3 years agoDrop `@` documentation references from functions and external types
Marijn Suijten [Tue, 30 Mar 2021 09:18:17 +0000 (11:18 +0200)]
Drop `@` documentation references from functions and external types

`@` references are used to reference function parameters, struct members
or enum variants _within_ the current type/function.  It cannot and
should not be used to reference to types outside that.

Since C has no notion of member functions it makes little sense to
prefix these with `@`; most of the documentation here was referencing
functions on _different_ types anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1090>

3 years agoplaybin{2,3}: fix base_time selection when flush seeking live
Mathieu Duponchelle [Mon, 12 Apr 2021 12:02:46 +0000 (14:02 +0200)]
playbin{2,3}: fix base_time selection when flush seeking live

This is a direct translation of
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/429>,
as playbin{2,3} insulates its sub groups state changes from the pipeline
base class, it needs to track whether the subgroup is live itself,
and handle RESET_TIME the same way GstPipeline does.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1104>

3 years agooverlaycomposition: Fix test for big endian.
Doug Nazar [Sun, 11 Apr 2021 18:29:30 +0000 (14:29 -0400)]
overlaycomposition: Fix test for big endian.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1103>

3 years agogl: fix up Since markers for newly-added _get_type() functions
Tim-Philipp Müller [Sun, 11 Apr 2021 22:42:13 +0000 (23:42 +0100)]
gl: fix up Since markers for newly-added _get_type() functions

Follow-up to !999 which wasn't backported into 1.18 in the end
after all.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/857

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1101>

3 years agogstgiobasesink: Handle incomplete writes in gst_gio_base_sink_render()
Robin Burchell [Tue, 6 Apr 2021 11:22:15 +0000 (13:22 +0200)]
gstgiobasesink: Handle incomplete writes in gst_gio_base_sink_render()

As the comment asked, yes, incomplete writes can happen.
I have encountered this with an sshfs mount, for example.

It seems like g_output_stream_write_all() is designed to handle this case,
by not returning until the requested buffer has been completely written,
or an error occurs, which seems to match up with the desired behaviour.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/885

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1100>

3 years agoclockoverlay: Fix broken string formatting by strftime() on Windows
Seungha Yang [Sun, 4 Apr 2021 15:34:21 +0000 (00:34 +0900)]
clockoverlay: Fix broken string formatting by strftime() on Windows

Like other foobarA variant APIs on Windows, formatted string
by strftime() is ANSI string, not unicode encoded one.
It would be problematic for non-english locale systems.
We should use unicode version API (wcsftime in this case)
whenever it's possible on Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1093>

3 years agoaudio/alsa: Exit write loop if underlying device is already paused.
Doug Nazar [Wed, 7 Apr 2021 08:25:47 +0000 (04:25 -0400)]
audio/alsa: Exit write loop if underlying device is already paused.

If the alsasink thread starts the write loop but another thread pauses
the underlying alsa device, the sink thread will endlessly loop.

snd_pcm_writei() will return 0 if the state is SND_PCM_STATE_PAUSED
and the loop will never make any progress.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1097>

3 years agomeson: Fix gstreamer-gl-prototypes-1.0.pc
Xavier Claessens [Wed, 7 Apr 2021 12:28:40 +0000 (08:28 -0400)]
meson: Fix gstreamer-gl-prototypes-1.0.pc

This fix a warning because we were generating 2 pc files for gstgl
library. Also fix missing glesv2 in Requires.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1099>

3 years agocodec-utils: properly determine AAC Level
Matej Knopp [Mon, 1 Jun 2020 10:45:36 +0000 (12:45 +0200)]
codec-utils: properly determine AAC Level

Table 1.10 – "Levels for the AAC Profile" only goes to 5 max channels
/ 7 max channel post amendmend, so I assume the number of channels
should not include LFE, otherwise there's no valid level for 5.1 resp.
7.1 (post amendmend)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/680>

3 years agoFix build issue on MinGW64
Binh Truong [Sun, 4 Apr 2021 14:18:59 +0000 (21:18 +0700)]
Fix build issue on MinGW64

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1094>

3 years agortpbuffer: make sure header extension buffer is initialized
Jakub Adam [Thu, 18 Mar 2021 19:13:21 +0000 (20:13 +0100)]
rtpbuffer: make sure header extension buffer is initialized

Based upon valgrind finding:

Conditional jump or move depends on uninitialised value(s)
   at 0x4AFF589: read_rtp_header_extensions (gstrtpbasedepayload.c:1197)
   by 0x4AFF9E5: gst_rtp_base_depayload_set_headers
(gstrtpbasedepayload.c:1298)
   by 0x4AFFEE0: gst_rtp_base_depayload_do_push
(gstrtpbasedepayload.c:1413)
   by 0x4AFFF53: gst_rtp_base_depayload_push
(gstrtpbasedepayload.c:1448)
   by 0x4AFDEBA: gst_rtp_base_depayload_handle_buffer
(gstrtpbasedepayload.c:801)
   by 0x4AFE41E: gst_rtp_base_depayload_chain_list
(gstrtpbasedepayload.c:899)
   by 0x48F262C: gst_pad_chain_data_unchecked (gstpad.c:4414)
   by 0x48F3333: gst_pad_push_data (gstpad.c:4655)
   by 0x48F3DF8: gst_pad_push_list (gstpad.c:4814)
   by 0x4AFAD87: gst_rtp_base_payload_push_list
(gstrtpbasepayload.c:1978)
   by 0x72B3154: gst_rtp_vp8_pay_handle_buffer (gstrtpvp8pay.c:672)
   by 0x4AF7031: gst_rtp_base_payload_chain (gstrtpbasepayload.c:868)
 Uninitialised value was created by a heap allocation
   at 0x483C77F: malloc (in
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x4B8BA78: g_malloc (gmem.c:106)
   by 0x4BA3A9D: g_slice_alloc (gslice.c:1069)
   by 0x488D777: _sysmem_new_block (gstallocator.c:413)
   by 0x488DB28: default_alloc (gstallocator.c:512)
   by 0x488D3E8: gst_allocator_alloc (gstallocator.c:310)
   by 0x4AE97E3: gst_rtp_buffer_set_extension_data (gstrtpbuffer.c:856)
   by 0x4AF9EC6: set_headers (gstrtpbasepayload.c:1757)
   by 0x489FE4D: gst_buffer_list_foreach (gstbufferlist.c:287)
   by 0x4AFA87A: gst_rtp_base_payload_prepare_push
(gstrtpbasepayload.c:1915)
   by 0x4AFAD06: gst_rtp_base_payload_push_list
(gstrtpbasepayload.c:1970)
   by 0x72B3154: gst_rtp_vp8_pay_handle_buffer (gstrtpvp8pay.c:672)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1075>

3 years agotypefind: use new gst_type_find_suggest_empty_simple()
Chris White [Fri, 2 Apr 2021 01:44:10 +0000 (21:44 -0400)]
typefind: use new gst_type_find_suggest_empty_simple()

gst_type_find_suggest_simple() now requires a NULL terminator.
Use the new, simpler API for no-parameter calls.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774#note_861492

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1092>

3 years agovideoaggregator: allow selecting an alpha output from non-alpha inputs
Matthew Waters [Wed, 3 Mar 2021 07:28:54 +0000 (18:28 +1100)]
videoaggregator: allow selecting an alpha output from non-alpha inputs

e.g. if we have:

video-x/raw,format=I420 ! compositor ! video/x-raw,format=BGRA

This will currently produce a warning as the alpha-ness of the chosen
'best' format (I420) will be different from the value restricted by the
downstream caps filter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1059>

3 years agoxvimage: allow per feature registration
Stéphane Cerveau [Mon, 29 Mar 2021 12:10:12 +0000 (14:10 +0200)]
xvimage: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1089>

3 years agoximage: allow per feature registration
Stéphane Cerveau [Mon, 29 Mar 2021 12:09:16 +0000 (14:09 +0200)]
ximage: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1089>

3 years agoaudiotestsrc: allow per feature registration
Stéphane Cerveau [Mon, 29 Mar 2021 12:07:00 +0000 (14:07 +0200)]
audiotestsrc: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1089>

3 years agoaudioresample: allow per feature registration
Stéphane Cerveau [Mon, 29 Mar 2021 12:06:30 +0000 (14:06 +0200)]
audioresample: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1089>

3 years agoaudiorate: allow per feature registration
Stéphane Cerveau [Mon, 29 Mar 2021 12:06:00 +0000 (14:06 +0200)]
audiorate: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1089>

3 years agoplayback: Don't special-case G_SIGNAL_RUN_CLEANUP stage in signal accumulators
Sebastian Dröge [Fri, 19 Mar 2021 08:31:58 +0000 (10:31 +0200)]
playback: Don't special-case G_SIGNAL_RUN_CLEANUP stage in signal accumulators

All these signals don't run the class handler in the CLEANUP stage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1076>

3 years agotools: Fix incorrect argument in gst-device-monitor-1.0 manpage
Luke Yelavich [Wed, 24 Mar 2021 22:35:31 +0000 (09:35 +1100)]
tools: Fix incorrect argument in gst-device-monitor-1.0 manpage

The --include-hidden argument was --show-hidden in a previous iteration of
commit ddf3e6669fcfcaeb3205af698d66c8ec1648f4b3, and I forgot to change the
example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1080>

3 years agodecodebin3: Don't insert duplicated streams in collection
Edward Hervey [Thu, 25 Mar 2021 09:29:41 +0000 (10:29 +0100)]
decodebin3: Don't insert duplicated streams in collection

Filter out the ones which are already present. Can happen with several input
stream which have identical collections

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1083>

3 years agoparsebin: Put stream flags in GstStream
Edward Hervey [Fri, 11 Dec 2020 09:15:32 +0000 (10:15 +0100)]
parsebin: Put stream flags in GstStream

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1082>

3 years agodecodebin3: Make input activation "atomic"
Edward Hervey [Thu, 19 Nov 2020 09:49:01 +0000 (10:49 +0100)]
decodebin3: Make input activation "atomic"

When adding inputs dynamically, we need to make sure the new parsebin are
added *and* activated by the same thread (by taking the state change lock).

The rationale for this is that the calling thread might be an upstream streaming
thread and when activating parsebin it might call back upstream. If we don't use
the same thread (ex: when the application does a state change on decodebin3
between the moment we add parsebin to decodebin3 and we synchronize the state of
parsebin) then we would end up in different threads trying to take upstream
recursive locks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/932>

3 years agodevice-monitor: Add argument to include devices from hidden providers
Luke Yelavich [Sat, 20 Mar 2021 00:16:51 +0000 (11:16 +1100)]
device-monitor: Add argument to include devices from hidden providers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1077>

3 years agogl/wayland: provide a dummy global_remove function
Matthew Waters [Mon, 22 Mar 2021 02:59:39 +0000 (13:59 +1100)]
gl/wayland: provide a dummy global_remove function

Even if we don't care about any global objects being removed, wayland
will still error if globals are removed without a corresponding listener
set up for them.  e.g. wl_output hotplugging

Discovered by: Matthias Clasen

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1079>

3 years agogstgiosrc: Don't leak scheme string in gst_gio_src_query()
Jan Schmidt [Sun, 21 Mar 2021 05:46:54 +0000 (16:46 +1100)]
gstgiosrc: Don't leak scheme string in gst_gio_src_query()

Add a g_free() in the code path that forwards the query to the parent
handler.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1078>

3 years agoencodebin: handle video encoder preset fail.
Bing Song [Mon, 15 Mar 2021 06:35:29 +0000 (14:35 +0800)]
encodebin: handle video encoder preset fail.

Check video encoder preset before request muxer pad as MOV/MP4 don't
support addition/removal of tracks at random times.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1064>

3 years agogst: don't use volatile to mean atomic
Matthew Waters [Thu, 18 Mar 2021 08:18:36 +0000 (19:18 +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/gst-plugins-base/-/merge_requests/1073>

3 years agovorbis: fix debug category init
Stéphane Cerveau [Thu, 18 Mar 2021 14:58:01 +0000 (15:58 +0100)]
vorbis: fix debug category init

During the element splitting process,
the debug category initialization has
been dropped accidently.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1074>

3 years agoaudioconvert: update doc for mix-matrix
Stéphane Cerveau [Wed, 17 Mar 2021 13:26:54 +0000 (14:26 +0100)]
audioconvert: update doc for mix-matrix

No need for specific cast in mix-matrix
syntax.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1072>

3 years agoogg: element_init returns void
Stéphane Cerveau [Tue, 16 Mar 2021 16:53:54 +0000 (17:53 +0100)]
ogg: element_init returns void

no need to return boolean as it will
be always TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoplayback: element_init returns void
Stéphane Cerveau [Tue, 16 Mar 2021 11:59:14 +0000 (12:59 +0100)]
playback: element_init returns void

no need to return boolean as it will
be always TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoogg: element_init returns void
Stéphane Cerveau [Tue, 16 Mar 2021 11:56:53 +0000 (12:56 +0100)]
ogg: element_init returns void

no need to return boolean as it will
be always TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoalsa: element_init returns void
Stéphane Cerveau [Tue, 16 Mar 2021 11:55:55 +0000 (12:55 +0100)]
alsa: element_init returns void

no need to return boolean as it will
be always TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agovolume: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 10:15:10 +0000 (11:15 +0100)]
volume: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agovideotestsrc: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 10:14:31 +0000 (11:14 +0100)]
videotestsrc: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agovideoscale: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 10:11:25 +0000 (11:11 +0100)]
videoscale: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agovideorate: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 09:59:42 +0000 (10:59 +0100)]
videorate: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agovideoconvert: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 09:55:25 +0000 (10:55 +0100)]
videoconvert: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agooverlaycomposition: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 09:49:48 +0000 (10:49 +0100)]
overlaycomposition: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoencoding: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 09:43:14 +0000 (10:43 +0100)]
encoding: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agocompositor: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 08:58:59 +0000 (09:58 +0100)]
compositor: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoadder: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 08:37:02 +0000 (09:37 +0100)]
adder: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agocdparanoiasrc: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 08:34:13 +0000 (09:34 +0100)]
cdparanoiasrc: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoaudioconvert: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 16:54:31 +0000 (17:54 +0100)]
audioconvert: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agopango: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 17:47:41 +0000 (18:47 +0100)]
pango: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agotheora: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 17:46:20 +0000 (18:46 +0100)]
theora: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agovorbis: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 16:56:13 +0000 (17:56 +0100)]
vorbis: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoopus: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 15:59:50 +0000 (16:59 +0100)]
opus: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agogl: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 14:42:32 +0000 (15:42 +0100)]
gl: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agogio: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 14:12:29 +0000 (15:12 +0100)]
gio: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoapp: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 14:02:03 +0000 (15:02 +0100)]
app: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoaudiomixer: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 11:59:32 +0000 (12:59 +0100)]
audiomixer: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agotcp: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 11:42:03 +0000 (12:42 +0100)]
tcp: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agorawparse: allow per feature registration
Stéphane Cerveau [Tue, 1 Dec 2020 14:14:00 +0000 (15:14 +0100)]
rawparse: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoaudioaggregator: Consider converting for equal audio formats
Jan Alexander Steffens (heftig) [Mon, 15 Mar 2021 14:33:47 +0000 (15:33 +0100)]
audioaggregator: Consider converting for equal audio formats

The converter might have a non-passthrough mix-matrix. The converter
can determine whether it should pass through, so let it, then remove it
if it's indeed a passthrough.

FIXME: Not converting when we need to but the config is invalid (e.g.
because the mix-matrix is not the right size) produces garbage. An
invalid config should cause a GST_FLOW_NOT_NEGOTIATED.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1070>

3 years agoaudioaggregator: Clean up _convert_pad_update_converter
Jan Alexander Steffens (heftig) [Tue, 16 Mar 2021 11:27:31 +0000 (12:27 +0100)]
audioaggregator: Clean up _convert_pad_update_converter

No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1070>

3 years agortspconnection: Consistently translate GIOError to GstRTSPResult
Nirbheek Chauhan [Mon, 15 Mar 2021 13:35:44 +0000 (19:05 +0530)]
rtspconnection: Consistently translate GIOError to GstRTSPResult

The users of this API need to be able to differentiate between EINTR
and ERROR. For example, in rtspsrc, gst_rtsp_conninfo_connect()
behaves differently when gst_rtsp_connection_connect_with_response_usec()
returns an ERROR or EINTR. The former is an element error while the
latter is simple a GST_ERROR since it was a user cancellation of the
connection attempt.

Due to this, rtspsrc was incorrectly emitting element errors while
going to NULL, which would or would not reach the application in
a racy manner.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1069>

3 years agotag: id3v2: fix frame size check and potential invalid reads
Tim-Philipp Müller [Wed, 3 Mar 2021 01:08:25 +0000 (01:08 +0000)]
tag: id3v2: fix frame size check and potential invalid reads

Check the right variable when checking if there's
enough data left to read the frame size.

Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/876

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1065>

3 years agortpbasedepayload: handle caps change partway through buffer list
Jakub Adam [Tue, 9 Feb 2021 21:09:52 +0000 (22:09 +0100)]
rtpbasedepayload: handle caps change partway through buffer list

While preparing a blist for pushing, some RTP header extension may
request caps change for a specific buffer in the list. When this
happens, depayloader should immediately push those buffers from the list
that precede the currently processed buffer (for which the caps change
was requested) and only then apply the new caps to the src pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1011>

3 years agortphdrext: allow updating depayloader src caps
Jakub Adam [Thu, 4 Feb 2021 16:08:04 +0000 (17:08 +0100)]
rtphdrext: allow updating depayloader src caps

Add overridable method that updates depayloader's src caps based on
the data from RTP header.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1011>

3 years agortphdrext: allow the extension to inspect payloader's sink caps
Jakub Adam [Tue, 12 Jan 2021 21:11:46 +0000 (22:11 +0100)]
rtphdrext: allow the extension to inspect payloader's sink caps

Some header extensions may need to read information from the payloader's
sink caps. Introduce gst_rtp_header_extension_update_from_sinkcaps ()
that passes the caps to the extension, which can then use it to update
its internal state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1011>

3 years agoext: alsa: Set buffer time after period time
Devarsh Thakkar [Tue, 9 Feb 2021 13:16:34 +0000 (05:16 -0800)]
ext: alsa: Set buffer time after period time

This because underlying driver may have constraint on
buffer size to be dependent on period size, so period
time needs to be set first.

For e.g. Xilinx ASoC driver requires
buffer size to be multiple of period size for it's DMA
operation.

alsa-utils also set period time first as seen in below commit :
https://github.com/alsa-project/alsa-utils/commit/9b621eeac4d55c4e881f093be5b163ca07d01b63

Tested it on zcu106 board with HDMI based record and playback.
Also tested on Intel PC using Logitech C920 Webcam mic and ALC887-VD
Analog for playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1040>

3 years agoplayback: remove useless ret test
Stéphane Cerveau [Mon, 8 Mar 2021 09:45:32 +0000 (10:45 +0100)]
playback: remove useless ret test

Use GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE if a specific
init needs to be tested before registering the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1060>

3 years agoogg: remove useless ret test
Stéphane Cerveau [Mon, 8 Mar 2021 09:44:53 +0000 (10:44 +0100)]
ogg: remove useless ret test

Use GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE if a specific
init needs to be tested before registering the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1060>

3 years agoalsa: remove useless ret test
Stéphane Cerveau [Mon, 8 Mar 2021 09:44:42 +0000 (10:44 +0100)]
alsa: remove useless ret test

Use GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE if a specific
init needs to be tested before registering the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1060>

3 years agoaudioaggregator: fix input_buffer ownership
Guillaume Desmottes [Wed, 10 Mar 2021 13:26:22 +0000 (14:26 +0100)]
audioaggregator: fix input_buffer ownership

The way pad->priv->input_buffer reference was managed was pretty
spurious:
- it was overridden without unrefing it, which could potentially lead to
  leaks.
- we were unreffing it while keeping the pointer around, which could
  potentially lead to use-after-free or double-free.

As priv->input_buffer is actually no longer used outside of the
aggregate() method, remove it from pad->priv to simplify the code and
prevent the issues desribed above.

Fix a single buffer leak when shutting down the pipeline as the buffer
returned from gst_aggregator_pad_drop_buffer() was never unreffed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1061>

3 years agoaudioaggregator: fix input buffer when converting
Guillaume Desmottes [Wed, 10 Mar 2021 15:22:14 +0000 (16:22 +0100)]
audioaggregator: fix input buffer when converting

This code path is meant to convert the current buffer to the new format
on update. It was using priv->input_buffer as input which is either
priv->buffer or a converted version of it.
Use priv->buffer instead as priv->input_buffer may no longer be a valid
reference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1061>

3 years agoSet _NET_WM_NAME property for xvimagesink and ximagesink
david [Fri, 22 Jan 2021 21:24:24 +0000 (22:24 +0100)]
Set _NET_WM_NAME property for xvimagesink and ximagesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1017>

3 years agogl: download: Fix a caps memory leak in _try_export_dmabuf().
He Junyan [Tue, 2 Mar 2021 06:16:23 +0000 (14:16 +0800)]
gl: download: Fix a caps memory leak in _try_export_dmabuf().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1058>

3 years agogl: download: Fix a caps memory leak in prepare_output_buffer().
He Junyan [Tue, 2 Mar 2021 05:07:04 +0000 (13:07 +0800)]
gl: download: Fix a caps memory leak in prepare_output_buffer().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1058>

3 years agogl: download: Fix the wrong transformed result from src direction in transform_caps().
He Junyan [Mon, 1 Mar 2021 15:33:29 +0000 (23:33 +0800)]
gl: download: Fix the wrong transformed result from src direction in transform_caps().

The current manner in transform_caps() for src direction is not very correct. For example,
when the src caps is:
  video/x-raw(memory:DMABuf); video/x-raw; video/x-raw(memory:GLMemory)
this function returns:
  video/x-raw(memory:DMABuf); video/x-raw; video/x-raw(memory:GLMemory)
as the sink caps. This is not correct, because DMABuf feature is not even in the sink pad's
caps template. The correct answer should be:
  video/x-raw(memory:GLMemory); video/x-raw
only.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1058>

3 years agogl/dispmanx: assign render_rect to window before window_resize
Alexander Vandenbulcke [Mon, 1 Mar 2021 11:23:25 +0000 (12:23 +0100)]
gl/dispmanx: assign render_rect to window before window_resize

If the `render_rect` for a dispmanx display is set after calling
`window_resize` the resize defaults to the dp_width and dp_height to
determine the location of the render rectangle instead of the correct
dimensions that should be set on the window_egl.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1056>

3 years agocompositor: fix drawing of transparent background
Mathieu Duponchelle [Thu, 18 Feb 2021 15:16:33 +0000 (16:16 +0100)]
compositor: fix drawing of transparent background

When drawing the background multithreaded, y_start needs to be
scaled to obtain the correct byte offset from which to start
memsetting (yoffset).

Fixes #871

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1042>

3 years agogstrtspconnection: correct data_size when tunneled mode
Kristofer Björkström [Thu, 25 Feb 2021 10:03:31 +0000 (11:03 +0100)]
gstrtspconnection: correct data_size when tunneled mode

gst_rtsp_connection_send_messages_usec in tunneled mode does base64
encode messages. When calculating data_size 1 bytes is added, which
results in ending the base64 with a NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1051>

3 years agoaudio: Use GST_BUFFER_PTS instead of deprecated GST_BUFFER_TIMESTAMP
Robert Rosengren [Wed, 24 Feb 2021 12:46:04 +0000 (13:46 +0100)]
audio: Use GST_BUFFER_PTS instead of deprecated GST_BUFFER_TIMESTAMP

GST_BUFFER_PTS already used in audio code base (e.g. gstaudiodecoder),
so migrate completely from deprecated GST_BUFFER_TIMESTAMP for better
readability, as gstcompat.h defines GST_BUFFER_TIMESTAMP directly to PTS
anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1048>

3 years agoaudioaggregator: Log if the sample rate of one sinkpad is not accepted
Sebastian Dröge [Wed, 24 Feb 2021 17:51:40 +0000 (19:51 +0200)]
audioaggregator: Log if the sample rate of one sinkpad is not accepted

Otherwise this can silently cause not-negotiated errors without any
direct hint about what went wrong.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1049>

3 years agovideotestsrc.c: Correct left shift operator
Francisco Javier Velázquez-García [Tue, 23 Feb 2021 13:40:02 +0000 (14:40 +0100)]
videotestsrc.c: Correct left shift operator

Use the left shift operator '<<' instead of the mistakenly typed less
than operator '<'.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1047>

3 years agovideo-converter: Don't upsample/downsample/dither invalid lines
Vivia Nikolaidou [Fri, 19 Feb 2021 14:44:35 +0000 (16:44 +0200)]
video-converter: Don't upsample/downsample/dither invalid lines

This is a fallout from the conversion to support multiple threads.
convert->upsample_p is never NULL now, it's always an allocated array of
n_threads potentially-null pointers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1043>

3 years agoaudioresample: Respect buffer layout when drain
Jeongki Kim [Mon, 22 Feb 2021 06:36:53 +0000 (15:36 +0900)]
audioresample: Respect buffer layout when drain

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1045>

3 years agovideoconvert: Only prefer upstream chroma-site with same subsampling.
Jan Schmidt [Thu, 18 Feb 2021 15:27:07 +0000 (02:27 +1100)]
videoconvert: Only prefer upstream chroma-site with same subsampling.

If converting YUV formats with different chroma-subsampling, there's
probably no good reason to prefer the upstream chroma-siting so just use
the default for the output format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033>

3 years agovideoconvert: Implement more sophisticated colorimetry caps transfer
Jan Schmidt [Mon, 15 Feb 2021 14:24:15 +0000 (01:24 +1100)]
videoconvert: Implement more sophisticated colorimetry caps transfer

Implement a more sophisticated transfer of colorimetry and
chroma-site fields to output caps when fixating.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033>

3 years agovideoconvert: Forward colorimetry and chroma-site from upstream.
Jan Schmidt [Mon, 15 Feb 2021 07:34:33 +0000 (18:34 +1100)]
videoconvert: Forward colorimetry and chroma-site from upstream.

If downstream has expressed no preference for particular colorimetry
and chroma-site configuration, transfer them from the input caps.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/614

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033>

3 years agodecodebin3: change stream selection message owner
Stéphane Cerveau [Tue, 19 Jan 2021 14:56:18 +0000 (15:56 +0100)]
decodebin3: change stream selection message owner

In order to select the streams on GST_MESSAGE_STREAM_COLLECTION,
the app needs to send the select-streams event
to the decodebin and not to the parsebin.

The message should be always owned by the decodebin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1014>

3 years agolibs: audio: Handle meta changes in gst_audio_buffer_truncate
Vivia Nikolaidou [Wed, 17 Feb 2021 10:41:06 +0000 (12:41 +0200)]
libs: audio: Handle meta changes in gst_audio_buffer_truncate

Set timestamp and duration to GST_CLOCK_TIME_NONE unless trim==0,
because that function doesn't know the rate and therefore can't
calculate them. Set offset and offset_end to appropriate values. Make it
clear in the documentation that the caller is responsible for setting
the timestamp and duration.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/869

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1039>

3 years agouridecodebin3: make caps property work
Tim-Philipp Müller [Mon, 15 Feb 2021 16:05:30 +0000 (16:05 +0000)]
uridecodebin3: make caps property work

The caps set on uridecodebin3 via the "caps" property
were never passed to the internal decodebin3, so did
absolutely nothing.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/837

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1034>

3 years agovideodecoder: Fix racy critical when pool negotiation occurs during flush
Alicia Boya García [Fri, 12 Feb 2021 23:27:04 +0000 (00:27 +0100)]
videodecoder: Fix racy critical when pool negotiation occurs during flush

I found a rather reproducible race in a WebKit LayoutTest when a player
was intantiated and a VP8/9 video was loaded, then torn down after
getting the video dimensions from the caps.

The crash occurs during the handling of the first frame by gstvpxdec.
The following actions happen sequentially leading to a crash.

(MT=Main Thread, ST=Streaming Thread)

MT: Sets pipeline state to NULL, which deactivates vpxdec's srcpad,
    which in turn sets its FLUSHING flag.

ST: gst_vpx_dec_handle_frame() -- which is still running -- calls
    gst_video_decoder_allocate_output_frame(); this in turn calls
    gst_video_decoder_negotiate_unlocked() which fails because the
    srcpad is FLUSHING. As a direct consequence of the negotiation
    failure, a pool is NOT set.

    gst_video_decoder_negotiate_unlocked() still assumes there is a
    pool, crashing in a critical in gst_buffer_pool_acquire_buffer()
    a couple statements later.

This patch fixes the bug by returning != GST_FLOW_OK when the
negotiation fails. If the srcpad is FLUSHING, GST_FLOW_FLUSHING is
returned, otherwise GST_FLOW_ERROR is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1031>

3 years agolibs: audio: Fix gst_audio_buffer_truncate meta handling
Jan Alexander Steffens (heftig) [Mon, 15 Feb 2021 16:22:47 +0000 (17:22 +0100)]
libs: audio: Fix gst_audio_buffer_truncate meta handling

In the non-interleaved case, it made `buffer` writable but then changed
the meta of the non-writable buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1035>

3 years agoaudioencoder: Fix gst_audio_encoder_get_audio_info return ownership GTK-Doc
Alejandro González [Sat, 13 Feb 2021 21:25:18 +0000 (21:25 +0000)]
audioencoder: Fix gst_audio_encoder_get_audio_info return ownership GTK-Doc

GTK-Doc specifies that, by default, the caller owns returned objects, so that the caller should free them when it is done. However, in the case of this function, the returned GstAudioInfo is owned by the decoder, so this default choice is incorrect. This creates double free problems when using GStreamer Rust bindings, because they are generated using the information contained in the docs.

Fix this by correctly specifying that the caller does not own the returned object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1032>

3 years agoaudiodecoder: Fix gst_audio_decoder_get_audio_info return ownership GTK-Doc
Alejandro González [Sat, 13 Feb 2021 17:24:37 +0000 (17:24 +0000)]
audiodecoder: Fix gst_audio_decoder_get_audio_info return ownership GTK-Doc

GTK-Doc specifies that, by default, the caller owns returned objects, so that the caller should free it when it is done. However, in the case of this function, the returned GstAudioInfo is owned by the decoder, so this default choice is incorrect. This creates double free problems when using GStreamer Rust bindings, because they are generated using the information contained in the docs.

Fix this by correctly specifying that the caller does not own the returned object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1032>

3 years agoencoding-profile: Plug a leak of factory list
Thibault Saunier [Fri, 8 Jan 2021 11:39:32 +0000 (08:39 -0300)]
encoding-profile: Plug a leak of factory list

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1002>

3 years agoencodebin: Add APIs to set element properties on encoding profiles
Thibault Saunier [Fri, 20 Nov 2020 21:35:49 +0000 (18:35 -0300)]
encodebin: Add APIs to set element properties on encoding profiles

User often want to set encoder properties on encoding profiles,
this introduces a way to easily 'preset' properties when defining the
profile. This uses GstStructure to define those properties the same
way it is done in `splitmux` for example as it makes simple to handle.

This also defines a more complex structure type where we can map a set
of properties to set depending on the muxer/encoder factory that has
been picked by EncodeBin so it is quite flexible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1002>

3 years agoencoding-profile: Cleanup profile serialization documentation
Thibault Saunier [Fri, 20 Nov 2020 21:35:49 +0000 (18:35 -0300)]
encoding-profile: Cleanup profile serialization documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1002>