platform/upstream/gstreamer.git
3 years agoadaptivedemux: Don't calculate bitrate for header/index fragments
Edward Hervey [Tue, 10 Nov 2020 13:48:28 +0000 (14:48 +0100)]
adaptivedemux: Don't calculate bitrate for header/index fragments

They are generally substantially smaller than regular fragments, and therefore
we end up pushing totally wrong bitrates downstream.

Fixes erratic buffering issues with DASH introduced by
66f5e874352016e29f555e3ce693b23474e476db

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

3 years agohlsdemux: Don't double-free variant streams on errors
Edward Hervey [Wed, 11 Nov 2020 17:07:57 +0000 (18:07 +0100)]
hlsdemux: Don't double-free variant streams on errors

If an error happened switching to a new variant, we switch back to the previous
one ... except it will be unreffed when settin git.

In order to avoid such issues, keep a reference to the old variant until we're
sure we don't need it anymore

Fixes cases of double-free on variants and its contents

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

3 years agocodecs: vp8decoder: Fix two typo of struct name.
He Junyan [Wed, 11 Nov 2020 16:42:59 +0000 (00:42 +0800)]
codecs: vp8decoder: Fix two typo of struct name.

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

3 years agogsta2dpsink: Fix GstPad leak
Sanchayan Maity [Tue, 27 Oct 2020 14:23:44 +0000 (19:53 +0530)]
gsta2dpsink: Fix GstPad leak

The sinkpad returned by a call to gst_element_get_static_pad needs to be
unrefed.

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

3 years agobluez: a2dpsink: Add support for LDAC to a2dpsink
Arun Raghavan [Wed, 30 Sep 2020 11:42:04 +0000 (17:12 +0530)]
bluez: a2dpsink: Add support for LDAC to a2dpsink

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

3 years agobluez: avdtpsink: Add support for LDAC to avdtpsink
Arun Raghavan [Wed, 30 Sep 2020 07:58:08 +0000 (13:28 +0530)]
bluez: avdtpsink: Add support for LDAC to avdtpsink

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

3 years agoext: Add LDAC encoder
Sanchayan Maity [Fri, 18 Sep 2020 12:05:24 +0000 (17:35 +0530)]
ext: Add LDAC encoder

LDAC is an audio coding technology developed by Sony that enables the
transmission of High-Resolution (Hi-Res) audio contents over Bluetooth.

Currently Adaptive Bit Rate (ABR) as supported by libldac encoder is not
implemented.

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

3 years agompegdemux: Set duration on seeking query if possible
Seungha Yang [Wed, 11 Nov 2020 09:21:25 +0000 (18:21 +0900)]
mpegdemux: Set duration on seeking query if possible

Set duration on seeking query in the same way as duration query handler.
Otherwise application might get confused as if the duration is unknown.

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

3 years agowebrtc: Update libnice version requirement to 0.1.17
Raul Tambre [Wed, 11 Nov 2020 11:39:37 +0000 (13:39 +0200)]
webrtc: Update libnice version requirement to 0.1.17

Since !1366 nice_agent_get_sockets() is used, which requires 0.1.17.
Update the version requirement accordingly.

Fixes #1459.

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

3 years agohlsdemux: Re-use streams if possible
Edward Hervey [Tue, 3 Nov 2020 16:48:02 +0000 (17:48 +0100)]
hlsdemux: Re-use streams if possible

When switching variants, try to re-use existing streams/pads instead of creating
new ones. When dealing with urisourcebin and decodebin3 this is not only the
expected way but also avoids a lot of buffering/hang issues.

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

3 years agom3u8: Make a debug function usable elsewhere
Edward Hervey [Wed, 4 Nov 2020 09:36:21 +0000 (10:36 +0100)]
m3u8: Make a debug function usable elsewhere

The rest of the code might want to use this

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

3 years agoqroverlay: Generate documentation
Thibault Saunier [Sun, 12 Jul 2020 04:18:38 +0000 (00:18 -0400)]
qroverlay: Generate documentation

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

3 years agoqroverlay: Add a qroverlay element that allows overlaying any data
Thibault Saunier [Sun, 12 Jul 2020 04:03:04 +0000 (00:03 -0400)]
qroverlay: Add a qroverlay element that allows overlaying any data

This moves `gstqroverlay.c` to `gstdebugqroverlay.c` and implements
a simple `gstqroverlay` element.

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

3 years agoqroverlay: Rename qroverlay to debugqroverlay
Thibault Saunier [Sun, 12 Jul 2020 03:43:01 +0000 (23:43 -0400)]
qroverlay: Rename qroverlay to debugqroverlay

The element is specially focus on debugging purposes and not a generique QR overlay

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

3 years agoqroverlay: Factor out qroverlay logic to a base class
Thibault Saunier [Sun, 12 Jul 2020 03:36:03 +0000 (23:36 -0400)]
qroverlay: Factor out qroverlay logic to a base class

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

3 years agoqroverlay: Factor out qroverlay logic to a base class
Thibault Saunier [Sun, 12 Jul 2020 03:35:55 +0000 (23:35 -0400)]
qroverlay: Factor out qroverlay logic to a base class

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

3 years agoqroverlay: Make subclassable
Thibault Saunier [Sun, 12 Jul 2020 03:06:16 +0000 (23:06 -0400)]
qroverlay: Make subclassable

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

3 years agoqroverlay: Port to VideoFilter
Thibault Saunier [Sun, 12 Jul 2020 00:42:51 +0000 (20:42 -0400)]
qroverlay: Port to VideoFilter

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

3 years agoqroverlay: Make default pizel-size 3
Thibault Saunier [Sat, 11 Jul 2020 19:04:57 +0000 (15:04 -0400)]
qroverlay: Make default pizel-size 3

Otherwise zbar isn't able to read the produced qrcodes

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

3 years agoqroverlay: Cleanup the way we build the json using json-glib
Thibault Saunier [Thu, 9 Jul 2020 18:14:45 +0000 (14:14 -0400)]
qroverlay: Cleanup the way we build the json using json-glib

And reindent the .h file removing tabs

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

3 years agoqroverlay: Fix copyright
Thibault Saunier [Thu, 9 Jul 2020 17:05:20 +0000 (13:05 -0400)]
qroverlay: Fix copyright

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

3 years agoqroverlay: Fix some warnings
Thibault Saunier [Thu, 9 Jul 2020 16:51:23 +0000 (12:51 -0400)]
qroverlay: Fix some warnings

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

3 years agoqroverlay: Minor renaming and documentation fixes
Thibault Saunier [Thu, 9 Jul 2020 16:49:51 +0000 (12:49 -0400)]
qroverlay: Minor renaming and documentation fixes

Matching usual namings

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

3 years agoqroverlay: Import from gst-qroverlay
Thibault Saunier [Thu, 9 Jul 2020 16:37:55 +0000 (12:37 -0400)]
qroverlay: Import from gst-qroverlay

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

3 years agonvcodec: Add VP9 stateless decoder element
Seungha Yang [Fri, 30 Oct 2020 14:22:01 +0000 (23:22 +0900)]
nvcodec: Add VP9 stateless decoder element

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

3 years agonvcodec: nvdecoder: Move to refcount based GstNvDecoderFrame
Seungha Yang [Fri, 30 Oct 2020 12:20:57 +0000 (21:20 +0900)]
nvcodec: nvdecoder: Move to refcount based GstNvDecoderFrame

This refcount based way would be helpful for sharing nvdec frame among
multiple codec pictures and later zero-copy use case.

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

3 years agonvcodec: nvdecoder: Get rid of G_GNUC_INTERNAL
Seungha Yang [Fri, 30 Oct 2020 14:38:15 +0000 (23:38 +0900)]
nvcodec: nvdecoder: Get rid of G_GNUC_INTERNAL

default is visibility=hidden. Don't need to use G_GNUC_INTERNAL
for new code therefore.

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

3 years agonvcodec: Add VP8 stateless decoder element
Seungha Yang [Fri, 30 Oct 2020 11:37:44 +0000 (20:37 +0900)]
nvcodec: Add VP8 stateless decoder element

Like other nvcodec stateless decoders, the rank of this new nvvp8sldec
element will be secondary for now.

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

3 years agonvcodec: nvsldec: Fix typo in debug message
Seungha Yang [Fri, 30 Oct 2020 14:26:49 +0000 (23:26 +0900)]
nvcodec: nvsldec: Fix typo in debug message

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

3 years agompegtspacketizer: Handle PCR issues with adaptive streams
Edward Hervey [Mon, 9 Nov 2020 17:27:14 +0000 (18:27 +0100)]
mpegtspacketizer: Handle PCR issues with adaptive streams

A lot of content producers out there targetting "adaptive streaming" are riddled
with non-compliant PCR streams (essentially all the players out there just use
PTS/DTS and don't care about the PCR).

In order to gracefully cope with these, we detect them appropriately and any
small (< 15s) PCR resets get gracefully ignored.

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

3 years agonvcodec: leave g_once_init when all quarks are initialized
Julian Bouzas [Fri, 30 Oct 2020 14:07:02 +0000 (14:07 +0000)]
nvcodec: leave g_once_init when all quarks are initialized

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

3 years agocodecs: h264decoder: Fix missing drain handling in bumping
Seungha Yang [Mon, 9 Nov 2020 14:22:09 +0000 (23:22 +0900)]
codecs: h264decoder: Fix missing drain handling in bumping

Should've included in the commit 5527cc4a2e7ce8eeee1d8a717f99252477d6015f

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

3 years agocodecs: h264decoder: Try reference picture marking process in any case
Seungha Yang [Mon, 9 Nov 2020 14:04:32 +0000 (23:04 +0900)]
codecs: h264decoder: Try reference picture marking process in any case

... even if there is some invalid conditions
(because of broken stream, our implementation fault or so).
Otherwise baseclass will keep such reference pictures and
it would result to DPB full.

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

3 years agoexamples: Properly handle extended descriptors
Edward Hervey [Mon, 9 Nov 2020 10:44:36 +0000 (11:44 +0100)]
examples: Properly handle extended descriptors

By checking the extended tag. Provides a bit more information (if extended tag
is known)

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

3 years agod3d11h264dec: Fix for MbaffFrameFlag and FrameNumList
Seungha Yang [Sun, 8 Nov 2020 10:08:25 +0000 (19:08 +0900)]
d3d11h264dec: Fix for MbaffFrameFlag and FrameNumList

As per spec 7.4.3 Slice header semantics, the flag value is derived as
MbaffFrameFlag = (mb_adaptive_frame_field_flag && !field_pic_flag)
and DXVA uses the value.
Regarding FrameNumList, in case of long-term ref, FrameNumList[i]
value should be long_term_frame_idx not long_term_pic_num.

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

3 years agocodecs: h264decoder: Reset frame number per MMCO type 5
Seungha Yang [Thu, 5 Nov 2020 10:30:35 +0000 (19:30 +0900)]
codecs: h264decoder: Reset frame number per MMCO type 5

It should be cleared so that avoid wrong frame gap detection
for following pictures.

Passing 4 more conformance bitstream tests
* MR2_TANDBERG_E
* MR3_TANDBERG_B
* MR4_TANDBERG_C
* MR5_TANDBERG_C

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

3 years agocodecs: h264decoder: Fix for MMCO type 2
Seungha Yang [Thu, 5 Nov 2020 09:42:37 +0000 (18:42 +0900)]
codecs: h264decoder: Fix for MMCO type 2

As per 8.2.5.4.2, we should mark a picture which has
LongTermPicNum == long_term_pic_num as "unused for reference",
not pic_num.

Passing conformance bitstream test with MR2_MW_A

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

3 years agocodecs: h264picture: Add more trace log
Seungha Yang [Thu, 5 Nov 2020 09:27:11 +0000 (18:27 +0900)]
codecs: h264picture: Add more trace log

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

3 years agodecklink: correct framerate 2KDCI 23.98
Jason Pereira [Thu, 5 Nov 2020 13:30:49 +0000 (13:30 +0000)]
decklink: correct framerate 2KDCI 23.98

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

3 years agodoc: player: mention that get_pipeline method needs unref
Rafostar [Thu, 5 Nov 2020 08:11:03 +0000 (09:11 +0100)]
doc: player: mention that get_pipeline method needs unref

All other methods in docs clearly mention that an unref is needed, so should `get_pipeline()`. #1450

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

3 years agoplayer: call ref_sink on pipeline
Rafostar [Thu, 5 Nov 2020 08:01:47 +0000 (09:01 +0100)]
player: call ref_sink on pipeline

Otherwise `gst_player_get_pipeline()` will return a floating reference which may confuse bindings and lead to crash.

Fixes #1450

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

3 years agomeson: Enable some MSVC warnings for parity with GCC/Clang
Nirbheek Chauhan [Wed, 4 Nov 2020 13:13:41 +0000 (18:43 +0530)]
meson: Enable some MSVC warnings for parity with GCC/Clang

This makes it easier to do development with MSVC by making it warn
on common issues that GCC/Clang error out for in our CI configuration.

Continuation from https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/223

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

3 years agova: Add HEVC decoding support
Nicolas Dufresne [Wed, 21 Oct 2020 13:01:31 +0000 (09:01 -0400)]
va: Add HEVC decoding support

This add HEVC decoding support into the new VA plugin. This implementation has
been tested using the ITU comformance test (through fluster). It fails all
MAIN10 tests, as this is not implemented yet along with the following:

CONFWIN_A_Sony_1 (looks fine, but md5sum is incorrect)
PICSIZE_A_Bossen_1 (height too high)
PICSIZE_B_Bossen_1 (same)
VPSSPSPPS_A_MainConcept_1 (parser issue)

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

3 years agoh265parser: Fix wrong warning message
Nicolas Dufresne [Tue, 3 Nov 2020 21:05:48 +0000 (16:05 -0500)]
h265parser: Fix wrong warning message

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

3 years agoh265decoder: Remove unsued WpOffsetHalfRangeC
Nicolas Dufresne [Tue, 3 Nov 2020 16:23:15 +0000 (11:23 -0500)]
h265decoder: Remove unsued WpOffsetHalfRangeC

This is only needed for VA implementation of weight tables and isn't used
within the base class.

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

3 years agocodecs: h264decoder: Rework for DPB management
Seungha Yang [Sun, 1 Nov 2020 15:08:04 +0000 (00:08 +0900)]
codecs: h264decoder: Rework for DPB management

Sync with recent h265decoder DPB implementation.

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

4 years agocodecs: h264decoder: Remove unused pts variable
Seungha Yang [Wed, 4 Nov 2020 09:47:30 +0000 (18:47 +0900)]
codecs: h264decoder: Remove unused pts variable

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

4 years agoaiffparse: Also set a channel mask for 2 channels
youngh.lee [Tue, 3 Nov 2020 05:12:45 +0000 (14:12 +0900)]
aiffparse: Also set a channel mask for 2 channels

And only do add debug output at FIXME level when using the fallback
channel mask, not for those defined in the AIFF spec.

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

4 years agowebrtc: Add properties to change the socket buffer sizes to ice object
Olivier Crête [Tue, 23 Jun 2020 14:29:42 +0000 (10:29 -0400)]
webrtc: Add properties to change the socket buffer sizes to ice object

libnice doesn't touch the kernel buffer sizes. When dealing with RTP data,
it's generally advisable to increase them to avoid dropping packets locally.
This is especially important when running multiple higher bitrate streams at
the same time.

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

4 years agovkdeviceprovider: Avoid deadlock on physical device
Jan Schmidt [Mon, 2 Nov 2020 15:22:23 +0000 (02:22 +1100)]
vkdeviceprovider: Avoid deadlock on physical device

Don't hold the object lock on the vk physical device while
constructing a GstVulkanDevice around it, as
GstVulkanDevice can make calls on the physical device that
require the object lock.

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

4 years agocodecs: h265picture: Minor update for coding style
Seungha Yang [Mon, 2 Nov 2020 17:14:21 +0000 (02:14 +0900)]
codecs: h265picture: Minor update for coding style

It's GstH265Dpb, not GstH265Decoder

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

4 years agocodecs: h265decoder: Make GstVideoCodecFrame hold the last reference of the buffer
Seungha Yang [Mon, 2 Nov 2020 16:53:15 +0000 (01:53 +0900)]
codecs: h265decoder: Make GstVideoCodecFrame hold the last reference of the buffer

The functionality of passing the last reference of GstH265Picture
was silently dropped by the commit eeffd91109a409063e866337452eedd392649775
This commit will make it work again.

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

4 years agocodecs: h265decoder: Clear GstVideoCodecFrame on DPB clear if needed
Seungha Yang [Mon, 2 Nov 2020 16:41:13 +0000 (01:41 +0900)]
codecs: h265decoder: Clear GstVideoCodecFrame on DPB clear if needed

h265decoder might need to clear DPB depending on context even if
it's not flushing case. So associated GstVideoCodecFrame needs to be
released in case non-flushing case.

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

4 years agocodecs: h265decoder: Don't drain DPB on EOB/EOS/IDR nalu
Seungha Yang [Mon, 2 Nov 2020 15:57:46 +0000 (00:57 +0900)]
codecs: h265decoder: Don't drain DPB on EOB/EOS/IDR nalu

DPB bumping decision per end-of-bitstream, end-of-sequence or IDR nal
should done by spec. In short, draining on EOB/EOS/IDR is undefined
behavior as per spec.

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

4 years agoh265decoder: Complete dependent slice header
Nicolas Dufresne [Sun, 1 Nov 2020 23:32:56 +0000 (18:32 -0500)]
h265decoder: Complete dependent slice header

This will save the last independent slice and fill in the missing
information for dependent slices. This was left over during the porting
from gstreamer-vaapi. The private variable prev_independent_slice was
already there.

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

4 years agoh265decoder: Prevent possible infinite loop
Nicolas Dufresne [Sun, 1 Nov 2020 23:30:34 +0000 (18:30 -0500)]
h265decoder: Prevent possible infinite loop

Theoretically, one could produce a broken stream that would lead to
infinite in the specified algorithm to calculate l0/l1 reference lists.
This patch will pearly exit if this condition is met.

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

4 years agoh265parse: Add missing const qualifier
Nicolas Dufresne [Thu, 22 Oct 2020 16:38:11 +0000 (12:38 -0400)]
h265parse: Add missing const qualifier

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

4 years agoRevert "d3d11decoder: Use D3D11/DXGI standard colorimetry"
Seungha Yang [Mon, 2 Nov 2020 13:47:20 +0000 (22:47 +0900)]
Revert "d3d11decoder: Use D3D11/DXGI standard colorimetry"

This reverts commit a52fc6deeda203add520cb59ae0026d109ecda95.

The change breaks H264/HEVC conformance bitstream tests

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

4 years agowlvideoformat: fix DMA format convertor
Randy Li [Mon, 2 Nov 2020 08:46:25 +0000 (08:46 +0000)]
wlvideoformat: fix DMA format convertor

In the most of case, this typo would work. But for
ARGB8888 and XRGB8888, which shm format is not based on fourcc,
which would never appear in format enumeration.

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

4 years agod3d11decoder: Use D3D11/DXGI standard colorimetry
Seungha Yang [Sat, 31 Oct 2020 18:58:30 +0000 (03:58 +0900)]
d3d11decoder: Use D3D11/DXGI standard colorimetry

D3D11/DXGI supports smaller set of colorimetry than all possible
combination. This restriction would make more streams convertible
by using ID3D11VideoProcessor

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

4 years agod3d11window: Use ID3D11VideoProcessor only if device supports corresponding conversion
Seungha Yang [Fri, 30 Oct 2020 18:28:55 +0000 (03:28 +0900)]
d3d11window: Use ID3D11VideoProcessor only if device supports corresponding conversion

... and drop support for ID3D11VideoProcessor if device doesn't
support ID3D11VideoContext1 interface and therefore we cannot
query conversion supportability.

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

4 years agod3d11h{264,265}dec: Submit picture level parameters only once
Seungha Yang [Sun, 1 Nov 2020 11:52:11 +0000 (20:52 +0900)]
d3d11h{264,265}dec: Submit picture level parameters only once

Submit PICTURE_PARAMETERS and INVERSE_QUANTIZATION_MATRIX
buffers only once per picture. Multiple submission is redundant.
Also this modification would fix broken hevc decoding with
dependent slice.

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

4 years agocodecs: h265decocer: Rework for DPB management
Seungha Yang [Sat, 31 Oct 2020 11:36:13 +0000 (20:36 +0900)]
codecs: h265decocer: Rework for DPB management

* Move all DPB bumping process into GstH265Dpb internal
* Handle DPB add process in GstH265Dpb struct
* Make implementation to be 1:1 mappable with hevc specification
* Fix wrong DPB bumping implementation especially when no_output_of_prior_pics_flag
  was specified.

With fixes from Nicolas Dufresne <nicolas.dufresne@collabora.com>

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

4 years agod3d11decoder: Get rid of framerate field from pad template
Seungha Yang [Sat, 31 Oct 2020 11:31:51 +0000 (20:31 +0900)]
d3d11decoder: Get rid of framerate field from pad template

Framerate is optional value and we don't have any framerate
related restriction for those elements. This commit is to fix
negotiation failure when upstream doesn't set framerate on caps.

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

4 years agotests: Don't set dtlsenc state before linking.
Jan Schmidt [Sat, 31 Oct 2020 10:46:16 +0000 (21:46 +1100)]
tests: Don't set dtlsenc state before linking.

Link the dtlsenc in the testsuite before setting it to paused, as it
starts a pad task that can generate a not-linked error otherwise.

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

4 years agodtls: Catch bus errors and fail instead of hanging.
Jan Schmidt [Fri, 30 Oct 2020 14:23:36 +0000 (01:23 +1100)]
dtls: Catch bus errors and fail instead of hanging.

If the DTLS elements fail, they post a bus error and don't signal any
key negotiation. Catch the bus error and fail the test early instead
of letting it hang and time out.

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

4 years agosctp: Do downward state change logic after chaining up.
Jan Schmidt [Fri, 30 Oct 2020 11:52:18 +0000 (22:52 +1100)]
sctp: Do downward state change logic after chaining up.

Call the parent state_change function first when changing state
downward, to make sure that the element has stopped before cleaning
it up.

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

4 years agodtls: Avoid bio_buffer assertion on shutdown.
Jan Schmidt [Fri, 30 Oct 2020 11:49:22 +0000 (22:49 +1100)]
dtls: Avoid bio_buffer assertion on shutdown.

On shutdown, a previous iteration of dtsl_connection_process()
might be incomplete and leave a partial bio_buffer behind.

If the DTLS connection is already marked closed, drop out
of dtls_connection_process early without asserting.

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

4 years agowebrtc: Fix a race on shutdown.
Jan Schmidt [Fri, 30 Oct 2020 05:31:18 +0000 (16:31 +1100)]
webrtc: Fix a race on shutdown.

The main context can disappear in gst_webrtc_bin_enqueue_task()
between checking the is_closed flag and enqueueing a source on the
main context. Protect the main context with the object lock instead
of the PC lock, and hold a ref briefly to make sure it stays alive.

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

4 years agowebrtc: Set the DSCP markings based on the priority
Olivier Crête [Wed, 8 Jul 2020 21:24:36 +0000 (17:24 -0400)]
webrtc: Set the DSCP markings based on the priority

This matches how the WebRTC javascript API works and the Chrome implementation.

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

4 years agortpsender: Add API to set the priority
Olivier Crête [Thu, 9 Jul 2020 17:39:03 +0000 (13:39 -0400)]
rtpsender: Add API to set the priority

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

4 years agortptransceiver: Store the SSRC of the current stream
Olivier Crête [Thu, 9 Jul 2020 17:42:35 +0000 (13:42 -0400)]
rtptransceiver: Store the SSRC of the current stream

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

4 years agowebrtc: Save the media kind in the transceiver
Olivier Crête [Wed, 8 Jul 2020 23:13:33 +0000 (19:13 -0400)]
webrtc: Save the media kind in the transceiver

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

4 years agowebrtcbin: Remove unused function
Olivier Crête [Thu, 9 Jul 2020 17:45:20 +0000 (13:45 -0400)]
webrtcbin: Remove unused function

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

4 years agowebrtc: Document more objects
Olivier Crête [Sat, 3 Oct 2020 01:38:00 +0000 (21:38 -0400)]
webrtc: Document more objects

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

4 years agod3d11decoder: Allow 10bits only profiles
Seungha Yang [Fri, 30 Oct 2020 15:37:48 +0000 (00:37 +0900)]
d3d11decoder: Allow 10bits only profiles

HEVC_VLD_Main10 and VP9_VLD_10bit_Profile2 might not support
8bit format (i.e., NV12) depending on GPU vendor.

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

4 years agodecklink: Remove \n from debug output
Sebastian Dröge [Sun, 25 Oct 2020 11:33:21 +0000 (13:33 +0200)]
decklink: Remove \n from debug output

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

4 years agodecklink: Correctly indent everything
Sebastian Dröge [Sun, 25 Oct 2020 11:32:26 +0000 (13:32 +0200)]
decklink: Correctly indent everything

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

4 years agodecklink: Add a default profile id
Sebastian Dröge [Sun, 25 Oct 2020 11:30:55 +0000 (13:30 +0200)]
decklink: Add a default profile id

This causes no changes to the profile but keeps the existing settings.
The profile can also be changed from e.g. the card's configuration
application and in that case probably should be left alone.

The default is the new value as it keeps the profile setting as it is,
which is consistent with the previous behaviour in 1.18.

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

4 years agodecklink: Mark internal function as static
Sebastian Dröge [Sun, 25 Oct 2020 11:14:11 +0000 (13:14 +0200)]
decklink: Mark internal function as static

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

4 years agodecklink: Remove some dead code
Sebastian Dröge [Sun, 25 Oct 2020 11:13:37 +0000 (13:13 +0200)]
decklink: Remove some dead code

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

4 years agodecklink: Update enum value bounds check in gst_decklink_get_mode()
Sebastian Dröge [Fri, 30 Oct 2020 08:02:32 +0000 (10:02 +0200)]
decklink: Update enum value bounds check in gst_decklink_get_mode()

The widescreen modes moved after GST_DECKLINK_MODE_2160p60 and using
them now would cause an assertion. This is a regression from
309f6187fef890c7ffa49305f38e89beac3b1423.

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

4 years agottmlparse: Handle whitespace before XML declaration
Chris Bass [Tue, 25 Aug 2020 13:56:50 +0000 (14:56 +0100)]
ttmlparse: Handle whitespace before XML declaration

When ttmlparse is in, e.g., an MPEG-DASH pipeline, there may be
whitespace between successive TTML documents in ttmlparse's accumulated
input. As libxml2 will fail to parse documents that have whitespace
before the opening XML declaration, ensure that any preceding whitespace
is not passed to libxml2.

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

4 years agottmlparse: Ensure only single TTML doc parsed
Chris Bass [Tue, 25 Aug 2020 13:54:31 +0000 (14:54 +0100)]
ttmlparse: Ensure only single TTML doc parsed

The parser handles only one TTML file at a time, therefore if there are
multiple TTML documets in the input, parse only the first.

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

4 years agoamc: Fix crash when encoding AVC
Xavier Claessens [Thu, 29 Oct 2020 17:43:16 +0000 (13:43 -0400)]
amc: Fix crash when encoding AVC

gstamcvideoenc.c calls gst_amc_avc_profile_to_string() with alternatives
set to NULL which causes a crash.

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

4 years agoisac: add iSAC plugin
Guillaume Desmottes [Thu, 19 Mar 2020 14:07:47 +0000 (15:07 +0100)]
isac: add iSAC plugin

Wrapper on the iSAC reference encoder and decoder from webrtc,
see https://en.wikipedia.org/wiki/Internet_Speech_Audio_Codec

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

4 years agotranscodebin: Create the decodebin in _init
Thibault Saunier [Wed, 28 Oct 2020 14:49:54 +0000 (11:49 -0300)]
transcodebin: Create the decodebin in _init

This way user can request pads right from the beginning

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

4 years agotranscodebin: Accept more than one stream
Philippe Normand [Sun, 25 Oct 2020 18:04:05 +0000 (18:04 +0000)]
transcodebin: Accept more than one stream

Look-up the stream matching the given ID also after building the stream list
from the received collection. Without this change the transcoder would discard
the second incoming stream.

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

4 years agotranscodebin: Port to decodebin3
Thibault Saunier [Fri, 20 Mar 2020 12:27:48 +0000 (09:27 -0300)]
transcodebin: Port to decodebin3

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

4 years agouritranscodebin: Move to using a urisourcebin for our source.
Thibault Saunier [Thu, 19 Mar 2020 12:35:57 +0000 (09:35 -0300)]
uritranscodebin: Move to using a urisourcebin for our source.

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

4 years agotranscoder: Base sync transcoding variant on a GMainLoop
Thibault Saunier [Thu, 19 Mar 2020 12:34:54 +0000 (09:34 -0300)]
transcoder: Base sync transcoding variant on a GMainLoop

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

4 years agowaylandsink: release frame callback when destroyed
Randy Li [Thu, 29 Oct 2020 06:13:05 +0000 (06:13 +0000)]
waylandsink: release frame callback when destroyed

We would use a frame callback from the surface to indicate
that last buffer is rendered, but when we destroy the surface
and that callback is not back yet, it may cause the wayland event
queue crash.

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

4 years agortmp2src: Set buffer timestamp on output buffer
Seungha Yang [Wed, 28 Oct 2020 10:00:43 +0000 (19:00 +0900)]
rtmp2src: Set buffer timestamp on output buffer

This timestamp information would be useful for queue2 element
when calculating time level and also it makes buffering decision
more reliable.

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

4 years agod3d11videoprocessor: Fix wrong input/output supportability check
Seungha Yang [Tue, 27 Oct 2020 15:47:49 +0000 (00:47 +0900)]
d3d11videoprocessor: Fix wrong input/output supportability check

The flag argument of ID3D11VideoProcessorEnumerator::CheckVideoProcessorFormat
method is output value, not input.

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

4 years agonvcodec: nvsldec: Add support for CUDA memory
Seungha Yang [Sat, 24 Oct 2020 17:27:52 +0000 (02:27 +0900)]
nvcodec: nvsldec: Add support for CUDA memory

Add CUDA memory support. Note that zero copying is not supported yet

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

4 years agod3d11memory: Adjust log level for some spammy debug messages
Seungha Yang [Sun, 25 Oct 2020 20:15:33 +0000 (05:15 +0900)]
d3d11memory: Adjust log level for some spammy debug messages

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

4 years agod3d11convert: Use ID3D11VideoProcessor only if device supports colorspace
Seungha Yang [Sun, 25 Oct 2020 20:11:45 +0000 (05:11 +0900)]
d3d11convert: Use ID3D11VideoProcessor only if device supports colorspace

Check whether conversion with given combination of input/output
format and dxgi colorspace is supported or not by driver.
If not, we should use shader.

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

4 years agod3d11videoprocessor: Add a method for device's conversion caps check
Seungha Yang [Sun, 25 Oct 2020 20:09:40 +0000 (05:09 +0900)]
d3d11videoprocessor: Add a method for device's conversion caps check

Add a wrapper method for
ID3D11VideoProcessorEnumerator1::CheckVideoProcessorFormatConversion.

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

4 years agod3d11format: Map more colorimetry with dxgi colorspace
Seungha Yang [Sun, 25 Oct 2020 20:04:55 +0000 (05:04 +0900)]
d3d11format: Map more colorimetry with dxgi colorspace

Map more logically identical set of GstVideoColorimetry formats
with dxgi color space.

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

4 years agova: pool: Set the video_alignment after we get image info.
He Junyan [Sun, 25 Oct 2020 15:13:46 +0000 (23:13 +0800)]
va: pool: Set the video_alignment after we get image info.

The set_format() of the allocator may change the stride of the
alloc_info. We should update the video_align.stride_align based
on it. Or, we get a warning in gst_video_meta_validate_alignment().

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