platform/upstream/gstreamer.git
2 years agod3d11: Update library doc
Seungha Yang [Thu, 25 Aug 2022 15:16:56 +0000 (00:16 +0900)]
d3d11: Update library doc

* Private header name is changed to gstd3d11-private.h to follow
  naming convention
* Add Since mark everywhere
* Update member variable names to be consistent with the other
  object implementations in this library
* Correct outdated documentation

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

2 years agodocker/windows: Pass a couple installargs to python3
Jordan Petridis [Thu, 18 Aug 2022 12:25:08 +0000 (15:25 +0300)]
docker/windows: Pass a couple installargs to python3

From these, only PrependPath isn't enabled by default,
but its nice to explicitly enable the ones we need anyway.

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

2 years agovalue: Use g_critical() when trying to serialize things that can't be
Olivier Crête [Wed, 24 Aug 2022 16:42:12 +0000 (12:42 -0400)]
value: Use g_critical() when trying to serialize things that can't be

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

2 years agogstvalue: Don't loop forever when serializing invalid flag
Olivier Crête [Mon, 1 Aug 2022 18:00:20 +0000 (14:00 -0400)]
gstvalue: Don't loop forever when serializing invalid flag

The serialization code would loop forever if an invalid flag was sent into it.

With unit test for this corner case.

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

2 years agobin: Don't propagate state change errors of elements in locked state
Sebastian Dröge [Tue, 23 Aug 2022 16:40:54 +0000 (19:40 +0300)]
bin: Don't propagate state change errors of elements in locked state

Theoretically having elements in locked state should not have any effect
at all when the surrounding bin is doing state changes. However
previously a state change error of a locked element would cause the
bin's state change to also fail, which is clearly not intended.

State change failures of locked elements are to be handled by whoever
set the element to locked state. By always returning them here it is
impossible for the owner of the element to handle state change failures
gracefully without potentially affecting the whole pipeline's state
changes.

Non-failure returns are still returned as-is as the distinction between
ASYNC/NO_PREROLL/SUCCESS has big consequences on the state changes of
the bin and overall pipeline. Theoretically SUCCESS should also be
returned in all cases but I can't estimate the effects this would have
on the overall pipeline.

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

2 years agox(v)imagesink: Don't create invalid GstNavigationModifierType by simply passing throu...
Sebastian Dröge [Tue, 23 Aug 2022 16:12:17 +0000 (19:12 +0300)]
x(v)imagesink: Don't create invalid GstNavigationModifierType by simply passing through X11 event states

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

2 years agoavfvideosrc: Fix wrong default framerate value
Piotr Brzeziński [Thu, 25 Aug 2022 12:24:25 +0000 (14:24 +0200)]
avfvideosrc: Fix wrong default framerate value

Current default G_MAXINT is not a correct value under any circumstances.
This creates an issue with screen capture, during which we currently do
not get any framerate info causing G_MAXINT to show up, where elements
downstream can possibly misbehave - for example, `vtenc` causes
a kernel panic.
Replace with 30/1 to avoid such scenarios.

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

2 years agojpegdecoder: return the real error of decode_scan and decode_frame.
He Junyan [Thu, 25 Aug 2022 07:28:21 +0000 (15:28 +0800)]
jpegdecoder: return the real error of decode_scan and decode_frame.

The current handle_frame() does not return the real error that happens
in decode_scan and decode_frame, which makes the pipeline continue with
the error and may trigger asserting later.

We also return the error when decode_quant_table or decode_huffman_table
fails.

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

2 years agoexamples: d3d11videosink: Add present signal example
Seungha Yang [Fri, 19 Aug 2022 12:54:48 +0000 (21:54 +0900)]
examples: d3d11videosink: Add present signal example

Add an example to show the usage of present singal.
In this example, a text overlay with alpha blended background
will be rendered on swapchain's backbuffer by using
Direct3D11, Direct2D, and DirectWrite APIs.

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

2 years agod3d11videosink: Add display-format property
Seungha Yang [Tue, 23 Aug 2022 15:13:21 +0000 (00:13 +0900)]
d3d11videosink: Add display-format property

Make swapchian's display format configurable, since some DXGI formats
we can use for swapchain are not API interop compatible.
For instance, BGRA format should be used for Direct2D interop.

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

2 years agod3d11videosink: Add present signal
Seungha Yang [Fri, 19 Aug 2022 11:25:31 +0000 (20:25 +0900)]
d3d11videosink: Add present signal

The "present" signal will be emitted just before the
IDXGISwapChain::Present() call. The client can perform additional
GPU operation with given GstD3D11Device object and
ID3D11RenderTargetView handle. Or, the client can read back
the scene to be displayed on window using the signal.

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

2 years agov4l2allocator: Fix invalid imported dmabuf fd
Jianhui Dai [Wed, 24 Aug 2022 09:30:34 +0000 (17:30 +0800)]
v4l2allocator: Fix invalid imported dmabuf fd

Fix a typo that set userptr to dmabuf fd. It leads to failure of
dmabuf-import io-mode.

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

2 years agoplayback: add onvif metadata caps to raw caps
Mathieu Duponchelle [Fri, 22 Jul 2022 11:41:17 +0000 (13:41 +0200)]
playback: add onvif metadata caps to raw caps

+ remove encoding from x-onvif-metadata caps output by qtdemux

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

2 years agovideoconvert: fix passthrough on equivalent transfer
Mathieu Duponchelle [Tue, 23 Aug 2022 14:02:31 +0000 (16:02 +0200)]
videoconvert: fix passthrough on equivalent transfer

When the input info and output info are equal, except for the
transfer functions that are *not* equivalent, we need to set up
a converter as we won't be passthrough.

Fixes an assertion in that case.

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

2 years agoisoff: Fix earliest pts field parse issue
zhiyuan.liu [Tue, 23 Aug 2022 10:28:30 +0000 (10:28 +0000)]
isoff: Fix earliest pts field parse issue

earliest pts will be covered by first_offset field on version 0 case.

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

2 years agodmabuf: Make it clear that the FORMAT is a DRM fourcc
Olivier Crête [Wed, 15 Jun 2022 21:32:06 +0000 (17:32 -0400)]
dmabuf: Make it clear that the FORMAT is a DRM fourcc

Some of the formats in GstVideoFormat are a combination
of a DRM format and modifier, making them unclear.

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

2 years agoh265decoder: Update SpsMaxLatencyPictures properly
Seungha Yang [Thu, 18 Aug 2022 19:49:53 +0000 (04:49 +0900)]
h265decoder: Update SpsMaxLatencyPictures properly

The SpsMaxLatencyPictures value never gets back to zero even if
it's needed. Update the value properly.

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

2 years agoh265decoder: Reorganize debug printing
Seungha Yang [Thu, 18 Aug 2022 19:44:48 +0000 (04:44 +0900)]
h265decoder: Reorganize debug printing

As of the MR
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575
gst_h265_decoder_process_sps() is called per slice and it causes
noisy debug message print.
Reorganize related and the other debug printings at once.

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

2 years agoopenh264: Register debug categories earlier
Philippe Normand [Sat, 20 Aug 2022 15:15:15 +0000 (16:15 +0100)]
openh264: Register debug categories earlier

Otherwise the GST_ERROR message logged in case of ABI mismatch would be done on
an uninitialized category.

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

2 years agoopenh264enc: Fix constrained-high encoding
Philippe Normand [Sat, 20 Aug 2022 15:57:27 +0000 (16:57 +0100)]
openh264enc: Fix constrained-high encoding

constrained-high is high without B-frames, there is no EProfileIdc for this, so
assume high instead of hitting an assert down the line.

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

2 years agowebrtc:ice: Fix candidate stats related APIs for bindings
Thibault Saunier [Fri, 19 Aug 2022 13:07:50 +0000 (09:07 -0400)]
webrtc:ice: Fix candidate stats related APIs for bindings

null-terminated arrays of structures is not usable.

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

2 years agova: h265dec: Enable the scc_main_4:4:4_10 profile.
He Junyan [Thu, 18 Aug 2022 05:27:02 +0000 (13:27 +0800)]
va: h265dec: Enable the scc_main_4:4:4_10 profile.

We should enable this profile which is already allown in vaprofile.c
after libva 1.8 version.

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

2 years agoadaptivedemux2: Fix download helper with libsoup 3.0.x
Jan Alexander Steffens (heftig) [Thu, 18 Aug 2022 14:36:45 +0000 (16:36 +0200)]
adaptivedemux2: Fix download helper with libsoup 3.0.x

libsoup 3.0.x dispatches using a single source attached when the session
is created, so we need to create the session with the same context that
our download thread is later using.

2.74 or 3.1 will dispatch a response using the context which sent the
request. However, for any context other than the one that created the
session, this will also create and destroy sources, so there's still
some slight performance benefit.

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

2 years agokmssink: add fd property
U. Artie Eoff [Wed, 6 Jul 2022 13:08:17 +0000 (09:08 -0400)]
kmssink: add fd property

This allows an application to provide their own opened DRM device
fd handle to kmssink.  For example, an application can lease
multiple fd's from a DRM master to display on different CRTC
outputs at the same time with multiple kmssink instances.

Specifying the fd property is not allowed when driver-name
and/or bus-id properties are specified.

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

2 years agod3d11: Use CRITICAL_SECTION instead of GRecMutex
Seungha Yang [Thu, 18 Aug 2022 15:05:17 +0000 (00:05 +0900)]
d3d11: Use CRITICAL_SECTION instead of GRecMutex

The GRecMutex abstraction (and heap allocation happens in GLib)
is unnecessary for this plugin.

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

2 years agoadaptivedemux2: Implement send_event() vfunc
Jan Schmidt [Wed, 17 Aug 2022 23:48:15 +0000 (09:48 +1000)]
adaptivedemux2: Implement send_event() vfunc

Handle select-streams and seek events in an element
level send_event() vfunc, so they can be received
before any source pads are created.

This allows preferred streams to be selected before
segment downloading starts.

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

2 years agowebrtc: doc: Cleanup Since markers
Thibault Saunier [Wed, 17 Aug 2022 15:18:54 +0000 (11:18 -0400)]
webrtc: doc: Cleanup Since markers

We hide some newly public symbols when moving some objects to the library
which was not really correct in the end. Properly add the Since markers
as needed.

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

2 years agowebrtc:ice: Reindent header
Thibault Saunier [Tue, 16 Aug 2022 12:59:00 +0000 (08:59 -0400)]
webrtc:ice: Reindent header

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

2 years agowebrtc:ice: Mark protected fields as such
Thibault Saunier [Tue, 16 Aug 2022 01:27:06 +0000 (21:27 -0400)]
webrtc:ice: Mark protected fields as such

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

2 years agowebrtc: Fix documentaton moving symbols in the right pages
Thibault Saunier [Tue, 16 Aug 2022 01:25:25 +0000 (21:25 -0400)]
webrtc: Fix documentaton moving symbols in the right pages

As those symbols are documented in a 'fwd' header smart indexing in
hotdoc wasn't working.

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

2 years agowebrtc:ice: Avoid using GArray in public API
Thibault Saunier [Mon, 15 Aug 2022 15:52:50 +0000 (11:52 -0400)]
webrtc:ice: Avoid using GArray in public API

And use plain null terminated C arrays instead.

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

2 years agowebrtc:ice: Fix some annotations
Thibault Saunier [Mon, 15 Aug 2022 15:37:57 +0000 (11:37 -0400)]
webrtc:ice: Fix some annotations

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

2 years agowebrtc: Make GstWebRTCIceCandidateStats a Boxed type
Thibault Saunier [Mon, 15 Aug 2022 15:36:25 +0000 (11:36 -0400)]
webrtc: Make GstWebRTCIceCandidateStats a Boxed type

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

2 years agowebrtc:ice: Add padding to structures
Thibault Saunier [Sun, 14 Aug 2022 21:38:24 +0000 (17:38 -0400)]
webrtc:ice: Add padding to structures

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

2 years agocuda: Hide runtime compiler related header and symbols
Seungha Yang [Sun, 14 Aug 2022 12:49:27 +0000 (21:49 +0900)]
cuda: Hide runtime compiler related header and symbols

That's already abstracted via gst_cuda_nvrtc_compile() method
and therefore, we do not need to expose such symbols yet.

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

2 years agoaggregator: Improve debug output to better understand why pads are not ready or can...
Sebastian Dröge [Wed, 17 Aug 2022 13:27:36 +0000 (16:27 +0300)]
aggregator: Improve debug output to better understand why pads are not ready or can't accept more data

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

2 years agovajpegdec: Fix memory leak.
Víctor Manuel Jáquez Leal [Wed, 17 Aug 2022 10:22:38 +0000 (12:22 +0200)]
vajpegdec: Fix memory leak.

Free value content.

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

2 years agovajpegdec: Fix 4:2:2 for i965.
Víctor Manuel Jáquez Leal [Tue, 16 Aug 2022 18:05:15 +0000 (20:05 +0200)]
vajpegdec: Fix 4:2:2 for i965.

Since i965 uses NV12 either for 4:2:0 and 4:2:2 chroma (using an
internal color conversion) the chroma validation has to be shortcut.

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

2 years agova: libs: Add Y42B format.
Víctor Manuel Jáquez Leal [Tue, 16 Aug 2022 17:50:49 +0000 (19:50 +0200)]
va: libs: Add Y42B format.

Enable 4:2:2 JPEG decoding in iHD.

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

2 years agova: Validate JPEG subsampling configurations.
Víctor Manuel Jáquez Leal [Tue, 16 Aug 2022 14:06:20 +0000 (16:06 +0200)]
va: Validate JPEG subsampling configurations.

There are Mesa Gallium drivers that report subsampling but without
any pixel format. So, strip out these subsamplings.

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

2 years agova: gst_va_create_raw_caps_from_config() may return NULL.
Víctor Manuel Jáquez Leal [Tue, 16 Aug 2022 12:45:46 +0000 (14:45 +0200)]
va: gst_va_create_raw_caps_from_config() may return NULL.

This patch verifies if the function returns NULL in the caller.

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

2 years agodecklink: Validate video input format
Eric Knapp [Wed, 17 Aug 2022 15:42:09 +0000 (11:42 -0400)]
decklink: Validate video input format

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

2 years agodecklink: Auto-detect 10-bit YUV
Eric Knapp [Mon, 15 Aug 2022 15:23:56 +0000 (11:23 -0400)]
decklink: Auto-detect 10-bit YUV

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

2 years agoexamples: gtk: Fix MSVC build
Seungha Yang [Fri, 12 Aug 2022 13:18:22 +0000 (22:18 +0900)]
examples: gtk: Fix MSVC build

gtk-play.c(370): error C2375: 'rewind_button_clicked_cb': redefinition;
different linkage

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

2 years agobase: video-converter: add accessors for input and output formats
Guillaume Desmottes [Wed, 17 Aug 2022 10:53:02 +0000 (12:53 +0200)]
base: video-converter: add accessors for input and output formats

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

2 years agovaapi: plugin: Handle when no encoders/decoders available.
Víctor Manuel Jáquez Leal [Thu, 11 Aug 2022 19:22:12 +0000 (21:22 +0200)]
vaapi: plugin: Handle when no encoders/decoders available.

Nouveau driver currently only exposes postproc entry. But
vaapidecodebin is registered independent if there are decoders or not,
exposing a segmentation fault.

This patch removes the encoder/decoder/codec arrays if no entries are
found, and if no decoders are found vaapidecodebin is not
registered. Also for vaapipostproc if no postproc entry is found.

Also, if general decoder, used by vaapidecodebin, doesn't have a sink
pad string, don't register the glib type.

Fixes: #1349
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2865>

2 years agodoc: Fix typo
Krystian Wojtas [Wed, 17 Aug 2022 06:00:12 +0000 (08:00 +0200)]
doc: Fix typo

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

2 years agogst-play: missing cleanup for g_autoptr
Daniel Morin [Mon, 15 Aug 2022 02:31:29 +0000 (22:31 -0400)]
gst-play: missing cleanup for g_autoptr

Without this change cleanup function for g_autoptr is not defined for
GstPlayMediaInfo, GstPlaySignalAdapter, GstPlayVideoRenderer,
GstPlayVideoOverlayVideoRenderer and GstPlayVisualization. Cleanup
function was defined in gstplay.h, but missing in other header files.

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

2 years agosplitmuxsrc: Stop pad task before cleanup
Jan Schmidt [Tue, 16 Aug 2022 23:11:52 +0000 (09:11 +1000)]
splitmuxsrc: Stop pad task before cleanup

When stopping the element, make sure the pad task
is stopped before destroying the part readers.

Closes a race where the pad task might access
a freed pointer.

Also add a guard against this sort of thing
by holding a ref to the reader in the pad loop.

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

2 years agoqtdemux: Avoid crash on reconfiguring.
Jan Schmidt [Fri, 12 Aug 2022 10:20:43 +0000 (20:20 +1000)]
qtdemux: Avoid crash on reconfiguring.

When reconfiguring a stream that never created
an output pad, don't access a NULL GstPad pointer.

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

2 years agoqtdemux: Set parsed=true on ONVIF Timed Metadata caps
Sebastian Dröge [Tue, 16 Aug 2022 16:01:19 +0000 (19:01 +0300)]
qtdemux: Set parsed=true on ONVIF Timed Metadata caps

Inside MP4 the metadata must be properly parsed into frames and in
order.

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

2 years agomeson: d3d11: Fix missing header install
Seungha Yang [Tue, 16 Aug 2022 12:01:47 +0000 (21:01 +0900)]
meson: d3d11: Fix missing header install

Install gstd3d11compile.h header file

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

2 years agov4l2bufferpool: Fix debug trace
Nicolas Dufresne [Mon, 15 Aug 2022 18:30:50 +0000 (14:30 -0400)]
v4l2bufferpool: Fix debug trace

The tracing of the buffer pointer was done on the secondary pointer, which
does not match with other traces of the same buffer. This made the trace
confusing and less useful.

Fixes #1379

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

2 years agoadaptivedemux2: Fix for period switching in live streams
Jan Schmidt [Fri, 12 Aug 2022 11:57:25 +0000 (21:57 +1000)]
adaptivedemux2: Fix for period switching in live streams

When playing live, it's possible that one stream reaches
the end of the available playback window and goes to sleep
waiting for a manifest update, and the manifest update
introduces a new period. In that case, the sleeping
stream needs to wake up and go 'properly' EOS before we
can advance the input to the new period.

Accordingly, make sure that a stream's last_ret value
is not marked as EOS if it's just sleeping waiting for a live
manifest update.

Also fix the output loop to go back and re-check if it's
time to switch to the next period after dequeuing and
discarding an EOS event.

https://livesim.dashif.org/livesim/periods_20/testpic_2s/Manifest.mpd

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

2 years agovideoconvert,videoscale: Do conversion in videoconvert and scaling in videoscale
Seungha Yang [Fri, 5 Aug 2022 11:52:19 +0000 (20:52 +0900)]
videoconvert,videoscale: Do conversion in videoconvert and scaling in videoscale

Keep behaving the same as before videoconvertscale port

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

2 years agoRevert "videoconvertscale: Add properties to disable scaling/converting in videoconve...
Seungha Yang [Fri, 5 Aug 2022 11:16:00 +0000 (20:16 +0900)]
Revert "videoconvertscale: Add properties to disable scaling/converting in videoconvert/videoscale"

This reverts commit cd7a91cef1c6a2e24d440126b7f2ab543fb205c5.

Reverting properties, scaling in videoconvert and converting in
videoscale will be disabled by the other commit

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

2 years agomssdemux2: Use gsturi structure to form fragment urls
Hosang Lee [Thu, 11 Aug 2022 00:34:58 +0000 (09:34 +0900)]
mssdemux2: Use gsturi structure to form fragment urls

Utilize gsturi to form fragment url paths.
A token query may contain the string "manifest" and this would lead
to improper url creations.

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

2 years agometa: Set the parent refcount of the GstStructure correctly
Nirbheek Chauhan [Mon, 15 Aug 2022 14:37:09 +0000 (20:07 +0530)]
meta: Set the parent refcount of the GstStructure correctly

The parent refcount is of the *transformed* buffer, not the input
buffer.

Also update the docs to clarify that @transbuf is the transformed
buffer, and not the buffer on which a transformation is being
performed.

Due to this bug, modifying the structure of a meta that has been
copied to another buffer fails with:

gst_structure_set: assertion 'IS_MUTABLE (structure) || field == NULL' failed

Add a test for the same.

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

2 years agod3d11decoder: Do timer based DecoderBeginFrame retry
Seungha Yang [Sun, 14 Aug 2022 16:50:15 +0000 (01:50 +0900)]
d3d11decoder: Do timer based DecoderBeginFrame retry

... instead of retry count based one, because the precision of Sleep()
varies depending on system and application configuration.
Also, don't retry DecoderBeginFrame if decoder is doing flush.

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

2 years agocudaupload,cudadownload: Don't simplify caps in transform_caps
Seungha Yang [Sun, 14 Aug 2022 12:18:24 +0000 (21:18 +0900)]
cudaupload,cudadownload: Don't simplify caps in transform_caps

The simplified caps might not be a subset of filter caps
and basetransform will complain about it.

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

2 years agod3d11decoder: Do not use miniobject qdata
Seungha Yang [Sun, 14 Aug 2022 15:22:14 +0000 (00:22 +0900)]
d3d11decoder: Do not use miniobject qdata

The miniobject qdata uses global mutex.
Use ID3D11DeviceChild::{Set,Get}PrivateData methods instead.

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

2 years agossaparse: include required system headers for isspace() and sscanf() functions
Khem Raj [Sat, 13 Aug 2022 05:42:28 +0000 (22:42 -0700)]
ssaparse: include required system headers for isspace() and sscanf() functions

Newer compilers ( clang 15 ) have turned stricter and errors out instead
of warning on implicit function declations

Fixes
gstssaparse.c:297:12: error: call to undeclared library function 'isspace' with type 'int (int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    while (isspace(*t))

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

2 years agodocs: Remove dxgiscreencapsrc from documentation
Seungha Yang [Fri, 12 Aug 2022 20:24:03 +0000 (05:24 +0900)]
docs: Remove dxgiscreencapsrc from documentation

The implementation was dropped in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1750

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

2 years agoplayer: Don't leak wrapped video info
Sebastian Dröge [Sat, 13 Aug 2022 09:24:37 +0000 (12:24 +0300)]
player: Don't leak wrapped video info

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

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

2 years agoplay: Make ownership of video-sink clearer in combination with floating references
Sebastian Dröge [Sat, 13 Aug 2022 08:50:20 +0000 (11:50 +0300)]
play: Make ownership of video-sink clearer in combination with floating references

And correctly handle the case of VideoRenderer::create_video_sink() not
actually returning a floating reference, which might be tricky for some
bindings.

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

2 years agoplay: Fix object construction
Sebastian Dröge [Sat, 13 Aug 2022 08:49:08 +0000 (11:49 +0300)]
play: Fix object construction

Ideally new() functions should simply call g_object_new() and not much
else, so let's do that here and handle all the construction properly in
a GObject way.

Now a play object created via g_object_new() is actually usable.

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

2 years agoplayer: Fix object construction
Sebastian Dröge [Sat, 13 Aug 2022 08:39:59 +0000 (11:39 +0300)]
player: Fix object construction

Ideally new() functions should simply call g_object_new() and not much
else, so let's do that here and handle all the construction properly in
a GObject way.

Now a player object created via g_object_new() is actually usable.

In addition, also fix the video-renderer property so that reading it
returns an object of the correct type.

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

2 years agoplayer: Release signal adapter on finalize
Sebastian Dröge [Sat, 13 Aug 2022 08:30:35 +0000 (11:30 +0300)]
player: Release signal adapter on finalize

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

2 years agomxfdemux: Always calculate BlockAlign of raw audio
Seungha Yang [Mon, 8 Aug 2022 14:37:11 +0000 (23:37 +0900)]
mxfdemux: Always calculate BlockAlign of raw audio

Workaround for nBlockAlign and nBitsPerSample mismatch. Always
use the formula described in the specification for BlockAlign value

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

2 years agortspsrc: Consider the actual control base URI also in case the connection URI contain...
Sebastian Dröge [Fri, 12 Aug 2022 10:20:01 +0000 (13:20 +0300)]
rtspsrc: Consider the actual control base URI also in case the connection URI contains a query string

That is, get rid of unnecessary and wrong special-casing.

This could always use gst_rtsp_url_get_request_uri_with_control() but as
we only have the control base URI as string it is easier to just call
gst_uri_join_strings().

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

2 years agortspurl: Use gst_uri_join_strings() in gst_rtsp_url_get_request_uri_with_control...
Sebastian Dröge [Fri, 12 Aug 2022 10:16:50 +0000 (13:16 +0300)]
rtspurl: Use gst_uri_join_strings() in gst_rtsp_url_get_request_uri_with_control() instead of a hand-crafted, wrong version

For example the query string of the base must not be taken over to the
request URL unless there is no control path, and control paths can be
absolute and must not be considered relative if they start with a /.

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

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

2 years agortspurl: Use fail_unless_equals_string() in tests
Sebastian Dröge [Fri, 12 Aug 2022 10:15:46 +0000 (13:15 +0300)]
rtspurl: Use fail_unless_equals_string() in tests

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

2 years agomeson: d3d11: Fix build with GIR enabled
Seungha Yang [Fri, 12 Aug 2022 13:05:36 +0000 (22:05 +0900)]
meson: d3d11: Fix build with GIR enabled

... and remove unused list

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

2 years agoqtdemux: Add reference timestamp meta with UTC times based on the ONVIF Export File...
Sebastian Dröge [Thu, 11 Aug 2022 15:37:18 +0000 (18:37 +0300)]
qtdemux: Add reference timestamp meta with UTC times based on the ONVIF Export File Format CorrectStartTime box to outgoing buffers

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

2 years agogstplayer: Plug a memory leak
Matthias Clasen [Fri, 12 Aug 2022 15:24:41 +0000 (18:24 +0300)]
gstplayer: Plug a memory leak

This was showing up as a memory leak in GTK's
gstreamer media backend:

40 bytes in 1 blocks are definitely lost in loss record 18,487 of 40,868
   at 0x484586F: malloc (vg_replace_malloc.c:381)
   by 0x50D5278: g_malloc (gmem.c:125)
   by 0x50EDBA5: g_slice_alloc (gslice.c:1072)
   by 0x50EFBCC: g_slice_alloc0 (gslice.c:1098)
   by 0x51F2F45: g_type_create_instance (gtype.c:1911)
   by 0x51DAE37: g_object_new_internal (gobject.c:2011)
   by 0x51DC080: g_object_new_with_properties (gobject.c:2181)
   by 0x51DCB20: g_object_new (gobject.c:1821)
   by 0x9855F86: UnknownInlinedFun (gstplayer-wrapped-video-renderer.c:109)
   by 0x9855F86: gst_player_new (gstplayer.c:579)

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

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

2 years agohlsdemux2: Fix reference leak of variant stream
Jan Schmidt [Wed, 10 Aug 2022 19:17:05 +0000 (05:17 +1000)]
hlsdemux2: Fix reference leak of variant stream

When switching back to the previous variant stream
in gst_hls_demux_change_playlist(), fix a couple of
paths that would leak a reference to the previous
variant.

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

2 years agohlsdemux2: Don't leak the datetime in time map structs
Jan Schmidt [Wed, 10 Aug 2022 19:07:10 +0000 (05:07 +1000)]
hlsdemux2: Don't leak the datetime in time map structs

Add a function to clean up GstHLSTimeMap structs
and free the ref on the optional associated GDateTime

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

2 years agohlsdemux2: Fix typefind leak and invalid memory access
Jan Schmidt [Wed, 10 Aug 2022 19:03:10 +0000 (05:03 +1000)]
hlsdemux2: Fix typefind leak and invalid memory access

When typefinding aggregates incoming data to a pending
typefind buffer and then succeeds in typefinding, it
leaks the aggregated buffer, and leaves the caller
accessing an unreffed buffer.

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

2 years agohlsdemux2: m3u8: Fix memory leaks on parsing
Jan Schmidt [Wed, 10 Aug 2022 19:36:15 +0000 (05:36 +1000)]
hlsdemux2: m3u8: Fix memory leaks on parsing

Fix memory leaks when parsing of an m3u8 file is
incomplete, with EXTINF or EXT-X-PROGRAM-DATE-TIME
directives, but no segment url.

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

2 years agohlsdemux2: m3u8: Fix memory leak
Jan Schmidt [Wed, 10 Aug 2022 14:59:50 +0000 (00:59 +1000)]
hlsdemux2: m3u8: Fix memory leak

Clear the GValue holding intermediate GstStructure field
data.

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

2 years agoadaptivedemux2: Fix uninitialised memory usage in debug
Jan Schmidt [Wed, 10 Aug 2022 15:01:07 +0000 (01:01 +1000)]
adaptivedemux2: Fix uninitialised memory usage in debug

Fix printing uninitialised memory by clearing the
GstAdaptiveDemuxClock structure when allocating.

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

2 years agortpst2022-1-fecenc: Drain column packets on EOS
Nirbheek Chauhan [Thu, 11 Aug 2022 20:50:40 +0000 (02:20 +0530)]
rtpst2022-1-fecenc: Drain column packets on EOS

Otherwise we won't send the protection packets for the last few
packets when a stream ends.

Also send EOS on the FEC src row pad immediately, and on the FEC src
column pad after draining is complete. This makes it so that the FEC
src pads on rtpbin behave the same way as the RTCP src pads on rtpbin
when EOS is received on the send_rtp_sink pad.

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

2 years agobasetextoverlay: Don't miscalculate text running times
Jan Schmidt [Wed, 27 Jul 2022 12:34:42 +0000 (22:34 +1000)]
basetextoverlay: Don't miscalculate text running times

When a new segment event arrives, it immediately updates
the current stored segment, which was used for calculating
the running time of the current text buffer for every
passing video frame. This means a segment that arrives
after the text buffer might get used to (mis)calculate
the running times subsequently.

Instead, calculate and store the right running time
using the current segment when storing the buffer. Later
the stored segment can get freely updated.

This fixes the case where pieces of video and text streams
are seamlessly concatenated and fed through the text overlay.
Previously, it could lead to the current text buffer suddenly
have a massive running time and blocking all further input.

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

2 years agod3d11window: fix DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING swap chain flag for full screen
Corentin Damman [Fri, 12 Aug 2022 09:32:45 +0000 (11:32 +0200)]
d3d11window: fix DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING swap chain flag for full screen

Fixes #1372 (regression introduced in 5eeec165)

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

2 years agoqtdemux: Don't use invalid values from failed trex parsing
Edward Hervey [Thu, 11 Aug 2022 06:48:08 +0000 (08:48 +0200)]
qtdemux: Don't use invalid values from failed trex parsing

If parsing the fragment default values (`trex` atom) failed, don't try to
compute a bogus sample_description_id value.

Fixes #1369

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

2 years agowpesrc: Switch URI handler to web+... protocols
Philippe Normand [Wed, 10 Aug 2022 10:12:37 +0000 (11:12 +0100)]
wpesrc: Switch URI handler to web+... protocols

The web://http:// URIs were not compliant with RFC 3986. Using web+http://
allows us to use the GstUri parser to pass down a valid URI to `wpevideosrc`.

Corresponding change for the CEF source element:
https://github.com/centricular/gstcefsrc/commit/8d499495dd79cc0bf9a38ae82b03e374d78f68ae

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

2 years agodocs: copy-paste fix
Krystian Wojtas [Tue, 9 Aug 2022 14:24:48 +0000 (16:24 +0200)]
docs: copy-paste fix

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

2 years agonvcodec: fix caps leaks in nvh264/h265encoder
Corentin Damman [Tue, 9 Aug 2022 10:24:53 +0000 (12:24 +0200)]
nvcodec: fix caps leaks in nvh264/h265encoder

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

2 years agogst: Protect initialization state with a recursive mutex.
Sebastian Dröge [Sat, 9 Jul 2022 14:04:07 +0000 (17:04 +0300)]
gst: Protect initialization state with a recursive mutex.

Otherwise a gst_init() call from a plugin would deadlock if the plugin
is loaded as part of registry updating.

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

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

2 years agoregistry: Remove dead code
Sebastian Dröge [Sat, 9 Jul 2022 14:02:26 +0000 (17:02 +0300)]
registry: Remove dead code

Initialization/updating of the registry can't possible fail and all code
paths always returned TRUE.

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

2 years agogst: Don't fail gst_init() if updating the registry fails
Sebastian Dröge [Sat, 9 Jul 2022 13:50:54 +0000 (16:50 +0300)]
gst: Don't fail gst_init() if updating the registry fails

Everything is already marked as initialized at that point and by failing
no tracers would be loaded or plugin feature rank overrides would be
applied.

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

2 years agovideoflip: Add support for 10/12bit planar formats
Piotr Brzeziński [Tue, 9 Aug 2022 07:42:23 +0000 (09:42 +0200)]
videoflip: Add support for 10/12bit planar formats

Implements support for I420, I422 and Y444 in 10/12 bit LE/BE variants.
I422 is handled separately from the rest, as it needs to consider
the endianness of the current format during most transforms.

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

2 years agovah264enc: Set codec frame sync point if IDR
Víctor Manuel Jáquez Leal [Tue, 9 Aug 2022 10:29:34 +0000 (12:29 +0200)]
vah264enc: Set codec frame sync point if IDR

This flag is used by GstVideoEncoder base class for certain configurations.

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

2 years agovah264enc: Packed headers can be zero.
Víctor Manuel Jáquez Leal [Tue, 9 Aug 2022 10:28:43 +0000 (12:28 +0200)]
vah264enc: Packed headers can be zero.

A driver can report back no packed header support (VA_ENC_PACKED_HEADER_NONE).
This patch removes that false verification.

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

2 years agoopusenc: improve inband-fec property documentation
Tim-Philipp Müller [Tue, 9 Aug 2022 17:06:41 +0000 (18:06 +0100)]
opusenc: improve inband-fec property documentation

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

2 years agoalpha: fix stride issue when out buffer has padding on right
Haihua Hu [Thu, 4 Aug 2022 10:09:52 +0000 (18:09 +0800)]
alpha: fix stride issue when out buffer has padding on right

if outbuf has padding on right, need jump to next line use stride,
otherwise downstream element will show a wrong picture when use the
same stride

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

2 years agod3d11: Use WIN32 API directly for locking with RAII pattern
Seungha Yang [Sun, 7 Aug 2022 14:24:04 +0000 (23:24 +0900)]
d3d11: Use WIN32 API directly for locking with RAII pattern

Such abstraction is unnecessary for this library/plugin.
Use WIN32 API directly instead of GLib wrappers.

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

2 years agod3d11memory: Remove unnecessary locking
Seungha Yang [Sun, 7 Aug 2022 13:41:07 +0000 (22:41 +0900)]
d3d11memory: Remove unnecessary locking

* memory map/unmap is already protected by d3d11 device lock.
  Don't need to take another memory lock.
* Use WIN32 critical section and slim reader/writer lock APIs
  directly instead of GLib wrappers.

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

2 years agovah264enc: Fix caps for mesa gallium.
Víctor Manuel Jáquez Leal [Fri, 5 Aug 2022 15:20:05 +0000 (17:20 +0200)]
vah264enc: Fix caps for mesa gallium.

Radeon mesa gallium driver has a bug which adds P010_10LE sink caps
format. This patch removes formats which arent 420 chroma.

gst_caps_set_format_array() wasn't used because the fix traverse
several structures with potential different formats.

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

2 years agovah264dec: Complete profiles in decoder.
Víctor Manuel Jáquez Leal [Fri, 5 Aug 2022 13:54:39 +0000 (15:54 +0200)]
vah264dec: Complete profiles in decoder.

Instead of specifying all the H.264 "supported" profiles in the global
hash table (used either by decoders and encoders), just complete them
in the decoder only, since the encoder doesn't support them.

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