platform/upstream/gstreamer.git
20 months agovtdec: Correctly retrieve reorder queue length from SPS
Piotr Brzeziński [Thu, 23 Feb 2023 13:14:57 +0000 (14:14 +0100)]
vtdec: Correctly retrieve reorder queue length from SPS

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

20 months agoalsasink: Fix stall when going from PLAYING to NULL (stucked at PAUSED) with uac1...
Nicolas Beland [Wed, 1 Mar 2023 21:26:20 +0000 (16:26 -0500)]
alsasink: Fix stall when going from PLAYING to NULL (stucked at PAUSED) with uac1 gadget

This happened with a uac1 gadget which for some reason does not behave nicely.

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

20 months agoadaptivedemux2: Fix buffering treshold initialization
Edward Hervey [Fri, 3 Mar 2023 07:21:08 +0000 (08:21 +0100)]
adaptivedemux2: Fix buffering treshold initialization

Properly initialize the stream default recommended buffering threshold so that
a default (10s) value is used until the subclass can provide a proper value

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

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

20 months agoinputselector: Avoid deadlock when shutting down
Vivia Nikolaidou [Thu, 2 Mar 2023 13:51:08 +0000 (15:51 +0200)]
inputselector: Avoid deadlock when shutting down

Transition from PLAYING to PAUSED unschedules any pending clock wait,
but there was no guard that prevented another input buffer then waiting
again while in PAUSED before dataflow stops. Use a new `playing` flag to
avoid this, and exit the chain function if instead of playing we're now
flushing. Basically the same as the clocksync element.

Closes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1772

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

20 months agovalidate: Protect init function with a recursive mutex
Thibault Saunier [Wed, 1 Mar 2023 03:56:51 +0000 (00:56 -0300)]
validate: Protect init function with a recursive mutex

In tests in the rust bindings we end up with 2 thread initializing
concurrently, and it should not be a problem, -validate should be MT
safe.

Using a recursive mutex as we might recursively init for some reason
and we are not on the hot path here in any case.

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

20 months agovalidate:scenario: sink refs when building
Thibault Saunier [Wed, 1 Mar 2023 03:43:01 +0000 (00:43 -0300)]
validate:scenario: sink refs when building

Scenarios are no owned by anyone, even if they are GstObjects

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

20 months agoavfvideosrc: Fix description and trailing whitespace
Jan Schmidt [Tue, 28 Feb 2023 19:36:15 +0000 (06:36 +1100)]
avfvideosrc: Fix description and trailing whitespace

Minor fix to mention that the element is also useful on MacOS,
and remove some trailing whitespace

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

20 months agoavfvideosrc: Don't wait on main thread for permissions request
Jan Schmidt [Tue, 28 Feb 2023 19:32:19 +0000 (06:32 +1100)]
avfvideosrc: Don't wait on main thread for permissions request

Recursively invoking the NSMainLoop can cause crashes in
applications that don't expect it. Instead of waiting for
permission to be granted, move the wait later - until we
actually need device permissions when starting the capture
session. That moves the wait into the streaming thread
instead of the application thread that's setting the pipeline
state to READY.

Instead of a manual state change implementation to open
and close the device, use the basesrc start/stop methods that
are intended for the purpose.

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

20 months agopython: Use arch-specific install dir
Frank Dana [Fri, 9 Sep 2022 04:21:12 +0000 (04:21 +0000)]
python: Use arch-specific install dir

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

20 months agogldisplay: Remove unused code
Carlos Falgueras García [Mon, 27 Feb 2023 07:23:38 +0000 (08:23 +0100)]
gldisplay: Remove unused code

The code related with environment variable `GST_GL_PLATFORM` is unused
since commit 33c60bdbf9ae2fd2e88099ad89ad836b8b78c2f5.

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

20 months agovtenc: Fix checking for certain CPU variants when running in VMs
Piotr Brzeziński [Tue, 28 Feb 2023 14:26:45 +0000 (15:26 +0100)]
vtenc: Fix checking for certain CPU variants when running in VMs

These checks were introduced to prevent exposing ARGB64/RGBA64 in the caps
when running on M1 Pro/Max with macOS <13 because of a bug in VideoToolbox.
Unfortunately, the initial buffer size of 15 is too short when running
in a VM - the CPU brand string there looks like "Apple M1 Pro (Virtual)",
which due to its length causes sysctlbyname to return -1, resulting in
broken formats still showing up in the caps.

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

20 months agoffmpeg: avauddec/avviddec: Free packet side data after usage
Sebastian Dröge [Tue, 28 Feb 2023 12:00:26 +0000 (14:00 +0200)]
ffmpeg: avauddec/avviddec: Free packet side data after usage

As we don't use proper refcounting with AVPacket we have to manage this
ourselves.

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

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

20 months agotools: Make sure UTF-8 encoded command line arguments on Windows
Seungha Yang [Fri, 27 Jan 2023 17:32:13 +0000 (02:32 +0900)]
tools: Make sure UTF-8 encoded command line arguments on Windows

On Windows, arguments passed in main() are system codepage
encoded and might not be valid UTF-8 string.

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

20 months agonvencoder: Fix b-frame encoding on Linux
Seungha Yang [Sun, 19 Feb 2023 18:20:46 +0000 (03:20 +0900)]
nvencoder: Fix b-frame encoding on Linux

On Windows, Win32 event handle is used to wait for encoded output,
but it's not available on Linux. We should delay bitstream locking
if encoder returns "need-more-input"

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

20 months agoci: prepare_cerbero_env: Use predictable git clone path
Jordan Petridis [Fri, 24 Feb 2023 13:28:48 +0000 (15:28 +0200)]
ci: prepare_cerbero_env: Use predictable git clone path

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

20 months agomeson: Switch dav1d wrap to a tarball
Jordan Petridis [Fri, 24 Feb 2023 12:29:34 +0000 (14:29 +0200)]
meson: Switch dav1d wrap to a tarball

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

20 months agoh265parse: Always set profile on src caps
Seungha Yang [Tue, 21 Feb 2023 15:47:09 +0000 (00:47 +0900)]
h265parse: Always set profile on src caps

h265parse should provide profile for autoplugging

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

20 months agobuffer: fix copy meta reference debug log formatting
James Hilliard [Wed, 22 Feb 2023 03:13:57 +0000 (20:13 -0700)]
buffer: fix copy meta reference debug log formatting

Fixes the following valgrind error:
==616== Conditional jump or move depends on uninitialised value(s)
==616==    at 0x4900E34: gst_debug_print_object (gstinfo.c:1143)
==616==    by 0x49010B6: gst_info_printf_pointer_extension_func (gstinfo.c:1215)
==616==    by 0x4959FDB: __gst_printf_pointer_extension_serialize (printf-extension.c:47)
==616==    by 0x495A487: printf_postprocess_args (vasnprintf.c:258)
==616==    by 0x495A52C: __gst_vasnprintf (vasnprintf.c:290)
==616==    by 0x4959F8F: __gst_vasprintf (printf.c:154)
==616==    by 0x4901C1F: gst_debug_message_get (gstinfo.c:791)
==616==    by 0x4901C75: _gst_debug_log_preamble (gstinfo.c:1431)
==616==    by 0x4903208: gst_debug_log_default (gstinfo.c:1575)
==616==    by 0x49020BA: gst_debug_log_full_valist (gstinfo.c:624)
==616==    by 0x490211D: gst_debug_log_valist (gstinfo.c:656)
==616==    by 0x49021AD: gst_debug_log (gstinfo.c:533)
==616==    by 0x48DDC11: gst_buffer_copy_into (gstbuffer.c:693)
==616==    by 0x48DF5F1: gst_buffer_copy_with_flags (gstbuffer.c:727)
==616==    by 0x48DF640: gst_buffer_copy_deep (gstbuffer.c:756)

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

20 months agojpegdecoder: fail early if no input caps have been provided
He Junyan [Fri, 24 Feb 2023 13:58:00 +0000 (21:58 +0800)]
jpegdecoder: fail early if no input caps have been provided

The jpegdecoder class does not implement the ->parse() virtual function,
and we always need to add the jpegparse element before it. So we should
set_needs_format of the decoder to TRUE, then if no parse before it, it
can fail with a "not-negotiated" error early, rather than go on and
generate unexpected error.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1829
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4066>

20 months agoav1decoder: fail early if no input caps have been provided
He Junyan [Fri, 24 Feb 2023 13:49:27 +0000 (21:49 +0800)]
av1decoder: fail early if no input caps have been provided

The av1decoder class does not implement the ->parse() virtual function,
and we always need to add the av1parse element before it. So we should
set_needs_format of the decoder to TRUE, then if no parse before it, it
can fail with a "not-negotiated" error early, rather than go on and
generate unexpected error.

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

20 months agovp9decoder: fail early if no input caps have been provided
He Junyan [Fri, 24 Feb 2023 13:38:48 +0000 (21:38 +0800)]
vp9decoder: fail early if no input caps have been provided

The vp9decoder class does not implement the ->parse() virtual function,
and we always need to add the vp9parse element before it. So we should
set_needs_format of the decoder to TRUE, then if no parse before it, it
can fail with a "not-negotiated" error early, rather than go on and
generate unexpected error.

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

20 months agovp8decoder: fail early if no input caps have been provided
He Junyan [Fri, 24 Feb 2023 13:27:27 +0000 (21:27 +0800)]
vp8decoder: fail early if no input caps have been provided

The vp8decoder class does not implement the ->parse() virtual function,
it can only accepts frame aligned data. If some element such as filesrc
feed it with unaligned data, the behaviour is undecided. So we should
set_needs_format of the decoder to TRUE, then it can fail with a
"not-negotiated" error early, rather than go on and generate unexpected
error.

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

20 months agompeg2decoder: fail early if no input caps have been provided
He Junyan [Fri, 24 Feb 2023 13:12:40 +0000 (21:12 +0800)]
mpeg2decoder: fail early if no input caps have been provided

The mpeg2decoder class does not implement the ->parse() virtual function,
and we always need to add the mpegvideoparse element before it. So we should
set_needs_format of the decoder to TRUE, then if no parse before it, it
can fail with a "not-negotiated" error early, rather than go on and
generate unexpected error.

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

20 months agoh264decoder: fail early if no input caps have been provided
He Junyan [Fri, 24 Feb 2023 13:09:31 +0000 (21:09 +0800)]
h264decoder: fail early if no input caps have been provided

The h264decoder class does not implement the ->parse() virtual function,
and we always need to add the h264parse element before it. So we should
set_needs_format of the decoder to TRUE, then if no parse before it, it
can fail with a "not-negotiated" error early, rather than go on and
generate unexpected error.

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

20 months agoh265decoder: fail early if no input caps have been provided
He Junyan [Fri, 24 Feb 2023 12:15:20 +0000 (20:15 +0800)]
h265decoder: fail early if no input caps have been provided

The h265decoder class does not implement the ->parse() virtual function,
and we always need to add the h265parse element before it. So we should
set_needs_format of the decoder to TRUE, then if no parse before it, it
can fail with a "not-negotiated" error early, rather than go on and
generate unexpected error.

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

20 months agocurlhttpsrc: Add curl anyauth option
Robert Rosengren [Fri, 27 Jan 2023 11:45:10 +0000 (12:45 +0100)]
curlhttpsrc: Add curl anyauth option

Add curl anyauth option to support http request to endpoints not using
only basic authentication (as default in curl). Also aligning with
curlhttpsink that already uses this option.

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

20 months agortspconnection: Annotate RTSP message parameters correctly
Patricia Muscalu [Wed, 22 Feb 2023 13:14:15 +0000 (14:14 +0100)]
rtspconnection: Annotate RTSP message parameters correctly

These parameters are not actually `out` parameters but must
be allocated and zero-initialized by the calling function.
Marking them as `out caller-allocates` will cause memory
corruptions when calling these APIs from e.g., Python code.

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

20 months agortspsrc: Use the correct vfunc for the `push-backchannel-sample` action signal
Sebastian Dröge [Thu, 23 Feb 2023 09:18:44 +0000 (11:18 +0200)]
rtspsrc: Use the correct vfunc for the `push-backchannel-sample` action signal

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

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

20 months agoqtmux: Fix assertion on caps update
Seungha Yang [Wed, 22 Feb 2023 13:18:48 +0000 (22:18 +0900)]
qtmux: Fix assertion on caps update

GstQTMuxPad.configured_caps should be protected since it's
updated from streaming thread and accessed in aggregate thread

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

20 months agogstglwindow_x11.c: Fix colormap leak
Tristan van Berkom [Wed, 22 Feb 2023 15:05:56 +0000 (15:05 +0000)]
gstglwindow_x11.c: Fix colormap leak

This fixes an X server side memory leak, this is normally not severe
but in some circumstances where the glwindow is recreated frequently
it can result in a very bad memory leak.

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

20 months agod3d11overlaycompositor: fix texture width and height
Célestin Marot [Wed, 22 Feb 2023 14:18:12 +0000 (15:18 +0100)]
d3d11overlaycompositor: fix texture width and height

The dimension of the overlay texture directly corresponds to the size of the overlay **buffer** which is given by its video meta.
The dimension at which the overlay should be displayed directly correspond to the overlay `render_width`and `render_height`.

This match the behavior of glimagesink

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

20 months agogst-plugins-bad: update translations
Tim-Philipp Müller [Wed, 22 Feb 2023 11:52:38 +0000 (11:52 +0000)]
gst-plugins-bad: update translations

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

20 months agogst-plugins-good: update translations
Tim-Philipp Müller [Wed, 22 Feb 2023 11:52:21 +0000 (11:52 +0000)]
gst-plugins-good: update translations

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

20 months agogst-plugins-base: update translations
Tim-Philipp Müller [Wed, 22 Feb 2023 11:52:14 +0000 (11:52 +0000)]
gst-plugins-base: update translations

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

20 months agogstreamer: update translations
Tim-Philipp Müller [Wed, 22 Feb 2023 11:51:58 +0000 (11:51 +0000)]
gstreamer: update translations

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

20 months agovaallocator: Check return value from va_sync_surface
Mengkejiergeli Ba [Thu, 16 Feb 2023 07:03:25 +0000 (15:03 +0800)]
vaallocator: Check return value from va_sync_surface

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

20 months agova: Fix some code defects
Mengkejiergeli Ba [Thu, 9 Feb 2023 08:54:16 +0000 (16:54 +0800)]
va: Fix some code defects

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

20 months agogst-play: update translated string
Tim-Philipp Müller [Tue, 21 Feb 2023 18:42:57 +0000 (18:42 +0000)]
gst-play: update translated string

Make it more consistent with the other option descriptions.

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

20 months agoqtmux: Implement writing of `av1C` version 1 box
Sebastian Dröge [Thu, 2 Feb 2023 14:48:05 +0000 (16:48 +0200)]
qtmux: Implement writing of `av1C` version 1 box

Version 0 is ancient and not specified in any documents. Take it
directly from the `codec_data` if presents or otherwise try to construct
a reasonably looking `av1C` box.

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

20 months agoqtdemux: Drop av1C version 0 parsing and implement version 1 parsing
Sebastian Dröge [Thu, 2 Feb 2023 14:28:47 +0000 (16:28 +0200)]
qtdemux: Drop av1C version 0 parsing and implement version 1 parsing

The av1C box is optional so dropping parsing does not break anything
fundamentally, and there seems to be no historical record how version 0
even looks like while the comments and the parsing disagreed with each
other.

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

20 months agowpe: Logging fixes for the WebExtension
Philippe Normand [Thu, 22 Dec 2022 10:17:42 +0000 (10:17 +0000)]
wpe: Logging fixes for the WebExtension

Using logging macros without a `GST_CAT_DEFAULT` in scope leads to critical
warnings.

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

20 months agoappsrc: Don't chain up `BaseSrc::negotiate()`
Sebastian Dröge [Thu, 19 Jan 2023 16:49:17 +0000 (18:49 +0200)]
appsrc: Don't chain up `BaseSrc::negotiate()`

If we have caps then we can only set exactly those caps, if we have no
caps yet then negotiating anything is not very meaningful because the
caps are defined by the application and not downstream.

Avoids, among other things, an unnecessary allocation query and spurious
useless caps being set before the first buffer.

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

20 months agogst-play: Don't force accurate seeking
Edward Hervey [Thu, 9 Feb 2023 16:23:55 +0000 (17:23 +0100)]
gst-play: Don't force accurate seeking

This crept in several years ago sadly :(

The usage of accurate seeking should be reserved to use-cases where it is
essential that we seek to that position. This should not be the default.

There is a new option `--acurate-seeks/-a` to be able to force that.

Furthermore, if accurate seeks aren't required, a player should be using the
GST_SEEK_FLAG_KEY_UNIT flag to seek to the closest keyframe and provide the most
reactive experience.

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

20 months agouridecodebin: Set source element to READY before querying it
Thibault Saunier [Tue, 31 Jan 2023 16:21:48 +0000 (13:21 -0300)]
uridecodebin: Set source element to READY before querying it

Generating the source element is done when uridecodebin is doing the
READY to PAUSED state change, so it is reasonable to set the new source
element to that state.

This also allows detecting early failures with backing libraries or
hardware (checks done in NULL->READY).

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

20 months agoccconverter: don't debug a potentially freed filter caps
Matthew Waters [Tue, 21 Feb 2023 04:19:35 +0000 (15:19 +1100)]
ccconverter: don't debug a potentially freed filter caps

Fixes a use-after-free

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

20 months agod3d11videosink: Fix rendering on external handle
Seungha Yang [Mon, 20 Feb 2023 15:27:27 +0000 (00:27 +0900)]
d3d11videosink: Fix rendering on external handle

Partial revert of the commit 068a5c1053ae05b3c7747243948447e764d25aa6.
That introduced size mismatch between internal and external HWND

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

20 months agovah265enc: Use helper to update properties.
Víctor Manuel Jáquez Leal [Sun, 19 Feb 2023 11:01:59 +0000 (12:01 +0100)]
vah265enc: Use helper to update properties.

This is a continuation of the original patch by
 Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>

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

20 months agoav1parser, h265parser: Fix some code defects
Mengkejiergeli Ba [Tue, 14 Feb 2023 02:29:00 +0000 (10:29 +0800)]
av1parser, h265parser: Fix some code defects

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

20 months agowebrtc: Calculate the jitter for remote-inbound-rtp stats
Jan Schmidt [Mon, 6 Feb 2023 17:58:04 +0000 (04:58 +1100)]
webrtc: Calculate the jitter for remote-inbound-rtp stats

Populate the clock-rate in the internal stats structure, so
it can be used by the _get_stats_from_remote_rtp_source_stats()
method to calculate remote receivers' jitter.

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

20 months agowebrtcbin: Report full codec-stats for source pads
Jan Schmidt [Tue, 31 Jan 2023 23:44:26 +0000 (10:44 +1100)]
webrtcbin: Report full codec-stats for source pads

Use the current caps for webrtcbin srcpads, as received_caps
are only stored for sink pads based on incoming caps events.

Makes it so that webrtcbin stats reports contain fuller
codec information.

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

20 months agomsdkav1enc: fix the category for msdkav1enc debug
Yinhang Liu [Fri, 17 Feb 2023 06:56:20 +0000 (14:56 +0800)]
msdkav1enc: fix the category for msdkav1enc debug

The msdkav1enc debug initialized with gst_msdkav1dec_debug,
fix this.

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

20 months agoqtdemux: Don't emit GstSegment correcting start time when in MSE mode
Enrique Ocaña González [Wed, 1 Feb 2023 11:09:52 +0000 (12:09 +0100)]
qtdemux: Don't emit GstSegment correcting start time when in MSE mode

When using qtdemux in a pipeline that should only work as a pure demuxer (not
for actual playback), qtdemux shouldn't emit new GstSegments to correct
the start time (jump to the future) to ensure that the user experiences no
playback delay. By doing so, it's generating the wrong segments when an append
of data from the past happens. When that happens, downstream elements such as
parsers (eg: aacparse) may clip those buffers laying before the GstSegment and
create problems on the GStreamer client app (eg: WebKit).

Getting buffers clipped out because of the wrong GstSegments started becoming
a problen when this commit was introduced:

ab6e49e9cc audioparsers: add back segment clipping to parsers that have lost it

This clipping makes test DASH shaka 35 from MVT tests[1] to fail in
WebKitGTK/WPE (at least) and can potentially cause a number of other problems
in the WebKit Media Source Extensions (MSE) code.

Note that this new behaviour of not emitting new GstSegments only makes sense
when qtdemux is being used as a pure demuxer and not as part of a regular
pipeline. This is why the variant field has been added. When equal to
VARIANT_MSE_BYTESTREAM, it will make qtdemux behave differently in push mode,
taking decisions that meet the expectations for an MSE-like processing mode.
This kind of tweaks have been done in the past for MSS streams, for instance.
That code has been refactored to use VARIANT_MSS_FRAGMENTED now, instead of
its own dedicated boolean flag.

Co-authored by: Alicia Boya García <ntrrgc@gmail.com>

...who suggested to use "variant: mse-bytestream" in the caps to identify that
mode, as proposed in her unmerged patch:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/467

[1] https://github.com/rdkcentral/mvt

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

20 months agotests: Move srtp test known issue def to the 'check' testuite
Thibault Saunier [Thu, 16 Feb 2023 01:06:39 +0000 (22:06 -0300)]
tests: Move srtp test known issue def to the 'check' testuite

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

20 months agovalidate:launcher: try to bne more explicit about where to add known failure
Thibault Saunier [Thu, 16 Feb 2023 01:05:53 +0000 (22:05 -0300)]
validate:launcher: try to bne more explicit about where to add known failure

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

20 months agovalidate:launcher: Handle known return code issue in none validate based tests
Thibault Saunier [Thu, 16 Feb 2023 01:02:56 +0000 (22:02 -0300)]
validate:launcher: Handle known return code issue in none validate based tests

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

20 months agocodectimestamper: Fix timestamping on sequence update
Seungha Yang [Wed, 15 Feb 2023 16:36:41 +0000 (01:36 +0900)]
codectimestamper: Fix timestamping on sequence update

... and enhance debug logging.

Keep internal timestamp offsets on drain, no reason to reset them

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

21 months agocodecparsers: {h264,h265}bitwriter: Remove redundant condition checks
Mengkejiergeli Ba [Wed, 15 Feb 2023 01:45:28 +0000 (09:45 +0800)]
codecparsers: {h264,h265}bitwriter: Remove redundant condition checks

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

21 months agovalidate: add elements_srtp.test_play_key_error to flaky test list
Tim-Philipp Müller [Tue, 14 Feb 2023 14:43:34 +0000 (14:43 +0000)]
validate: add elements_srtp.test_play_key_error to flaky test list

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1777

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

21 months agotests: mark elements_srtp.test_play test as flaky
Tim-Philipp Müller [Fri, 10 Feb 2023 10:02:35 +0000 (10:02 +0000)]
tests: mark elements_srtp.test_play test as flaky

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

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

21 months agoamfav1enc: Set stream-format on caps
Seungha Yang [Sun, 12 Feb 2023 14:17:41 +0000 (23:17 +0900)]
amfav1enc: Set stream-format on caps

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

21 months agoqsvav1enc: Set stream-format on caps
Seungha Yang [Sun, 12 Feb 2023 14:12:21 +0000 (23:12 +0900)]
qsvav1enc: Set stream-format on caps

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

21 months agoavviddec: change AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS
U. Artie Eoff [Mon, 13 Feb 2023 22:02:01 +0000 (17:02 -0500)]
avviddec: change AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS

This fixes a compile error with recent upstream FFmpeg.

The AV_CODEC_CAP_AUTO_THREADS was deprecated and renamed to
AV_CODEC_CAP_OTHER_THREADS in FFmpeg upstream commit
7d09579190de (lavc 58.132.100).

The AV_CODEC_CAP_AUTO_THREADS was finally removed in FFmpeg upstream
commit 10c9a0874cb3 (lavc 59.63.100).

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

21 months agoglvideomixer: Keep a reference to the underlying pad
Thibault Saunier [Fri, 10 Feb 2023 11:20:38 +0000 (08:20 -0300)]
glvideomixer: Keep a reference to the underlying pad

There was cases where we were accessing the pad while it was already
destroyed. Ensure it can't happen by owning a ref on it.

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

21 months agovtenc/vtdec: Fix typo in RGBA64_LE availability define
Piotr Brzeziński [Tue, 7 Feb 2023 15:25:02 +0000 (16:25 +0100)]
vtenc/vtdec: Fix typo in RGBA64_LE availability define

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

21 months agovtenc: Disable ARGB/RGBA64 caps on M1 Pro/Max with macOS <13
Piotr Brzeziński [Tue, 7 Feb 2023 15:04:22 +0000 (16:04 +0100)]
vtenc: Disable ARGB/RGBA64 caps on M1 Pro/Max with macOS <13

Fixes #1358.
Passing ARGB64/RGBA64 to vtenc caused the encoding to fail
when running on M1 Pro/Max variants with macOS 12.x, so let's
remove these formats from caps when such scenario is detected.
This issue appears to have been fixed OS-side in macOS 13.0.

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

21 months agoaudio: channel-mix: Fix channel count limit to be able to equal 64
Yang, Xuchen [Mon, 13 Feb 2023 19:46:03 +0000 (11:46 -0800)]
audio: channel-mix: Fix channel count limit to be able to equal 64

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

21 months agoqtdemux: Handle moov atom length=0 case by reading until the end
Vivia Nikolaidou [Fri, 10 Feb 2023 13:43:45 +0000 (15:43 +0200)]
qtdemux: Handle moov atom length=0 case by reading until the end

Previously it would fail to demux the file by trying to read G_MAXUINT64
bytes.

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

21 months agoqtdemux: Fix guint vs gsize type confusion
Vivia Nikolaidou [Fri, 10 Feb 2023 13:35:15 +0000 (15:35 +0200)]
qtdemux: Fix guint vs gsize type confusion

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

21 months agovtdec: Fix not waiting for async frames when flushing
Piotr Brzeziński [Thu, 9 Feb 2023 17:51:30 +0000 (18:51 +0100)]
vtdec: Fix not waiting for async frames when flushing

This was causing incorrect output when seeking, especially
when used with a multithreaded source like `videotestsrc n-threads=2`.
It should now correctly wait for frames still being processed by VT
while vtdec is flushing.

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

21 months agowin32ipcutils: Add missing include
Alessandro Bono [Fri, 10 Feb 2023 11:52:17 +0000 (12:52 +0100)]
win32ipcutils: Add missing include

We are using std::isspace() with one parameter. That function is defined
in the cctype header.

```
win32ipcutils.cpp(34): error C2672: 'std::isspace': no matching overloaded function found
win32ipcutils.cpp(34): error C2780: 'bool std::isspace(_Elem,const std::locale &)': expects 2 arguments - 1 provided
```

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

21 months agopad: Don't leak user_data in gst_pad_start_task
Jan Alexander Steffens (heftig) [Thu, 9 Feb 2023 12:53:48 +0000 (13:53 +0100)]
pad: Don't leak user_data in gst_pad_start_task

When the task already exists, we forgot to free the passed `user_data`.
This wasn't an issue for most C code, which doesn't pass a
`GDestroyNotify`, but bindings such as gstreamer-rs do!

That said, allocating a trampoline in gstreamer-rs just for it to get
thrown away again is awkward. Maybe we need a `gst_pad_resume_task`?

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

21 months agoav1parser: Don't consider unknown metadata OBUs a bitstream error
Sebastian Dröge [Mon, 6 Feb 2023 13:26:48 +0000 (15:26 +0200)]
av1parser: Don't consider unknown metadata OBUs a bitstream error

Just don't parse them.

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

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

21 months agosubparse: Properly forward segment seqnum
Edward Hervey [Wed, 8 Feb 2023 11:00:54 +0000 (12:00 +0100)]
subparse: Properly forward segment seqnum

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

21 months agoclosedcaption: Don't leak caps event
Edward Hervey [Tue, 7 Feb 2023 07:49:24 +0000 (08:49 +0100)]
closedcaption: Don't leak caps event

All events that we handle should be unreffed

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

21 months agomeson: Allow sysdeps to be forced as fallback subprojects
Nirbheek Chauhan [Thu, 26 Jan 2023 14:22:37 +0000 (19:52 +0530)]
meson: Allow sysdeps to be forced as fallback subprojects

The original code was too complicated; likely created before the
provide section existed for wraps:

https://mesonbuild.com/Wrap-dependency-system-manual.html#provide-section

Now you can do --force-fallback-for=pygobject and it'll actually work.

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

21 months agovalidate-scenario: fix g-i warning in annotation
Tim-Philipp Müller [Sat, 28 Jan 2023 20:02:49 +0000 (20:02 +0000)]
validate-scenario: fix g-i warning in annotation

gst-validate-scenario.c:2485: Warning: GstValidate: missing ":" at column 28:

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

21 months agogstreamer: bin: Don't unlock unlocked mutex in gst_bin_remove_func()
medithe [Tue, 7 Feb 2023 13:43:06 +0000 (13:43 +0000)]
gstreamer: bin: Don't unlock unlocked mutex in gst_bin_remove_func()

Calling `g_mutex_unlock(mutex)` leads to an undefined behavior if the
mutex is not locked by the current thread.

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

21 months agowebrtc examples: Use webrtc.gstreamer.net
Nirbheek Chauhan [Thu, 26 Jan 2023 11:58:24 +0000 (17:28 +0530)]
webrtc examples: Use webrtc.gstreamer.net

Actually just a CNAME to webrtc.nirbheek.in for now, but it allows
replacement / hosting without my involvement, so reduces the bus
factor.

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

21 months agonvencoder: Fix min buffers parameter of allocation query in auto GPU mode
Seungha Yang [Fri, 3 Feb 2023 13:10:12 +0000 (22:10 +0900)]
nvencoder: Fix min buffers parameter of allocation query in auto GPU mode

At the time when propose_allocation() get called, encoder session
would not be initialized yet.

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

21 months agogl/cocoa: Return a strong ref to the parent GstGLContext
Jan Schmidt [Thu, 2 Feb 2023 12:20:04 +0000 (23:20 +1100)]
gl/cocoa: Return a strong ref to the parent GstGLContext

If the GstGLCAOpenGLLayer was initialized via a parent
context, make sure to ref the context before returning it
from getGLContext as all callers will unref it.

Follow up to !3729

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

21 months agova: Avoid the array index overflow when filling 8x8 scaling list.
He Junyan [Thu, 19 Jan 2023 03:03:09 +0000 (11:03 +0800)]
va: Avoid the array index overflow when filling 8x8 scaling list.

The VA API has not defined the scaling list entries for U/V planes
for the 4:4:4 stream. In fact, we do not meet the 4:4:4 format output
for H264 so far, and scaling list is not used frequently, so we just
print out some warning and ignore these scaling list values.

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

21 months agoFix gstreamer-validate-1.0 dependency name
James Hilliard [Wed, 1 Feb 2023 04:38:09 +0000 (21:38 -0700)]
Fix gstreamer-validate-1.0 dependency name

The gst-devtools project generates gstreamer-validate-1.0.pc, this
must match the dependency in gst-editing-services for detection
to work properly.

Fixes:
Run-time dependency gst-validate-1.0 found: NO (tried pkgconfig and cmake)

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

21 months agovtenc: Disable HW acceleration for interlaced ProRes
Piotr Brzeziński [Wed, 9 Nov 2022 19:20:35 +0000 (20:20 +0100)]
vtenc: Disable HW acceleration for interlaced ProRes

Due to a bug in the VT API, attempting to encode interlaced content
with ProRes results in an error, halting the pipeline instead of
gracefully falling back to software encoding.
Should be removed in the future if Apple ever fixes this issue.

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

21 months agoaom: Include stream-format and alignment in the AV1 caps
Sebastian Dröge [Wed, 1 Feb 2023 15:26:57 +0000 (17:26 +0200)]
aom: Include stream-format and alignment in the AV1 caps

The decoder does not work with arbitrary alignment and annexb stream
format and the encoder can give the information that it outputs
obu-stream/tu to downstream.

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

21 months agonvvp9dec: Fix return value
Seungha Yang [Wed, 1 Feb 2023 20:04:48 +0000 (05:04 +0900)]
nvvp9dec: Fix return value

It should return GstFlowReturn value, not boolean

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

21 months agortspsrc: Also consider "Method Not Valid In This State" error in broken control URL...
Sebastian Dröge [Tue, 31 Jan 2023 14:56:18 +0000 (16:56 +0200)]
rtspsrc: Also consider "Method Not Valid In This State" error in broken control URL handling workaround

Some servers send a 455 error instead of any reasonable error when using
a correctly constructed control URL.

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

21 months agoci: rebuild windows image
Tim-Philipp Müller [Wed, 1 Feb 2023 18:55:17 +0000 (18:55 +0000)]
ci: rebuild windows image

Needed for the backport of https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3805
to take effect, once cerbero is made to use the new image.

Should fix errors like

cp: will not create hard link `./cerbero-sources/sbc-1.3' to directory `./cerbero-sources/bzip2-1.0.8'

and similar.

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

21 months agortpptdemux: set different stream-id on each src pad
Guillaume Desmottes [Tue, 31 Jan 2023 15:44:10 +0000 (16:44 +0100)]
rtpptdemux: set different stream-id on each src pad

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

21 months agortpssrcdemux: set different stream-id on each src pad
Guillaume Desmottes [Tue, 31 Jan 2023 14:28:22 +0000 (15:28 +0100)]
rtpssrcdemux: set different stream-id on each src pad

All the RTP src pads were sharing the same stream-id while each actually
carry a different stream.

This was causing problem for example when funneling the streams together
and then trying to split them using 'streamiddemux'.

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

21 months agogst-env: Handle installing python modules to dist-packages
Thibault Saunier [Fri, 27 Jan 2023 14:47:22 +0000 (11:47 -0300)]
gst-env: Handle installing python modules to dist-packages

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

21 months agoBaseSrc: fix transfer annotation for fixate virtual method
Mathieu Duponchelle [Fri, 27 Jan 2023 18:29:24 +0000 (19:29 +0100)]
BaseSrc: fix transfer annotation for fixate virtual method

The fixate virtual method has the same semantics as gst_caps_fixate(),
so the caps parameter must be marked as (transfer full).

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

21 months agovalidate: Fix gst_validate_execute_action annotation
Thibault Saunier [Fri, 27 Jan 2023 16:49:33 +0000 (13:49 -0300)]
validate: Fix gst_validate_execute_action annotation

The action passed in is transfer full

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

21 months agogldisplay: Mark `gst_gl_display_create_context()` `other_context` parameter as nullable
Sebastian Dröge [Fri, 27 Jan 2023 14:22:06 +0000 (16:22 +0200)]
gldisplay: Mark `gst_gl_display_create_context()` `other_context` parameter as nullable

See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/438

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

21 months agouritranscodebin: Fix unref of NULL
Thibault Saunier [Fri, 27 Jan 2023 18:54:48 +0000 (15:54 -0300)]
uritranscodebin: Fix unref of NULL

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

21 months agompegpsdemux: Ignore DTS if PTS < DTS
Seungha Yang [Thu, 29 Dec 2022 15:49:27 +0000 (00:49 +0900)]
mpegpsdemux: Ignore DTS if PTS < DTS

It's possibly timestamp rollover case. But PTS < DTS is already
invalid case anyway.

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

21 months agoBaseSrc, PushSrc: add nullable annotations to virtual methods
Mathieu Duponchelle [Thu, 26 Jan 2023 14:42:18 +0000 (15:42 +0100)]
BaseSrc, PushSrc: add nullable annotations to virtual methods

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

21 months agowebrtc_sendrecv.py: Fix PEP8 warnings in CI lint
Nirbheek Chauhan [Wed, 18 Jan 2023 02:08:51 +0000 (07:38 +0530)]
webrtc_sendrecv.py: Fix PEP8 warnings in CI lint

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

21 months agowebrtc_sendrecv.py: Handle LATENCY messages
Nirbheek Chauhan [Wed, 18 Jan 2023 02:06:47 +0000 (07:36 +0530)]
webrtc_sendrecv.py: Handle LATENCY messages

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

21 months agowebrtc_sendrecv.py: Add bus message handling
Nirbheek Chauhan [Wed, 18 Jan 2023 02:06:21 +0000 (07:36 +0530)]
webrtc_sendrecv.py: Add bus message handling

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

21 months agowebrtc_sendrecv.py: Add support for using H264 encoding
Nirbheek Chauhan [Wed, 18 Jan 2023 02:05:18 +0000 (07:35 +0530)]
webrtc_sendrecv.py: Add support for using H264 encoding

Currently only works when we are creating the offer or the offer only
contains H264.

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