platform/upstream/gstreamer.git
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>

2 years agortpbin: Fix division by zero when using ts-offset-smoothing-factor
Robert Rosengren [Mon, 11 Apr 2022 11:40:56 +0000 (13:40 +0200)]
rtpbin: Fix division by zero when using ts-offset-smoothing-factor

avg_ts_offset may cause division by zero when calculating potential
overflow protection. This fix will avoid the division.

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

2 years agoqsv: Add JPEG encoder
Seungha Yang [Sat, 9 Apr 2022 14:32:19 +0000 (23:32 +0900)]
qsv: Add JPEG encoder

Note that YUY2 is not supported yet, since the format support is not
implemented now.

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

2 years agosubparse: don't try to index string with -1
Matthew Waters [Sun, 10 Apr 2022 00:55:02 +0000 (10:55 +1000)]
subparse: don't try to index string with -1

If the len of the string turns out to be 0, str[len - 1] resolved to
str[-1] which is not a good idea.

Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=46543
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2147>

2 years agoUpdate openh264 wrap to v2.2.0 + fixes from master
Tim-Philipp Müller [Sat, 9 Apr 2022 19:54:58 +0000 (20:54 +0100)]
Update openh264 wrap to v2.2.0 + fixes from master

Commit 0819f288dc5fc24fb34089113bc230aea65c8375 to be precise.

We need post-v2.2.0 build fixes from master, otherwise linking
fails because of missing symbols.

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

2 years agoamfcodec: Update plugin cache
Seungha Yang [Sat, 9 Apr 2022 17:34:17 +0000 (02:34 +0900)]
amfcodec: Update plugin cache

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

2 years agonvencoder: Update property names and default values
Seungha Yang [Fri, 8 Apr 2022 15:52:07 +0000 (00:52 +0900)]
nvencoder: Update property names and default values

Update properties of newly written D3D11/CUDA mode encoders
to be consistent with Intel QSV plugin. And rename "zerolatency"
to "zero-reorder-delay" because previous "zerolatency" may
misleading

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

2 years agoqsvencoder: Update property names and default values
Seungha Yang [Fri, 8 Apr 2022 15:00:59 +0000 (00:00 +0900)]
qsvencoder: Update property names and default values

Stop using MSDK plugins property naming, instead use unified names
and default values to be consistent with newly written NVIDIA encoders.

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

2 years agoamfcodec: Add support for h264/h265 encoding
Seungha Yang [Wed, 30 Mar 2022 19:16:24 +0000 (04:16 +0900)]
amfcodec: Add support for h264/h265 encoding

New encoder implementations for AMD GPU using AMF API

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

2 years agoamfcodec: Import AMF SDK headers
Seungha Yang [Wed, 30 Mar 2022 16:36:37 +0000 (01:36 +0900)]
amfcodec: Import AMF SDK headers

SDK version v1.4.24 at the commit of
https://github.com/GPUOpen-LibrariesAndSDKs/AMF/commit/fbf12cd39fe1812ed902525a1c001307b94871b9

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

2 years agomsdk: Fix Windows build
Seungha Yang [Fri, 8 Apr 2022 17:13:57 +0000 (02:13 +0900)]
msdk: Fix Windows build

Headers of gstva should not be included on Windows

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

2 years agortpopusdepay: assume 2 channels if sprop-stereo is missing
Tristan Matthews [Wed, 6 Apr 2022 13:46:30 +0000 (09:46 -0400)]
rtpopusdepay: assume 2 channels if sprop-stereo is missing

Fixes #1064

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

2 years agod3d11window: Use ANSI version WIN32 API explicitly
Seungha Yang [Thu, 7 Apr 2022 19:24:36 +0000 (04:24 +0900)]
d3d11window: Use ANSI version WIN32 API explicitly

We were using ANSI version APIs implicitly because UNICODE is not
defined by ourselves. But potentially it can be broken if user
defines UNICODE.

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

2 years agod3d11: Run indent
Seungha Yang [Thu, 7 Apr 2022 19:02:55 +0000 (04:02 +0900)]
d3d11: Run indent

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

2 years agoogg: fix possible buffer overrun
Matthew Waters [Fri, 8 Apr 2022 01:10:49 +0000 (11:10 +1000)]
ogg: fix possible buffer overrun

If an ogg stream does not match our expectations of how the end of a
buffer may be structured, it was possible to read memory past the end of
the buffer parsed by libogg.  Include a bounds check for this case and
stop parsing.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3930

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

2 years agortpbasepayload: fix transfer annotation for push and push_list
Mathieu Duponchelle [Thu, 7 Apr 2022 23:52:32 +0000 (01:52 +0200)]
rtpbasepayload: fix transfer annotation for push and push_list

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

2 years agogst: remove custom logger for critical/warnings/fatals
Matthew Waters [Fri, 8 Apr 2022 03:44:53 +0000 (13:44 +1000)]
gst: remove custom logger for critical/warnings/fatals

It's not really needed anymore (only calls out to
g_log_default_handler() and interferes with applications using
g_log_set_default_handler().

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

2 years agoriff-media: fix memory leak after usage for g_strjoin
hoonhee.lee [Thu, 7 Apr 2022 01:08:37 +0000 (10:08 +0900)]
riff-media: fix memory leak after usage for g_strjoin

This leak is observed with valgrind.

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

2 years agoh265parser: Fix short_term_ref_pic_set() size calculation
Seungha Yang [Fri, 11 Mar 2022 11:46:11 +0000 (20:46 +0900)]
h265parser: Fix short_term_ref_pic_set() size calculation

This field is used by DXVA/NVDEC/VA, and each specification
describes (NVDEC is not well documented) that it's the number of
bits used in short_term_ref_pic_set().

DXVA doesn't explicitly mention that whether the size of
emulation preventation bytes (EPB) is inclusive or not, but
VA is clearly specifying that it's the size after removing
EPB. Excluding EPB size here makes more sense therefore.

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

2 years agobuild/fuzzing: integrate fuzz targets into the build system
Matthew Waters [Wed, 6 Apr 2022 09:22:44 +0000 (19:22 +1000)]
build/fuzzing: integrate fuzz targets into the build system

Currently disabled but may be enabled later.

Updates the existing fuzzing to use shared libraries as that's easier
for meson to deal with if there is a mix of static and shared libraries
on the system.

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

2 years agomeson: add the list of tools to summary
Stéphane Cerveau [Thu, 31 Mar 2022 09:45:13 +0000 (11:45 +0200)]
meson: add the list of tools to summary

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

2 years agogltransformation: let graphene alloc its structures memory aligned
Bastian Krause [Wed, 6 Apr 2022 16:08:46 +0000 (18:08 +0200)]
gltransformation: let graphene alloc its structures memory aligned

With NEON instructions enabled, graphene expects the memory passed to it
16-byte-aligned. Otherwise unaligned memory access faults occur causing
SIGBUS signals.

graphene has alloc functions for its structures that take care of this,
so use them.

See also: https://github.com/ebassi/graphene/issues/215#issuecomment-794744829

Suggested-by: Sebastian Dröge <sebastian@centricular.com>
Signed-off-by: Bastian Krause <bst@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1321>

2 years agoqmlglsrc: Fix deadlock when stopping
Matthias Fuchs [Fri, 11 Mar 2022 14:13:21 +0000 (15:13 +0100)]
qmlglsrc: Fix deadlock when stopping

This fix makes sure that streaming thread stops waiting when the
qmlglsrc element transitions from playing to paused.

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

2 years agomxfvanc: Handle empty VANC packets
Edward Hervey [Wed, 6 Apr 2022 09:21:25 +0000 (11:21 +0200)]
mxfvanc: Handle empty VANC packets

Some XDCAM recorders store empty packets for VANC, and don't even include the
2byte length.

Handle them in the same way as VANC packets with 0 packets.

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

2 years agoqmlglsrc: Fix missing depth & stencil buffer
Matthias Fuchs [Mon, 14 Mar 2022 16:20:38 +0000 (17:20 +0100)]
qmlglsrc: Fix missing depth & stencil buffer

Qt Quick primitives which have some kind of alpha blending
(transparency, rounded corners) are z-sorted by Qt and rendered in the
correct order. For opaque primitives Qt relies on the OpenGL depth
buffer to correctly determine the visibility of stacked elements.

This change enables the depth buffer to make sure that opaque primitives
are correctly z-stacked.

https://doc.qt.io/qt-6/qtquick-visualcanvas-scenegraph-renderer.html#opaque-primitives

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

2 years agodocs: design: negotiation: Fix indentation in pseudo-code
Fuga Kato [Wed, 6 Apr 2022 06:45:44 +0000 (06:45 +0000)]
docs: design: negotiation: Fix indentation in pseudo-code

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

2 years agortpstats: Remove non-existing twcc field docs from RTPPacketInfo and add missing...
Sebastian Dröge [Wed, 6 Apr 2022 07:14:19 +0000 (10:14 +0300)]
rtpstats: Remove non-existing twcc field docs from RTPPacketInfo and add missing field docs

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

2 years agortpsession: Remove unused twcc fields from the struct
Sebastian Dröge [Tue, 5 Apr 2022 17:28:36 +0000 (20:28 +0300)]
rtpsession: Remove unused twcc fields from the struct

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

2 years agogst-libav: fix build on systems without C++ compiler
Fabrice Fontaine [Mon, 4 Apr 2022 21:32:56 +0000 (23:32 +0200)]
gst-libav: fix build on systems without C++ compiler

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

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

Fixes:
 - http://autobuild.buildroot.org/results/8ac0ba5eaaf7571857b4d8cfabf1488d640dc59a

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

2 years agoappsrc: Clarify buffer ref semantics in signals
Nirbheek Chauhan [Mon, 4 Apr 2022 05:16:24 +0000 (10:46 +0530)]
appsrc: Clarify buffer ref semantics in signals

The documentation could be read to mean that the caller continuous to
'own' the buffer, and that there is some other mechanism to find out
when to unref it.

Clarify that "not taking ownership" here means "taking a reference",
and specify that you can unref it at any time after calling the
function.

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

2 years agocsharp: check format in the pre-commit hook
Andoni Morales Alastruey [Wed, 23 Mar 2022 20:46:23 +0000 (21:46 +0100)]
csharp: check format in the pre-commit hook

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

2 years agogstreamer-sharp: apply new code style to alll sources
Andoni Morales Alastruey [Thu, 30 Sep 2021 11:02:26 +0000 (13:02 +0200)]
gstreamer-sharp: apply new code style to alll sources

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

2 years agogstreamer-sharp: ensure a consitent code format
Andoni Morales Alastruey [Thu, 30 Sep 2021 11:01:26 +0000 (13:01 +0200)]
gstreamer-sharp: ensure a consitent code format

Use EditorConfig and dotnet-format to ensure a consistent
code style.

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

2 years agowebrtc/datachannel: Change initial data channel state to CONNECTING
Sangchul Lee [Fri, 1 Apr 2022 13:52:18 +0000 (22:52 +0900)]
webrtc/datachannel: Change initial data channel state to CONNECTING

It complies with http://w3c.github.io/webrtc-pc/#dom-rtcdatachannelstate.

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

2 years agoqsvencoder: Don't use USAGE_HINT_ENCODER and enable derived image support
Seungha Yang [Mon, 4 Apr 2022 11:47:03 +0000 (20:47 +0900)]
qsvencoder: Don't use USAGE_HINT_ENCODER and enable derived image support

Peformance issue by disabled derived image support was reported

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

2 years agoRevert "vah264enc: Disable derived image support"
Seungha Yang [Mon, 4 Apr 2022 11:36:14 +0000 (20:36 +0900)]
Revert "vah264enc: Disable derived image support"

This reverts commit 0011feb0d660f331abde5b1e36f1c56e9cf3b014.

The commit caused performance-wise regression for some platforms

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

2 years agomsdk: use mfxU32 instead of uint32_t
Tong Wu [Fri, 1 Apr 2022 07:35:17 +0000 (15:35 +0800)]
msdk: use mfxU32 instead of uint32_t

Msdk should use mfx variables defined in mfxdefs.h. Replace uint32_t
with mfxU32.

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

2 years agogst-examples: add -xobjective-c for darwin
Stéphane Cerveau [Mon, 4 Apr 2022 08:12:20 +0000 (10:12 +0200)]
gst-examples: add -xobjective-c for darwin

To avoid error when including #include <AppKit/AppKit.h>
the  build should include the c args xobjective-c

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

2 years agobad: examples: fix unused res warning
Stéphane Cerveau [Fri, 1 Apr 2022 13:00:01 +0000 (15:00 +0200)]
bad: examples: fix unused res warning

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

2 years agoexamples: fix build on macOS with gtk+-quartz-3.0
Zhao Zhili [Thu, 21 Jan 2021 08:01:38 +0000 (16:01 +0800)]
examples: fix build on macOS with gtk+-quartz-3.0

gdk_quartz_window_get_nsview is not declared in the header file now:
error: implicit declaration of function 'gdk_quartz_window_get_nsview'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]

fixes #979

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

2 years agoximagesink/xvimagesink: use GST_XINITTHREADS to ensure call to XInitThreads
Haihua Hu [Fri, 1 Apr 2022 13:47:59 +0000 (21:47 +0800)]
ximagesink/xvimagesink: use GST_XINITTHREADS to ensure call to XInitThreads

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

2 years agowebrtc: Improve robustness of nice agent signal handlers
Johan Sternerup [Tue, 29 Mar 2022 12:42:04 +0000 (14:42 +0200)]
webrtc: Improve robustness of nice agent signal handlers

NiceAgent and it's associated thread is alive for as long as
GstWebRTCICE is alive so make sure any signal handlers connected to
NiceAgent do not access data that is deleted earlier.

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

2 years agonvcodec: Fix typos
Seungha Yang [Sun, 3 Apr 2022 13:12:33 +0000 (22:12 +0900)]
nvcodec: Fix typos

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