platform/upstream/gstreamer.git
2 years agodocs:examples: Fix building iOS examples
Thibault Saunier [Thu, 21 Apr 2022 13:18:56 +0000 (09:18 -0400)]
docs:examples: Fix building iOS examples

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

2 years agovalidate:pipeline-monitor: Minor cleanup setting unused variable
Thibault Saunier [Tue, 19 Apr 2022 22:38:12 +0000 (18:38 -0400)]
validate:pipeline-monitor: Minor cleanup setting unused variable

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

2 years agovideoconvertscale: Add properties to disable scaling/converting in videoconvert/video...
Thibault Saunier [Thu, 14 Apr 2022 13:48:14 +0000 (09:48 -0400)]
videoconvertscale: Add properties to disable scaling/converting in videoconvert/videoscale

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

2 years agovalidate: scenario: Add a 'allow-error' configuration
Thibault Saunier [Thu, 14 Apr 2022 13:09:35 +0000 (09:09 -0400)]
validate: scenario: Add a 'allow-error' configuration

This new configuration allows the scenario to keep running even
after receiving an "error" message on the bus.

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

2 years agovideoconvertscale: Don't claim we can support any kind of memory
Thibault Saunier [Fri, 21 May 2021 22:55:25 +0000 (18:55 -0400)]
videoconvertscale: Don't claim we can support any kind of memory

Since d0133a2d11566ff4c0cded7af8dfdff0046e0e8b "videoconvert: Allow
passthrough for ANY caps features" videoconvert will always claim that
it supports any kind of memory which is true in very specific case (when
it is running in passthrough mode). To get elements that autoplug
converters depending on the caps running in the pipeline (like
autovideoconvert), we need to have converters no lie about what they can
do when queried `accept_caps` or `query_caps`.

This still accepts any caps feature as before but it introduces
a restriction in the way we handle memory capsfeatures.

We keep previous behaviour in videoconvert and videoscale.

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

2 years agoIntroduce the videocolorscale element
Thibault Saunier [Fri, 17 Apr 2020 19:23:03 +0000 (15:23 -0400)]
Introduce the videocolorscale element

Now that videoconvert and videoscale's are both based on
GstVideoConverter and are using the exact same code, it makes much more
sense to have one element doing the two operation, and it can be
more efficient in some cases (one single path for both operations).

This removes the `videoscale` and `videoconvert` plugins but keeps the element
but makes them also do both operations (adding some APIs to each element).

There is a small change in API for the `videoscale:dither` property which
was previously a totally unused boolean, it is now an enum and is used.

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

2 years agoqsv: Add GPU description to element long-name on Windows
Seungha Yang [Wed, 20 Apr 2022 14:06:56 +0000 (23:06 +0900)]
qsv: Add GPU description to element long-name on Windows

Would be useful for a multi-Intel-GPU system

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

2 years agohls: Relax webvtt checks
Edward Hervey [Wed, 20 Apr 2022 12:50:35 +0000 (14:50 +0200)]
hls: Relax webvtt checks

If no hour field is present (which is allowed), the remaining data can be less
than 15 character.

Fix time translation failures if the hour field wasn't present

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

2 years agovapostproc: Notify if hdr-tone-mapping property changes.
Víctor Manuel Jáquez Leal [Tue, 19 Apr 2022 19:38:31 +0000 (21:38 +0200)]
vapostproc: Notify if hdr-tone-mapping property changes.

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

2 years agogstleaks: log the number of alive objects
Guillaume Desmottes [Wed, 20 Apr 2022 07:38:16 +0000 (09:38 +0200)]
gstleaks: log the number of alive objects

Can help checking if the number of alive objects is growing over time or stays stable.

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

2 years agova: Expose a couple va surface/buffer methods.
Víctor Manuel Jáquez Leal [Wed, 30 Mar 2022 16:09:36 +0000 (18:09 +0200)]
va: Expose a couple va surface/buffer methods.

And use them in va plugin.

Also, set as default logging category the vadisplay one.

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

2 years agortpmanager: Move some duplicated constant and helper function to a single place
Sebastian Dröge [Wed, 20 Apr 2022 07:53:16 +0000 (10:53 +0300)]
rtpmanager: Move some duplicated constant and helper function to a single place

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

2 years agogstreamer: Document various caps for the reference timestamp meta
Sebastian Dröge [Tue, 19 Apr 2022 11:05:16 +0000 (14:05 +0300)]
gstreamer: Document various caps for the reference timestamp meta

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

2 years agortpbin/rtpjitterbuffer: Don't parse RTCP SRs twice unless needed
Sebastian Dröge [Mon, 18 Apr 2022 13:22:50 +0000 (16:22 +0300)]
rtpbin/rtpjitterbuffer: Don't parse RTCP SRs twice unless needed

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

2 years agortpjitterbuffer: Add property to throttle handling of RTCP SR / NTP-64 syncing
Sebastian Dröge [Mon, 18 Apr 2022 08:50:48 +0000 (11:50 +0300)]
rtpjitterbuffer: Add property to throttle handling of RTCP SR / NTP-64 syncing

This proxies the "rtcp-sync-interval" property of rtpbin.

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

2 years agortpsession: Handle RTCP-SR-REQ (RFC6051) RTCP feedback message
Sebastian Dröge [Mon, 11 Apr 2022 16:14:43 +0000 (19:14 +0300)]
rtpsession: Handle RTCP-SR-REQ (RFC6051) RTCP feedback message

This causes an RTCP SR to be sent at the earliest possible time.

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

2 years agortpbin/rtpjitterbuffer: Allow syncing to an SR without CNAME if the CNAME is already...
Sebastian Dröge [Mon, 11 Apr 2022 16:25:43 +0000 (19:25 +0300)]
rtpbin/rtpjitterbuffer: Allow syncing to an SR without CNAME if the CNAME is already known

The RTCP SR packet might be without SDES in case of a reduced-size RTCP
packet. For syncing purposes the CNAME is needed but it might be known
already from an earlier RTCP packet or out of band, via the SDP for
example.

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

2 years agortpbin/jitterbuffer: Use inband 64-bit NTP timestamps according to RFC6051 for faster...
Sebastian Dröge [Thu, 7 Apr 2022 15:59:07 +0000 (18:59 +0300)]
rtpbin/jitterbuffer: Use inband 64-bit NTP timestamps according to RFC6051 for faster synchronization

When signalled via the caps that the header extension is used, it will
be read and used in the same way as the RTP/NTP time mapping from RTCP
SRs.

If the CNAME of the stream's SSRC is provided out of band via e.g. the
SDP then this allows streams to be synchronized immediately on the first
packet instead of having to wait for the first RTCP SR to arrive.

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

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

2 years agortpsession: Only add send latency to the running time if it is actually known
Sebastian Dröge [Sat, 9 Apr 2022 08:00:52 +0000 (11:00 +0300)]
rtpsession: Only add send latency to the running time if it is actually known

Otherwise we can't know the running time yet if rtcp-sync-send-time is
set, and have to wait until the latency is known later.

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

2 years agortpsession: Update 64-bit NTP header extensions with the actual NTP time in senders
Sebastian Dröge [Wed, 6 Apr 2022 12:39:14 +0000 (15:39 +0300)]
rtpsession: Update 64-bit NTP header extensions with the actual NTP time in senders

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

2 years agortpmanager: Add header extension implementation for the 64-bit RFC6051 NTP header...
Sebastian Dröge [Tue, 5 Apr 2022 17:05:57 +0000 (20:05 +0300)]
rtpmanager: Add header extension implementation for the 64-bit RFC6051 NTP header extension

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

2 years agosdp: Parse the RFC5576 Source-specific media SDP attributes into caps
Sebastian Dröge [Thu, 7 Apr 2022 16:36:25 +0000 (19:36 +0300)]
sdp: Parse the RFC5576 Source-specific media SDP attributes into caps

The format of the caps fields is
    ssrc-(SSRC_VALUE)-(ATTRIBUTE_NAME)=(ATTRIBUTE_VALUE)
.

Parsing of the attributes from the caps into the SDP is not implemented
as this depends not only a single stream's caps but on the whole rtpbin
configuration.

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

2 years agortsp-server: Add RFC5576 Source-specific media attribute to the SDP media for signall...
Sebastian Dröge [Thu, 7 Apr 2022 16:14:27 +0000 (19:14 +0300)]
rtsp-server: Add RFC5576 Source-specific media attribute to the SDP media for signalling the CNAME

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

2 years agodashsink: Unlock when failed to get content
Wonchul Lee [Tue, 19 Apr 2022 23:09:58 +0000 (08:09 +0900)]
dashsink: Unlock when failed to get content

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

2 years agogstglmixerbin: minor refactor of _find_element_pad_template
Camilo Celis Guzman [Mon, 18 Apr 2022 09:53:45 +0000 (18:53 +0900)]
gstglmixerbin: minor refactor of _find_element_pad_template

As suggested by @slomo, make the loop more readable and prevent returning
a garbage value to the caller from the previous implementation.

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

2 years agogstav1parse: fixup various possible logical errors
Camilo Celis Guzman [Mon, 18 Apr 2022 08:50:22 +0000 (17:50 +0900)]
gstav1parse: fixup various possible logical errors

Found via an analyzed build for Clang. Specifically we had:

gstav1parse.c[1850,11] in gst_av1_parse_detect_stream_format: Logic error: The left operand of '==' is a garbage value
gstav1parse.c[1606,11] in gst_av1_parse_handle_to_small_and_equal_align: Logic error: The left operand of '==' is a garbage value

Also a couple of false-positives:

gstav1parse.c[1398,24] in gst_av1_parse_handle_one_obu: Logic error: Branch condition evaluates to a garbage value
gstav1parse.c[1440,37] in gst_av1_parse_handle_one_obu: Logic error: The left operand of '-' is a garbage value

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

2 years agoAlways define ENABLE_NLS
Xavier Claessens [Fri, 25 Mar 2022 14:18:34 +0000 (10:18 -0400)]
Always define ENABLE_NLS

GLib guarantees libintl API is always available, provided by
proxy-libintl as last resort. GLib itself unconditionally define
ENABLE_NLS.

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

2 years agoDelete unused i18n headers
Xavier Claessens [Fri, 25 Mar 2022 14:20:24 +0000 (10:20 -0400)]
Delete unused i18n headers

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

2 years agoReplace gst-i18n-*.h with gi18n-lib.h
Xavier Claessens [Fri, 25 Mar 2022 13:59:23 +0000 (09:59 -0400)]
Replace gst-i18n-*.h with gi18n-lib.h

GLib guarantees libintl is always present, using proxy-libintl as
last resort. There is no need to mock gettex API any more.

This fix static build on Windows because G_INTL_STATIC_COMPILATION must
be defined before including libintl.h, and glib does it for us as part
as including glib.h.

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

2 years agogst-play: Do not split translatable string
Xavier Claessens [Fri, 25 Mar 2022 15:21:03 +0000 (11:21 -0400)]
gst-play: Do not split translatable string

Concatenating N_() strings does not work with gi18n.h macro, was working
only with GStreamer's redefinition.

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

2 years agocuda: Fix typo in gst_cuda_buffery_copy_type_to_string
Thibault Saunier [Wed, 13 Apr 2022 19:23:56 +0000 (15:23 -0400)]
cuda: Fix typo in gst_cuda_buffery_copy_type_to_string

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

2 years agocuda: Add a `gst_cuda_context_new_wrapped` constructor
Thibault Saunier [Sun, 12 Dec 2021 13:19:52 +0000 (13:19 +0000)]
cuda: Add a `gst_cuda_context_new_wrapped` constructor

So that application or people implementing cuda element from
outside GStreamer itself can ensure that their contexts are used
by GStreamer.

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

2 years agocuda: Factor out a public GstCUDA library
Thibault Saunier [Wed, 8 Dec 2021 11:48:08 +0000 (11:48 +0000)]
cuda: Factor out a public GstCUDA library

So applications and elements implemented outside GStreamer can reuse
our infrastructure

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

2 years agonvenc: Give more details about errors
Thibault Saunier [Fri, 3 Dec 2021 13:12:42 +0000 (13:12 +0000)]
nvenc: Give more details about errors

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

2 years agovideo: Fix possible overrun when iterating comp[] array
Nicolas Dufresne [Tue, 19 Apr 2022 15:05:05 +0000 (11:05 -0400)]
video: Fix possible overrun when iterating comp[] array

Fix 2 iterations that can overrun the array if the number of component is
equal to the size of the array.

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

2 years agoRevert "video-frame: avoid possible out of bound memory access"
Nicolas Dufresne [Tue, 19 Apr 2022 14:53:15 +0000 (10:53 -0400)]
Revert "video-frame: avoid possible out of bound memory access"

This reverts commit c4255f08f787ff6a41504b538fa4c2e911d40ec7.

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

2 years agomeson_options: declare glib and gobject checks at top level
Camilo Celis Guzman [Wed, 27 Oct 2021 17:38:07 +0000 (02:38 +0900)]
meson_options: declare glib and gobject checks at top level

This makes it easier to specify this features for all subprojects.

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

2 years agomeson: Add -Wl,-rpath,${libdir} on macOS
Nirbheek Chauhan [Mon, 18 Apr 2022 10:14:47 +0000 (15:44 +0530)]
meson: Add -Wl,-rpath,${libdir} on macOS

We made the gstreamer installation prefix relocatable by picking up
plugins relative to the location of libgstreamer-1.0.dylib, similar to
how it's done for Windows:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1627

This had a lot of side-effects:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1051
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/363
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/371
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/362

A partial fix for the cerbero side of these was:

https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/807

However, this relied on the consumers knowing that they need to add
`LC_RPATH` entries to the libdir of the prefix. This is done
automatically by build systems like Meson, but not by others, such as
Autotools, CMake, Cargo, XCode, etc. For those, we need to add the
RPATH entries to the gstreamer-1.0.pc file.

This also has the side-effect of fixing the loading of gstreamer rust
plugins on macOS:

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

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

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

2 years agovideo-frame: avoid possible out of bound memory access
Camilo Celis Guzman [Mon, 18 Apr 2022 09:14:44 +0000 (18:14 +0900)]
video-frame: avoid possible out of bound memory access

Although the components' initialization code would fill in -1 to all
unset components, make the code a bit more defensive and check for an
index bound first.

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

2 years agotests: dash_mpd: fix linker issues with non-optimizing compilers
Tim-Philipp Müller [Tue, 19 Apr 2022 08:52:51 +0000 (09:52 +0100)]
tests: dash_mpd: fix linker issues with non-optimizing compilers

undefined reference to `download_request_take_buffer'

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2117#note_1344646

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

2 years agogst_plugin_load_file: force plugin reload if diff filename
Ruben Gonzalez [Fri, 12 Nov 2021 19:13:10 +0000 (20:13 +0100)]
gst_plugin_load_file: force plugin reload if diff filename

If a file includes a new version of a plugin that exits in the
registry, the output of gst-inspect is incorrect. The output has the
correct version but incorrect filename, and element description.

This seems to have also fixed some documentation issues.

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

2 years agodocs: design: fix up some document titles
Tim-Philipp Müller [Mon, 18 Apr 2022 19:05:54 +0000 (20:05 +0100)]
docs: design: fix up some document titles

These show up in the index.

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

2 years agodocs: design: add adaptive streaming design docs to sitemap
Tim-Philipp Müller [Mon, 18 Apr 2022 19:04:26 +0000 (20:04 +0100)]
docs: design: add adaptive streaming design docs to sitemap

.. and some small additions to make it clearer what exist
and what's new.

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

2 years agod3dvideosink: Remove outdated comment
Seungha Yang [Mon, 18 Apr 2022 19:37:05 +0000 (04:37 +0900)]
d3dvideosink: Remove outdated comment

d3dvideosink is not a primary video sink element

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

2 years agoh264decoder,h265decoder: Do not hold codec_data buffer
Seungha Yang [Sun, 17 Apr 2022 15:25:18 +0000 (00:25 +0900)]
h264decoder,h265decoder: Do not hold codec_data buffer

... also do not need to extract it from caps.

Decoder uses codec_data only once per set_format() and
baseclass will extract codec_data buffer already.

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

2 years agod3d11decoder: Do not preallocate texture using downstream d3d11 buffer pool
Seungha Yang [Sun, 17 Apr 2022 14:55:55 +0000 (23:55 +0900)]
d3d11decoder: Do not preallocate texture using downstream d3d11 buffer pool

Our decoder implementation does not use downstream d3d11 pool for
decoding because of special requirement of D3D11/DXVA. So preallocation
using the downstream buffer pool will waste GPU memory in most cases.

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

2 years agogstdevicemonitor: added cleanup of signal handlers and hidden providers list
Tulio Beloqui [Fri, 29 May 2020 14:29:56 +0000 (11:29 -0300)]
gstdevicemonitor: added cleanup of signal handlers and hidden providers list

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

2 years agoNew HLS, DASH and MSS adaptive demuxer elements
Edward Hervey [Fri, 11 Mar 2022 16:11:50 +0000 (17:11 +0100)]
New HLS, DASH and MSS adaptive demuxer elements

This provides new HLS, DASH and MSS adaptive demuxer elements as a single plugin.

These elements offer many improvements over the legacy elements. They will only
work within a streams-aware context (`urisourcebin`, `uridecodebin3`,
`decodebin3`, `playbin3`, ...).

Stream selection and buffering is handled internally, this allows them to
directly manage the elementary streams and stream selection.

Authors:
* Edward Hervey <edward@centricular.com>
* Jan Schmidt <jan@centricular.com>
* Piotrek Brzeziński <piotr@centricular.com>
* Tim-Philipp Müller <tim@centricular.com>

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

2 years agov4l2videodec: copy colorimetry values to output_state caps
Hou Qi [Fri, 15 Apr 2022 01:53:19 +0000 (09:53 +0800)]
v4l2videodec: copy colorimetry values to output_state caps

This is to avoid transcoding negotiation fail between v4l2h265dec
and v4l2h264enc caused by colorimetry mismatch.

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

2 years agoh264parse: Include coded-picture-structure info in caps
Vivia Nikolaidou [Thu, 14 Apr 2022 10:22:03 +0000 (13:22 +0300)]
h264parse: Include coded-picture-structure info in caps

This reverts commit 652773de366a98e155332bf8ffb83ee5e6bea9e5 and
modifies it to rename the caps field name to coded-picture-structure.

It was previously removed because it confuses the decoder and we didn't
have a valid use case for including it in the encoded caps at this
stage. We now do have such a use case but still don't want to confuse
the decoder, so the field is renamed.

However, it is still not accurate without looking at the SEI picture
structure of each frame, so it was named coded-picture-structure. If its
value is "frame" it is most likely progressive, if it's "field" it is
most likely interlaced or mixed.

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

2 years agolibav: fix frame leak on negotiation error
Guillaume Desmottes [Fri, 15 Apr 2022 14:38:46 +0000 (16:38 +0200)]
libav: fix frame leak on negotiation error

The function owns a reference on the frame. Drop it if negotiation
failed as we are already doing for the other error cases.

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

2 years agodecodebin3: fix collection leak
Guillaume Desmottes [Tue, 25 May 2021 12:41:51 +0000 (14:41 +0200)]
decodebin3: fix collection leak

get_merged_collection() returns an owned stream collection and was
leaked in the else block.

Fix leak when running:
GST_TRACERS=leaks GST_DEBUG="GST_TRACER:7,leaks:6" gst-play-1.0 --use-playbin3 test.mkv

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

2 years agova: h264enc: Fix the forgotten unlock() when getting device path property.
He Junyan [Mon, 18 Apr 2022 04:44:19 +0000 (12:44 +0800)]
va: h264enc: Fix the forgotten unlock() when getting device path property.

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

2 years agoqsvdecoder: Use system memory for non-d3d11 downstream
Seungha Yang [Sun, 17 Apr 2022 13:25:14 +0000 (22:25 +0900)]
qsvdecoder: Use system memory for non-d3d11 downstream

QSV's memory download implementation seems to be more faster
than our implementation

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

2 years agoqsv: Add H.265 decoder
Seungha Yang [Sat, 16 Apr 2022 17:14:50 +0000 (02:14 +0900)]
qsv: Add H.265 decoder

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

2 years agoqsv: Include single gstva.h
Seungha Yang [Sat, 16 Apr 2022 17:18:37 +0000 (02:18 +0900)]
qsv: Include single gstva.h

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

2 years agoqsvh264dec: Don't register element if it's not supported by device
Seungha Yang [Sat, 16 Apr 2022 17:04:08 +0000 (02:04 +0900)]
qsvh264dec: Don't register element if it's not supported by device

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

2 years agoqsvh264dec: Add support for packetized format
Seungha Yang [Sat, 16 Apr 2022 16:27:10 +0000 (01:27 +0900)]
qsvh264dec: Add support for packetized format

Handle avc/avc3 packetized formats

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

2 years agoqsv: Move debug init into each source file
Seungha Yang [Sat, 16 Apr 2022 15:00:55 +0000 (00:00 +0900)]
qsv: Move debug init into each source file

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

2 years agoqsvdecoder: Reset next_task_index per init_session()
Seungha Yang [Sat, 16 Apr 2022 14:51:05 +0000 (23:51 +0900)]
qsvdecoder: Reset next_task_index per init_session()

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

2 years agod3d11decoder: Copy HDR10 related caps field manually
Seungha Yang [Sat, 16 Apr 2022 12:27:57 +0000 (21:27 +0900)]
d3d11decoder: Copy HDR10 related caps field manually

If negotiate() is called from the set_format() chain, sinkpad may not
hold caps yet, so baseclass cannot copy it over to srcpad caps.
Copy them manually.

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

2 years agoqsvencoder: Rename property name i-frames to idr-interval
Seungha Yang [Sat, 16 Apr 2022 13:27:13 +0000 (22:27 +0900)]
qsvencoder: Rename property name i-frames to idr-interval

... and clarify the meaning of the value for each h264 and h265
encoder since the usage of mfxInfoMFX::IdrInterval is different
per codec.

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

2 years agoqsvh265enc: Write HDR10 metadata SEI
Seungha Yang [Sat, 16 Apr 2022 12:26:55 +0000 (21:26 +0900)]
qsvh265enc: Write HDR10 metadata SEI

If device supports HDR10 metadata API, write the information
into bitstream per IDR.

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

2 years agogst_plugins_cache.json: Update va plugins.
Víctor Manuel Jáquez Leal [Wed, 13 Apr 2022 04:19:40 +0000 (06:19 +0200)]
gst_plugins_cache.json: Update va plugins.

* Update conditionally-available attribute in vah264enc properties.
* Update GstVaFeature usage.
* Update GstVaEncoderRatecontrol usage.
* Update vapostproc classification.
* Add `add-borders` property in vapostproc.

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

2 years agovah264enc: Use GstVaFeature enum for enabling MBBRC.
Víctor Manuel Jáquez Leal [Wed, 13 Apr 2022 03:58:46 +0000 (05:58 +0200)]
vah264enc: Use GstVaFeature enum for enabling MBBRC.

GstVaFeature is a common enumeration for auto/disabled/enabled kind of
property setting.

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

2 years agovah264enc: Move rate-control enum to encoder class helper.
Víctor Manuel Jáquez Leal [Wed, 13 Apr 2022 03:56:59 +0000 (05:56 +0200)]
vah264enc: Move rate-control enum to encoder class helper.

Since it's a common enumeration used, as user setting property, for
most of codecs.

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

2 years agovah264enc: Add device-path property.
Víctor Manuel Jáquez Leal [Wed, 13 Apr 2022 03:52:31 +0000 (05:52 +0200)]
vah264enc: Add device-path property.

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

2 years agogstleaks: fix pthread_atfork return value check
Guillaume Desmottes [Fri, 15 Apr 2022 15:00:24 +0000 (17:00 +0200)]
gstleaks: fix pthread_atfork return value check

pthread_atfork() returns 0 on success.

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

2 years agogst-python: fix build on systems without C++ compiler
Fabrice Fontaine [Fri, 15 Apr 2022 16:58:49 +0000 (18:58 +0200)]
gst-python: fix build on systems without C++ compiler

Fix the following build failure on systems without C++ compiler:

The following exception(s) were encountered:
Running "/home/autobuild/autobuild/instance-0/output-1/host/bin/i686-buildroot-linux-gnu-g++ --version" gave "[Errno 2] No such file or directory: '/home/autobuild/autobuild/instance-0/output-1/host/bin/i686-buildroot-linux-gnu-g++'"

Fixes:
 - http://autobuild.buildroot.org/results/eebf65036f79d21d347714d62afecd0108393308

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

2 years agocudautils: fix critical typo in gst_cuda_buffer_fallback_copy
Corentin Damman [Fri, 15 Apr 2022 13:19:36 +0000 (13:19 +0000)]
cudautils: fix critical typo in gst_cuda_buffer_fallback_copy

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

2 years agoplaybin3: fix missing lock when unknown stream type in pad-removed cb
hoonhee.lee [Fri, 15 Apr 2022 05:03:08 +0000 (14:03 +0900)]
playbin3: fix missing lock when unknown stream type in pad-removed cb

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

2 years agodecodebin3: Don't duplicate stream selections
Edward Hervey [Thu, 14 Apr 2022 13:21:48 +0000 (15:21 +0200)]
decodebin3: Don't duplicate stream selections

Make sure that the requested stream selection isn't identical to the current
one. If that's the case, just carry on as usual.

This avoids multiple `streams-selected` posting ... when the selection didn't
change.

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

2 years agox264enc: Don't try to fixate ANY allowed caps
Sebastian Dröge [Fri, 15 Apr 2022 13:53:25 +0000 (16:53 +0300)]
x264enc: Don't try to fixate ANY allowed caps

Instead fall back to the template caps.

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

2 years agoappsrc: fix annotations
Tim-Philipp Müller [Thu, 14 Apr 2022 17:44:48 +0000 (18:44 +0100)]
appsrc: fix annotations

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

2 years agortpbasepayload: Don't write header extensions if there's no corresponding input buffe...
Sebastian Dröge [Fri, 15 Apr 2022 16:55:34 +0000 (19:55 +0300)]
rtpbasepayload: Don't write header extensions if there's no corresponding input buffer for the packet

The GstRTPHeaderExtension API requires the input buffer to exist.

This can happen if the output packet is generated e.g. from a caps or
tags event like in the case for rtpgstpay.

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

2 years agotests: rename 'icles' subdir to be more descriptive
Brad Hards [Thu, 14 Apr 2022 10:10:46 +0000 (20:10 +1000)]
tests: rename 'icles' subdir to be more descriptive

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

2 years agoqtdemux: fix leak of channel_mapping
Havard Graff [Thu, 7 Apr 2022 01:12:47 +0000 (11:12 +1000)]
qtdemux: fix leak of channel_mapping

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

2 years agotsdemux: Fix AC-4 detection
Edward Hervey [Thu, 14 Apr 2022 06:23:51 +0000 (08:23 +0200)]
tsdemux: Fix AC-4 detection

This regression was introduced by
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1102
and has been present since 1.18

* Stream Type 0x06 is defined in the base mpeg-ts specification as Private PES
Packets. Determining the content should be solely based on descriptors found
within the PMT.
* This was abused in that commit by defining a "bluray-only" stream type for AC4
: `ST_BD_AUDIO_AC4`
* This should be entirely handled in the regular private pes handling further
down in the code

Fixes #1154

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

2 years agodocs: Update for Windows specific parts
Seungha Yang [Sat, 9 Apr 2022 19:11:02 +0000 (04:11 +0900)]
docs: Update for Windows specific parts

* glimagesink is not a recommended one on Windows
* Remove directdrawsink section
* d3dvideosink is legacy and should not be recommended
* Add d3d11videosink part
* directsoundsink should be deprecated
* Add wasapisink/wasapi2sink part

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

2 years agoptpclock: Fix wrong condition order from last commit
Sebastian Dröge [Wed, 13 Apr 2022 13:59:50 +0000 (16:59 +0300)]
ptpclock: Fix wrong condition order from last commit

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

2 years agogst-rtsp-server: minor spelling fixes
Marc Leeman [Wed, 13 Apr 2022 12:34:57 +0000 (14:34 +0200)]
gst-rtsp-server: minor spelling fixes

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

2 years agova: h264enc: Correct the hierarchical level name for pyramid-b frames.
He Junyan [Sun, 10 Apr 2022 09:28:03 +0000 (17:28 +0800)]
va: h264enc: Correct the hierarchical level name for pyramid-b frames.

The current way names the level by the number of B frames it contains, the
less it contains, the higher level it is. So the non ref B frames are in the
lowest layer and the B frames in the highest level refer to I/P frames.
But the widely used way is just the opposite, the ref B frames are in the
lower level and non ref B frames are at the highest level.
The is just a terminology change, and does not have any effect for compression
result and quality.

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

2 years agodoc: Update cache after NV12_8L128 and NV12_10BE_8L128 addition
Ming Qian [Wed, 13 Apr 2022 02:17:15 +0000 (10:17 +0800)]
doc: Update cache after NV12_8L128 and NV12_10BE_8L128 addition

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

2 years agov4l2: Add NV12_8L128 in gst_v4l2_object_get_caps_info
Ming Qian [Tue, 12 Apr 2022 06:15:01 +0000 (14:15 +0800)]
v4l2: Add NV12_8L128 in gst_v4l2_object_get_caps_info

It should be included in
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1379>

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

2 years agov4l2: Add a missed break
Ming Qian [Tue, 12 Apr 2022 02:35:26 +0000 (10:35 +0800)]
v4l2: Add a missed break

Fix a typo that miss a break in the switch statement

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

2 years agocodecs: av1parser: Fix a typo in seq_level_idx check.
He Junyan [Tue, 12 Apr 2022 02:34:27 +0000 (10:34 +0800)]
codecs: av1parser: Fix a typo in seq_level_idx check.

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

2 years agomeson: gst-play: Restore Windows high-resolution timer support
Seungha Yang [Mon, 11 Apr 2022 16:35:43 +0000 (01:35 +0900)]
meson: gst-play: Restore Windows high-resolution timer support

Fix regression of the commit 2952a73f4083487f33ae83407bef5245d2f8fef2

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

2 years agoptpclock: Allow at least 100ms delay between Sync/Follow_Up and Delay_Req/Delay_Resp...
Sebastian Dröge [Tue, 12 Apr 2022 16:22:51 +0000 (19:22 +0300)]
ptpclock: Allow at least 100ms delay between Sync/Follow_Up and Delay_Req/Delay_Resp messages

It doesn't matter for measurement purposes whether receiving them takes
a while and various PTP servers are not prioritizing to send them,
causing them to be dropped unnecessarily and preventing proper
synchronization with such servers.

This is especially a problem if the RTTs in the network are very low
compared to the additional delay imposed by the server.

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

2 years agoamfh265enc: Handle preset option
Seungha Yang [Tue, 12 Apr 2022 16:46:34 +0000 (01:46 +0900)]
amfh265enc: Handle preset option

Add missing preset option handling

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

2 years agoamfencoder: Do shared resource copy only if texture belongs to other device
Seungha Yang [Tue, 12 Apr 2022 16:39:43 +0000 (01:39 +0900)]
amfencoder: Do shared resource copy only if texture belongs to other device

Staging texture from the same d3d11device can be copied without
shared resource handling

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

2 years agowin32: Enable high-resolution timer for MinGW build
Seungha Yang [Mon, 11 Apr 2022 16:01:23 +0000 (01:01 +0900)]
win32: Enable high-resolution timer for MinGW build

timeapi.h is missing in our MinGW toolchain. Include mmsystem.h
header instead, which defines struct and APIs in case of our MinGW
toolchain. Note that in case of native Windows10 SDK (MSVC build),
mmsystem.h will include timeapi.h

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

2 years agoFix `transfer` gobject-introspection annotation typos
Sebastian Dröge [Tue, 12 Apr 2022 12:23:08 +0000 (15:23 +0300)]
Fix `transfer` gobject-introspection annotation typos

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

2 years agowpevideosrc: Give WebKit the keyboard, touch and pointer modifiers
Olivier Crête [Mon, 11 Apr 2022 21:03:41 +0000 (16:03 -0500)]
wpevideosrc: Give WebKit the keyboard, touch and pointer modifiers

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

2 years agowpesrc: Convert from utf32 to support other keys
Olivier Crête [Mon, 11 Apr 2022 20:56:19 +0000 (15:56 -0500)]
wpesrc: Convert from utf32 to support other keys

This makes all of the non-letter keys work.

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

2 years agowpesrc: Initialize key event to 0
Olivier Crête [Mon, 11 Apr 2022 20:54:05 +0000 (15:54 -0500)]
wpesrc: Initialize key event to 0

Otherwise, WebKit sees random modifiers

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

2 years agoamfcodec: fix setting quality presets
Andoni Morales Alastruey [Tue, 12 Apr 2022 09:20:00 +0000 (11:20 +0200)]
amfcodec: fix setting quality presets

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

2 years agomxfdemux: Fix issue with re-syncing
Edward Hervey [Mon, 11 Apr 2022 08:32:40 +0000 (10:32 +0200)]
mxfdemux: Fix issue with re-syncing

In case of re-syncing (i.e. moving to another partition to avoid too much of an
interleave), there was previously no checks to figure out whether a given
partition was already fully handled (i.e. when coming across it again after a
previous resync).

In order to handle this at least for single-track partitions, check whether we
have reached the essence track duration, and if so skip the partition.

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

2 years agomxfdemux: Don't double-increase track position
Edward Hervey [Mon, 11 Apr 2022 08:31:15 +0000 (10:31 +0200)]
mxfdemux: Don't double-increase track position

The essence track position should only be overriden if we sucesfully switched to
another position. In case of EOS we do not want to override it else we would
increase the track position *again* at the end of this function

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

2 years agoamfcodec: Fix for MinGW build
Seungha Yang [Mon, 11 Apr 2022 16:49:17 +0000 (01:49 +0900)]
amfcodec: Fix for MinGW build

timeapi.h header might not be missing depending on toolchain.
Also do hard meson error if winmm dep is not available but
amfcodec is explicitly enabled.
And fixing various GCC build warning errors.

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

2 years agogstreamer-sharp: fix typo in script name
Andoni Morales Alastruey [Mon, 11 Apr 2022 13:55:07 +0000 (15:55 +0200)]
gstreamer-sharp: fix typo in script name

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