platform/upstream/gstreamer.git
2 years agokmssink: Remove big endian format inversion
Nicolas Dufresne [Fri, 17 Sep 2021 19:42:25 +0000 (15:42 -0400)]
kmssink: Remove big endian format inversion

This has been a bad interpretation of the DRM docuemntation. The formats are
fixed regardless the CPU, but for some formats, they expressed in the opposite
order as GStreamer. Same change was done in waylandsink 2 years ago.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/commit/b393b650ab9bfb9654fc116163ab331907216d74

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

2 years agokmssink: Add NV61 support
Nicolas Dufresne [Fri, 17 Sep 2021 19:41:41 +0000 (15:41 -0400)]
kmssink: Add NV61 support

This identically handled to NV16, so no reason not to inclue it.

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

2 years agokmssink: Add NV24 support
Nicolas Dufresne [Fri, 17 Sep 2021 19:39:54 +0000 (15:39 -0400)]
kmssink: Add NV24 support

This was tested on RK3566 platform, using vendor DRM driver.

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

2 years agocodecs: av1decoder: Use GstFlowReturn everywhere
Seungha Yang [Fri, 17 Sep 2021 15:33:12 +0000 (00:33 +0900)]
codecs: av1decoder: Use GstFlowReturn everywhere

The same modification as that of VP8 decoder

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

2 years agocodecs: vp9decoder: Use GstFlowReturn everywhere
Seungha Yang [Fri, 17 Sep 2021 15:09:24 +0000 (00:09 +0900)]
codecs: vp9decoder: Use GstFlowReturn everywhere

The same modification as that of VP8 decoder

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

2 years agocodecs: vp8decoder: Use GstFlowReturn everywhere
Seungha Yang [Fri, 17 Sep 2021 14:23:06 +0000 (23:23 +0900)]
codecs: vp8decoder: Use GstFlowReturn everywhere

boolean return value is not sufficient for representing the reason
of error in most cases. For instance, any errors around new_sequence()
would mean negotiation error, not just *ERROR*.
And some subclasses will allocate buffer/memory/surface on new_picture()
but it could be failed because of expected error, likely flushing

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

2 years agompegtspacketizer: memcmp potentially seen_before data
Vivia Nikolaidou [Mon, 16 Aug 2021 15:15:42 +0000 (18:15 +0300)]
mpegtspacketizer: memcmp potentially seen_before data

Theoretically the version number is incremented every time there's a new
section, but in a world of streaming we can't easily make that
assumption.

An example of a broken use case is when we're cat-ing two mpeg-ts files
together, which is equivalent of capturing a DVB stream while switching
channels. A set-top box would know that we switched the channels and
reset the demuxer, but in practice this might not happen.

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

2 years agoplayer: Fix/add various annotations
Sebastian Dröge [Mon, 20 Sep 2021 08:35:51 +0000 (11:35 +0300)]
player: Fix/add various annotations

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

2 years agomeson: va: Make AV1 support always optional
Seungha Yang [Sat, 18 Sep 2021 09:07:43 +0000 (18:07 +0900)]
meson: va: Make AV1 support always optional

Otherwise meson configure with -Dva=enabled will be failed
when installed libva version is < 1.8

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

2 years agova: caps: Don't use image formats for decoded frames.
Víctor Manuel Jáquez Leal [Sat, 18 Sep 2021 09:03:16 +0000 (11:03 +0200)]
va: caps: Don't use image formats for decoded frames.

Initially we tried to use the internal color conversion used in i965
and Gallium drivers when decoding. But this approach has showed
limitations and problems.

This patch removes completely the possible color conversion at
decoding, since it show problems with deinterlacing, for example:

gst-launch-1.0 filesrc location=interlaced.mpg2 ! parsebin ! vampeg2dec ! vadeinterlace ! xvimagesink

Allowing only the surface formats when decoding is more stable.

For color conversion is better to do it explicitly with vapostproc.

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

2 years agoplayer: Add missing nullable annotations
Marijn Suijten [Tue, 27 Apr 2021 09:59:15 +0000 (11:59 +0200)]
player: Add missing nullable annotations

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

2 years agoplay: Add missing nullable annotations
Marijn Suijten [Tue, 27 Apr 2021 09:58:58 +0000 (11:58 +0200)]
play: Add missing nullable annotations

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

2 years agosys: shm: Define shm_enable and shm_deps before escape meson subdir
Fabian Orccon [Sat, 18 Sep 2021 12:29:25 +0000 (14:29 +0200)]
sys: shm: Define shm_enable and shm_deps before escape meson subdir

Fixes meson configure in tests if the shm plugin is disabled

Fixes #1664

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

2 years agod3d11videosink: Display title of content if possible
Seungha Yang [Fri, 17 Sep 2021 17:27:51 +0000 (02:27 +0900)]
d3d11videosink: Display title of content if possible

Update title text of window (currently it's always "Direct3D11 renderer")
when we are rendering on internal HWND, not external HWND.

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

2 years agod3d11videosink: Remove unused enum value
Seungha Yang [Fri, 17 Sep 2021 16:32:11 +0000 (01:32 +0900)]
d3d11videosink: Remove unused enum value

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

2 years agomsdkenc: Pass color properties to MediaSDK for encoding
Mengkejiergeli Ba [Wed, 15 Sep 2021 05:59:17 +0000 (13:59 +0800)]
msdkenc: Pass color properties to MediaSDK for encoding

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

2 years agomsdkh265enc: Add profile main10 still picture for hevc
Mengkejiergeli Ba [Wed, 15 Sep 2021 08:32:02 +0000 (16:32 +0800)]
msdkh265enc: Add profile main10 still picture for hevc

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

2 years agowaylandsink: Fix double render check
Nicolas Dufresne [Thu, 16 Sep 2021 21:12:58 +0000 (17:12 -0400)]
waylandsink: Fix double render check

Our code does not support rendering twice the same wl_buffer in a row, so it
tries to skip that case, but for this it relied on the GstBuffer pointer,
while the cache actually works at the GstMemory level now. To avoid this
compare the GstWlBuffer instead.

This fixes crash when use in zero-copy with videorate element.

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

2 years agocodecs: mpeg2decoder: Use tsg framerate for latency.
Víctor Manuel Jáquez Leal [Tue, 7 Sep 2021 07:45:54 +0000 (09:45 +0200)]
codecs: mpeg2decoder: Use tsg framerate for latency.

Latency setting relies on src pad caps, but they aren't set when the
function is called, and latency is never updated.

In order to fix it, this patch uses TSG framerate first, and if it's
not set yet, sinkpad caps are used to get the framerate.

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

2 years agod3d11decoder: Refactor for more unified decoding flow
Seungha Yang [Wed, 15 Sep 2021 15:59:37 +0000 (00:59 +0900)]
d3d11decoder: Refactor for more unified decoding flow

... and various code cleanup.

* Move spreaded decoding API calls into one method
Previously, decoding flow of most codecs are
- Call DecoderBeginFrame() on start_picture()
- Call {Get,Release}DecoderBuffer() on decode_slice()
- Call SubmitDecoderBuffers() and DecoderEndFrame() on end_picture()
Such spreaded API calls make it hard to keep track of status
of decoding. Now it will be done at once in a new method.

* Drop a code for non-zero wBadSliceChopping
When bitstream buffer provided by driver is not sufficient
to write compressed bitstream data, host decoder needs to make use
of wBadSliceChopping so that driver can understand there are
multiple bitstream buffer. But it's a bit unrealistic and
not tested. Since FFMpeg's DXVA implemetaion doesn't support it,
we might be able to ignore the case for now.

* Make code more portable
Consider common logic of GstCodecs -> DXVA translation for all D3D APIs
(i,e., D3D9, D3D11, and D3D12).

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

2 years agod3d11decoder: Remove duplicated class_init and property related code
Seungha Yang [Wed, 15 Sep 2021 14:41:39 +0000 (23:41 +0900)]
d3d11decoder: Remove duplicated class_init and property related code

Move them into the decoder helper code to remove duplication

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

2 years agod3d11: Get rid of "extern "C"" wrapping for GST_DEBUG_CATEGORY_EXTERN
Seungha Yang [Fri, 10 Sep 2021 15:43:26 +0000 (00:43 +0900)]
d3d11: Get rid of "extern "C"" wrapping for GST_DEBUG_CATEGORY_EXTERN

Instead, change the file defining debug category to cpp

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

2 years agotests: skip cc tests if plugin is disabled
U. Artie Eoff [Tue, 30 Jun 2020 18:15:43 +0000 (11:15 -0700)]
tests: skip cc tests if plugin is disabled

Skip the closedcaption element tests if the
closedcaption option is disabled at compile
time (i.e. -Dclosedcaption=disabled).

v2: rename pangocairo_dep to avoid conflict
with later definition in ext/ttml/meson.build
as suggested by @tpm.

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

2 years agocodecs: h264dec: Check bumping again after inserting current picture.
He Junyan [Tue, 31 Aug 2021 09:16:05 +0000 (17:16 +0800)]
codecs: h264dec: Check bumping again after inserting current picture.

In order to get the lowest latency, we can add another bumping check after
inserting the current picture into the DPB immediately. That can avoid
waiting for another decoding circle of the next frame and so the latency
is lower.

Fix: #1628
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2501>

2 years agocodecs: h264: Add protection to to_insert picture in bump check.
He Junyan [Tue, 31 Aug 2021 09:37:11 +0000 (17:37 +0800)]
codecs: h264: Add protection to to_insert picture in bump check.

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

2 years agocodecs: h264dec: Improve the policy to infer max_num_reorder_frames.
He Junyan [Tue, 31 Aug 2021 08:39:06 +0000 (16:39 +0800)]
codecs: h264dec: Improve the policy to infer max_num_reorder_frames.

The max_num_reorder_frames number can change the way we bumping the
pictures in the DPB. The smaller it is, the lower latency we will
get. So it is important for live mode streams, but it is not given
in VUI parameters sometimes. We now improve the policy to infer it:
1. Never guess it in the "strict" compliance.
2. For baseline and constrained baseline profiles, which do not have
   B frames, set it to 0.
3. For -intra only profiles, set it to 0.
4. Otherwise, not guess it.

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

2 years agotests: skip aes test if elements not built
U. Artie Eoff [Wed, 15 Sep 2021 03:57:30 +0000 (20:57 -0700)]
tests: skip aes test if elements not built

In ext/aes/meson.build, the aes_dep will return
not-found if -Daes=disabled, regardless of whether
openssl is found or not.  Thus, we don't need a
separate check for the option.  This will also
ensure that aes_dep is always defined and we can
use it in the tests/check/meson.build unit.

Fixes #1660

v2: handle -Daes=disabled, too.

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

2 years agowpe: Add support for web:// URIs
Philippe Normand [Tue, 31 Aug 2021 16:33:02 +0000 (17:33 +0100)]
wpe: Add support for web:// URIs

The CEF source already supports this. No good reason for wpesrc not too ;)

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

2 years agova: h264dec: Try to use ConstrainedBaseline or Main to decode BaseLine.
He Junyan [Fri, 23 Jul 2021 15:38:22 +0000 (23:38 +0800)]
va: h264dec: Try to use ConstrainedBaseline or Main to decode BaseLine.

In the h264, the Baseline profile is widely misused. A lot of streams declare
that they are the Baseline, but in fact they just conform to ConstrainedBaseline.
The features such as FMO and ASO are not used at all.
If the decoder does not strictly conforms to the SPEC, we can just use Baseline
or Main profile to decode it to avoid lots of streams failure.

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

2 years agocodecs: h264dec: Improve the fast bump for the live mode.
He Junyan [Wed, 28 Jul 2021 15:19:15 +0000 (23:19 +0800)]
codecs: h264dec: Improve the fast bump for the live mode.

We control the policy of fast bump by the profile and the compliance
property. For baseline and constrained baseline profiles, we can use
more radical bump policy. User can also change the bump policy by
setting the compliance property in run time.

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

2 years agocodecs: h264: Change the low_latency to an enum for dpb_needs_bump().
He Junyan [Wed, 28 Jul 2021 14:48:21 +0000 (22:48 +0800)]
codecs: h264: Change the low_latency to an enum for dpb_needs_bump().

The bool parameter of low_latency is not enough. We have multi policies for
low latency bumping, from the safest to something radical. So we need an enum
to represent the proper latency requirement.

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

2 years agocodecs: h264dec: Add a compliance property to control behavior.
He Junyan [Mon, 26 Jul 2021 08:09:19 +0000 (16:09 +0800)]
codecs: h264dec: Add a compliance property to control behavior.

Some features such as the low-latency DPB bumping and mapping the
baseline profile as the constrained-baseline profile do not conform
to the H264 offical spec. But in practice, they are very useful and
are widely needed. We add this compliance property to control the
behavior of the decoder, make it fit more requirement.

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

2 years agodocs: Update cache
Philippe Normand [Sun, 12 Sep 2021 11:23:36 +0000 (12:23 +0100)]
docs: Update cache

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

2 years agova: Update vapostproc documentation.
Víctor Manuel Jáquez Leal [Tue, 7 Sep 2021 08:55:10 +0000 (10:55 +0200)]
va: Update vapostproc documentation.

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

2 years agova: Update todo lists, removing deinterlacing.
Víctor Manuel Jáquez Leal [Tue, 7 Sep 2021 08:16:05 +0000 (10:16 +0200)]
va: Update todo lists, removing deinterlacing.

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

2 years agoAdd vadeinterlace element.
Víctor Manuel Jáquez Leal [Mon, 23 Aug 2021 09:24:40 +0000 (11:24 +0200)]
Add vadeinterlace element.

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

2 years agova: filter: Add past and future frames in GstVaSample.
Víctor Manuel Jáquez Leal [Tue, 24 Aug 2021 11:53:12 +0000 (13:53 +0200)]
va: filter: Add past and future frames in GstVaSample.

And add them in the pipeline structure if they are provided.

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

2 years agova: filter: Add gst_va_filter_add_deinterlace_buffer()
Víctor Manuel Jáquez Leal [Tue, 24 Aug 2021 11:33:29 +0000 (13:33 +0200)]
va: filter: Add gst_va_filter_add_deinterlace_buffer()

This function decorates gst_va_filter_add_filter_buffer() to get the
number of past and future frames to hold, given the method.

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

2 years agova: filter: Add deinterlacing method parameter.
Víctor Manuel Jáquez Leal [Mon, 21 Dec 2020 17:17:24 +0000 (18:17 +0100)]
va: filter: Add deinterlacing method parameter.

For exposing that gobject parameter a new helper function is added:

gst_va_filter_install_deinterlace_properties()

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

2 years agova: filter: Protect filters array of overwrite.
Víctor Manuel Jáquez Leal [Mon, 23 Aug 2021 14:29:36 +0000 (16:29 +0200)]
va: filter: Protect filters array of overwrite.

It's possible to modify the filters array from another GStremer
thread, and the post-processing operation is not atomic, so the filter
array is reffed while the VA pipeline is processed.

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

2 years agova: filter: Add helper function to query pipeline caps.
Víctor Manuel Jáquez Leal [Mon, 23 Aug 2021 13:24:55 +0000 (15:24 +0200)]
va: filter: Add helper function to query pipeline caps.

This function is going to be shared for future deinterlace filter
processing.

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

2 years agova: filter: Shuffle _destroy_filters_unlocked().
Víctor Manuel Jáquez Leal [Mon, 23 Aug 2021 13:16:16 +0000 (15:16 +0200)]
va: filter: Shuffle _destroy_filters_unlocked().

In order to put it near to its caller.

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

2 years agovapostproc: Move up color balance detection to plugin.
Víctor Manuel Jáquez Leal [Tue, 10 Aug 2021 15:55:43 +0000 (17:55 +0200)]
vapostproc: Move up color balance detection to plugin.

In order to install the color balance interface, a GstVaFilter is
instantiated and queried to know if it supports color balance
filter. It was done just after the GObject was registered. Now, it's
done before.

The reason of this change is that deinterlace element has to be
registered only if deinterlace filter is available, using only one
instantiate of GstVaFilter.

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

2 years agova: basetransform: Update documentation.
Víctor Manuel Jáquez Leal [Tue, 7 Sep 2021 09:35:09 +0000 (11:35 +0200)]
va: basetransform: Update documentation.

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

2 years agova: basetransform: Add autoptr clean up function.
Víctor Manuel Jáquez Leal [Thu, 9 Sep 2021 16:26:56 +0000 (18:26 +0200)]
va: basetransform: Add autoptr clean up function.

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

2 years agova: basetransform: Use copy_metadata() at buffer import.
Víctor Manuel Jáquez Leal [Mon, 23 Aug 2021 16:44:30 +0000 (18:44 +0200)]
va: basetransform: Use copy_metadata() at buffer import.

Instead of using only gst_buffer_copy_into() use copy_metadata()
vmethod to copy what's needed.

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

2 years agovapostproc: don't chain up transform_meta()
Víctor Manuel Jáquez Leal [Mon, 23 Aug 2021 08:40:32 +0000 (10:40 +0200)]
vapostproc: don't chain up transform_meta()

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

2 years agocodecs: gstvp9statefulparser: feature_data should be 0 if feature_enable is 0
Daniel Almeida [Thu, 29 Jul 2021 15:20:30 +0000 (12:20 -0300)]
codecs: gstvp9statefulparser: feature_data should be 0 if feature_enable is 0

The spec says in 6.2.11 that feature_data[i][j] should be zero if
feature_enabled[i][j] is zero. Instead we retained the old value in the parser.
Fix it.

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

2 years agogsth264parser: Fix handling of NALs with emulation byte set
Marek Vasut [Wed, 8 Sep 2021 03:28:22 +0000 (05:28 +0200)]
gsth264parser: Fix handling of NALs with emulation byte set

In case a set of NALs with emulation_prevention_three_byte is decoded using
hardware decoder like Hantro G1, wrong struct v4l2_ctrl_h264_decode_params
.dec_ref_pic_marking_bit_size is passed into the kernel, which results in
decoding artifacts. Subtract the number of emulation three bytes from the
.dec_ref_pic_m->bit_size to get the correct bit size and avoid having these
artifacts. Apply the exact same fix to slice->pic_order_cnt_bit_size as well.

The following NALs (7, 8, 6, 5) decode with artifacts,
.dec_ref_pic_marking_bit_size is set to 10 without this patch.
00000000  00 00 00 01 27 4d 00 20  89 8b 60 3c 04 bf 2e 02  |....'M. ..`<....|
00000010  d4 18 04 18 c0 c0 01 77  00 00 5d c1 7b df 05 00  |.......w..].{...|
00000020  00 00 01 28 ee 1f 20 00  00 01 06 05 10 b9 ed b9  |...(.. .........|
00000030  30 5d 21 4b 71 83 71 2c  10 a3 14 bb 29 80 00 00  |0]!Kq.q,....)...|
00000040  01 25 b8 00 05 00 00 03  03 7f fa 78 1e e7 fd fe  |.%.........x....|
                         ^^^^^^^^^^^^--- emulation 3 byte
00000050  b4 62 7a 31 ff 7d 81 fd  26 d8 62 b6 d6 25 46 ae  |.bz1.}..&.b..%F.|

The following NALs (7, 8, 6, 5) decode fine,
.dec_ref_pic_marking_bit_size is set to 2 without this patch.
00000000  00 00 00 01 27 4d 00 20  89 8b 60 3c 04 bf 2e 02  |....'M. ..`<....|
00000010  d4 18 04 18 c0 c0 01 77  00 00 5d c1 7b df 05 00  |.......w..].{...|
00000020  00 00 01 28 ee 1f 20 00  00 01 06 05 10 b9 ed b9  |...(.. .........|
00000030  30 5d 21 4b 71 83 71 2c  10 a3 14 bb 29 80 00 00  |0]!Kq.q,....)...|
00000040  01 25 b8 00 04 c0 00 03  7f fa 78 1e e7 fd fe b4  |.%........x.....|
00000050  62 7a 31 ff 7d 81 fd 26  d8 62 b6 d6 25 46 ae ce  |bz1.}..&.b..%F..|

Fixes: d0d65fa875 ("codecparsers: h264: record dec_ref_pic_marking() size")
Fixes: 0cc7d6f093 ("codecparsers: h264: record pic_order_cnt elements size")
Signed-off-by: Marek Vasut <marex@denx.de>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2517>

2 years agogsth264parser: reject memory management control op greater than 6
Aaron Boxer [Fri, 3 Sep 2021 18:57:09 +0000 (14:57 -0400)]
gsth264parser: reject memory management control op greater than 6

This prevents assertion from being thrown in
gst_h264_dpb_perform_memory_management_control_operation
if corrupt NAL has a control op greater than 6

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

2 years agomsdk: Adjust the plugin and factories description based on MFX_VERSION.
Ung, Teng En [Tue, 24 Aug 2021 09:59:59 +0000 (09:59 +0000)]
msdk: Adjust the plugin and factories description based on MFX_VERSION.

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

2 years agovulkan: don't link to XOpenDisplay in documentation
Mathieu Duponchelle [Wed, 8 Sep 2021 15:32:30 +0000 (17:32 +0200)]
vulkan: don't link to XOpenDisplay in documentation

hotdoc doesn't know about that symbol

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

2 years agompeg2enc: Only allow 1 pending frame for encoding
Jan Schmidt [Mon, 30 Aug 2021 13:26:39 +0000 (23:26 +1000)]
mpeg2enc: Only allow 1 pending frame for encoding

Having an unlimited input queue is very bad if the
encoder can't run at real-time. Eventually it will
consume all RAM. I don't really see any reason to
have more than 1 outstanding encoded frame, so
remove the queue and limit things to 1 pending frame.

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

2 years agowpe: Fix race condition on teardown
Thibault Saunier [Wed, 1 Sep 2021 21:35:45 +0000 (17:35 -0400)]
wpe: Fix race condition on teardown

There was a race when going to PAUSED while pushing a buffer to the
pipeline process (where we weren't even cancelling anything).

This rework base all the cancellation around the GCancellable
"cancelled" signal trying to ensure that the streaming thread will not
block once a cancel operation happens.

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

2 years agowpe: Use the new element.get_current_running_time API
Thibault Saunier [Wed, 1 Sep 2021 21:26:04 +0000 (17:26 -0400)]
wpe: Use the new element.get_current_running_time API

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

2 years agowpe: Mark first buffer as starting at 0
Thibault Saunier [Wed, 1 Sep 2021 21:24:45 +0000 (17:24 -0400)]
wpe: Mark first buffer as starting at 0

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

2 years agovideoparseutils: Fix for wrong CEA708 minimum size check
Seungha Yang [Thu, 2 Sep 2021 13:06:52 +0000 (22:06 +0900)]
videoparseutils: Fix for wrong CEA708 minimum size check

The minimum possible size of valid CEA708 data is 3 bytes, not 7 bytes

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

2 years agowpevideosrc: Uniformise default value for draw-background property
Philippe Normand [Sun, 29 Aug 2021 10:04:17 +0000 (11:04 +0100)]
wpevideosrc: Uniformise default value for draw-background property

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

2 years agowpevideosrc: Implement basic heuristic for raw caps negotiation
Philippe Normand [Sun, 29 Aug 2021 09:30:53 +0000 (10:30 +0100)]
wpevideosrc: Implement basic heuristic for raw caps negotiation

Before this patch raw caps could be negotiated already with a capsfilter, but in
cases where wpesrc is being auto-plugged this approach can't be used.

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

2 years agowpevideosrc: Ensure debug category is set
Philippe Normand [Sun, 29 Aug 2021 09:28:57 +0000 (10:28 +0100)]
wpevideosrc: Ensure debug category is set

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

2 years agocccombiner: fix scheduling with interlaced video buffers
Mathieu Duponchelle [Thu, 15 Jul 2021 19:10:14 +0000 (21:10 +0200)]
cccombiner: fix scheduling with interlaced video buffers

The initial code was written with the misunderstanding that
IS_TOP_FIELD indicated that an interlaced buffer contained
a top field, not that it contained only a top field

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

2 years agoRevert "kmssink: Fix fallback path for driver not able to scale scenario"
Nicolas Dufresne [Fri, 27 Aug 2021 19:41:32 +0000 (15:41 -0400)]
Revert "kmssink: Fix fallback path for driver not able to scale scenario"

This reverts commit d2a7b763bef3ca51f0c84cdac52eeed85b0db8fb.

After this change, non-scaled rendered were not centred as expected.

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

2 years agocodecs: av1dec: Fix to output frame with highest spatial layer
Mengkejiergeli Ba [Fri, 20 Aug 2021 05:28:51 +0000 (13:28 +0800)]
codecs: av1dec: Fix to output frame with highest spatial layer

During the output process, if there are multiple frames in a TU (i.e. multi-spatial
layers case), only one frame with the highest spatial layer id should be selected
according to av1 spec. The highest spatial layer id is obtained from idc value of
the operating point.

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

2 years agodashdemux: copy ContentProtection element including xml namespaces
Alex Ashley [Tue, 24 Aug 2021 13:33:42 +0000 (14:33 +0100)]
dashdemux: copy ContentProtection element including xml namespaces

Commit bc09d8cc changed gstmpdparser to put the entire
<ContentProtection> element in the "value" field, so that DRMs
other than PlayReady could make use of the data inside this
element.

However, the data in the "value" field does not include any
XML namespace declarations that are used within the element. This
causes problems for a namespace aware XML parser that wants to
make use of this data.

This commit modifies the way the XML is converted to a string
so that XML namespaces are preserved in the output.

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

2 years agoerrorignore: Add ignore-eos mode
Vivia Nikolaidou [Thu, 26 Aug 2021 18:26:01 +0000 (21:26 +0300)]
errorignore: Add ignore-eos mode

It's otherwise very complicated to ignore GST_FLOW_EOS without a
ghostpad's chain function to rewrite.

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

2 years agogsth264parser: fix typo in debug message
Brad Hards [Fri, 27 Aug 2021 07:25:04 +0000 (17:25 +1000)]
gsth264parser: fix typo in debug message

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

2 years agotimecodestamper: add support for closedcaption input
Mathieu Duponchelle [Thu, 26 Aug 2021 02:12:07 +0000 (04:12 +0200)]
timecodestamper: add support for closedcaption input

Some closedcaption elements like sccenc except input buffers
to have timecode metas. The original use case is to serialize
closed captions extracted from a video stream, in that case
ccextractor copies the video time code metas to the closed
caption buffers, but no such mechanism exists when creating
a CC stream ex nihilo.

Remedy that by having timecodestamper accept closedcaption
input caps, as long as they have a framerate.

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

2 years agoaes: add aes encryption and decryption elements
Aaron Boxer [Tue, 6 Jul 2021 16:31:42 +0000 (12:31 -0400)]
aes: add aes encryption and decryption elements

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

2 years agowebrtcbin: Return typed "sctp-transport"
Johan Sternerup [Mon, 10 May 2021 10:02:20 +0000 (12:02 +0200)]
webrtcbin: Return typed "sctp-transport"

With GstWebRTCSCTPTransport type exposed we can now define
"sctp-transport" property as being of this type.

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

2 years agowebrtc: Split sctptransport into lib and implementation parts
Johan Sternerup [Fri, 7 May 2021 06:12:25 +0000 (08:12 +0200)]
webrtc: Split sctptransport into lib and implementation parts

GstWebRTCSCTPTransport is now made into into an abstract base class
that only contains property specifications matching the
RTCSctpTransport interface of the W3C WebRTC specification, see
https://w3c.github.io/webrtc-pc/#rtcsctptransport-interface. This
class is put into the WebRTC library to expose it for applications and
to allow for generation of bindings for non-dynamic languages using
GObject introspection.

The actual implementation is moved to the subclass WebRTCSCTPTransport
located in the WebRTC plugin.

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

2 years agowebrtcbin: Expose SCTP Transport
Johan Sternerup [Mon, 3 May 2021 08:45:42 +0000 (10:45 +0200)]
webrtcbin: Expose SCTP Transport

Being able to access the SCTP Transport object from the application
means the application can access the associated DTLS Transport object
and its ICE Transport object. This means we can observe the ICE state
also for a data-channel-only session. The collated
ice-connection-state on webrtcbin only includes the ICE Transport
objects that resides on the RTP transceivers (which is exactly how it
is specified in
https://w3c.github.io/webrtc-pc/#rtciceconnectionstate-enum).

For the consent freshness functionality (RFC 7675) to work the ICE
state must be accessible and consequently the SCTP transport must be
accessible for enabling consent freshness checking for a
data-channel-only session.

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

2 years agoopenh264enc: fix broken header AU emission by base class
Tim-Philipp Müller [Tue, 20 Apr 2021 19:04:33 +0000 (20:04 +0100)]
openh264enc: fix broken header AU emission by base class

This encoder advertises alignment=au as output format, which means
each output frame should contain a full decodable access unit.

The video encoder base class is not aware of our output alignment
and will output spurious buffers with just the SPS/PPS inside when
we call gst_video_encoder_set_headers(), which is broken because
each buffer is supposed to contain a full decodable access unit
in our case.

Just don't tell the base class about our headers, they will be
sent at the beginning of each IDR frame anyway.

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

2 years agoopenh264enc: fix caps and header buffer leak
Tim-Philipp Müller [Tue, 20 Apr 2021 18:43:53 +0000 (19:43 +0100)]
openh264enc: fix caps and header buffer leak

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

2 years agoopenh264enc: fix broken sps/pps header generation
Tim-Philipp Müller [Tue, 20 Apr 2021 18:11:12 +0000 (19:11 +0100)]
openh264enc: fix broken sps/pps header generation

This was putting a truncated SPS into the initial header instead
of the PPS because it was always reading from the beginning of the
bitstream buffer (pBsBuf) and not from the offset where the current
NAL is at in the bitstream buffer (psBsBuf + nal_offset).

This was broken in commit 17113695.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1576

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

2 years agod3d11bufferpool: Hide buffer_size field from header
Seungha Yang [Sat, 21 Aug 2021 15:33:58 +0000 (00:33 +0900)]
d3d11bufferpool: Hide buffer_size field from header

User can get the required buffer size by using buffer pool config.
Since d3d11 implementation is a candidate for public library in the future,
we need to hide everything from header as much as possible.

Note that the total size of allocated d3d11 texture memory by GPU is not
controllable factor. It depends on hardware specific alignment/padding
requirement. So, GstD3D11 implementation updates actual buffer size
by allocating D3D11 texture, since there's no way to get CPU accessible
memory size without allocating real D3D11 texture.

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

2 years agonvcodec: Fix various typos
Seungha Yang [Fri, 20 Aug 2021 17:20:11 +0000 (02:20 +0900)]
nvcodec: Fix various typos

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

2 years agonvcodec: Get rid of G_GNUC_INTERNAL
Seungha Yang [Fri, 20 Aug 2021 17:10:37 +0000 (02:10 +0900)]
nvcodec: Get rid of G_GNUC_INTERNAL

Our default symbol visibility is hidden, so G_GNUC_INTERNAL
is pointless

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

2 years agov4l2codecs: h264: Fix split field handling
Nicolas Dufresne [Thu, 19 Aug 2021 20:45:18 +0000 (16:45 -0400)]
v4l2codecs: h264: Fix split field handling

Split fields ends up on multiple picture and requires accessing the
other_field to complete the information (POC).

This also cleanup the DPB from non-reference (was not useful) and skips
properly merge field instead of keeping them duplicated. This fixes most
of interlace decoding seen in fluster.

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

2 years agov4l2codec: h264: Implement support for split fields
Nicolas Dufresne [Thu, 19 Aug 2021 15:40:22 +0000 (11:40 -0400)]
v4l2codec: h264: Implement support for split fields

When a frame is composed of two fields, the base class now split the
picture in two. In order to support this, we need to ensure that picture
buffer is held in VB2 queue so that the second field get decoded into
it. This also implements the new_field_picture() virtual and sets the
previous request on the new picture.

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

2 years agov4l2codecs: h264: Fix filling weight factors
Nicolas Dufresne [Fri, 20 Aug 2021 15:23:57 +0000 (11:23 -0400)]
v4l2codecs: h264: Fix filling weight factors

This was a typo, the wrong index was used to set l1 weight (b-frames).

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

2 years agodashdemux: Properly initalize GError
Edward Hervey [Fri, 20 Aug 2021 12:34:53 +0000 (14:34 +0200)]
dashdemux: Properly initalize GError

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

2 years agomfvideosrc: Fix for negative MF stride
Seungha Yang [Thu, 19 Aug 2021 12:56:05 +0000 (21:56 +0900)]
mfvideosrc: Fix for negative MF stride

Negative stride value can be used in MediaFoundation to inform
whether memory layout is top-down or bottom-up manner. Note that
negative stride is allowed only for RGB, system memory.

See also
https://docs.microsoft.com/en-us/windows/win32/medfound/image-stride

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1646
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2473>

2 years agov4l2slh264dec: Fix slice header bit size calculation
Nicolas Dufresne [Wed, 18 Aug 2021 15:14:37 +0000 (11:14 -0400)]
v4l2slh264dec: Fix slice header bit size calculation

The emulation bytes need to be removed as bytes, not bit. This fixes
decoding issues with files that have emulation bytes with the Cedrus
driver.

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

2 years agoexample: va: Add skin tone enhancement.
Víctor Manuel Jáquez Leal [Thu, 12 Aug 2021 12:08:19 +0000 (14:08 +0200)]
example: va: Add skin tone enhancement.

If camera is used as input stream and skin tone parameter is available
in vapostproc, and no random changes are enabled, the skin tone will
be enabled.

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

2 years agovapostproc: Use vapostproc as debug category name.
Víctor Manuel Jáquez Leal [Tue, 17 Aug 2021 12:04:41 +0000 (14:04 +0200)]
vapostproc: Use vapostproc as debug category name.

Otherwise is difficult to remember the different name.

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

2 years agoexamples: va: Add random cropping.
Víctor Manuel Jáquez Leal [Thu, 12 Aug 2021 11:54:34 +0000 (13:54 +0200)]
examples: va: Add random cropping.

And remove unused caps filter.

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

2 years agovapostproc: Disable cropping in pass-through mode.
Víctor Manuel Jáquez Leal [Wed, 28 Jul 2021 11:04:50 +0000 (13:04 +0200)]
vapostproc: Disable cropping in pass-through mode.

Originally, if a buffer arrives with crop meta but downstream doesn't
handle crop allocation meta, vapostproc tried to reconfigure itself to
non pass-through mode automatically. Sadly, this behavior was based on
the wrong assumption that propose_allocation() vmethod would bring
downstream allocation query, but it is not.

Now, if vapostproc is in pass-through mode, the cropping is passed to
downstream.  Pass-through mode can be disabled via a parameter.

Finally, if pass-through mode isn't enabled, it's assumed the buffer
is going to be processed and, if cropping, downstream already
negotiated the cropped frame size, thus it's required to do the
cropping inside vapostproc to avoid artifacts because of the size of
downstream allocated buffers.

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

2 years agovapostproc: Update filters update_properties().
Víctor Manuel Jáquez Leal [Tue, 17 Aug 2021 12:54:21 +0000 (14:54 +0200)]
vapostproc: Update filters update_properties().

Right after instantiating the VA filter and changing the element
state, rebuild the image filters.

This will fix a regression from f20b3b815, where properties in a
gst-launch pipeline are not applied.

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

2 years agodecklinkvideosrc: Fix PAL/NTSC widescreen autodetection when switching back to non...
Sebastian Dröge [Wed, 18 Aug 2021 06:13:45 +0000 (09:13 +0300)]
decklinkvideosrc: Fix PAL/NTSC widescreen autodetection when switching back to non-widescreen

Previously it would only switch to widescreen but never back.

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

2 years agomsdkvpp: Fix frc from lower fps to higher fps
Mengkejiergeli Ba [Tue, 20 Jul 2021 10:15:11 +0000 (18:15 +0800)]
msdkvpp: Fix frc from lower fps to higher fps

There are three framerate conversion algorithms described in
<https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md>,
interpolation is not implemented so far and thus distributed timestamp algorihtm
is considered to be more practical which evenly distributes output timestamps
according to output framerate. In this case, newly generated frames are inserted
between current frame and previous one, timestamp is calculated by msdk API.

This implementation first pushes newly generated buffers(outbuf_new) forward and
the current buffer(outbuf) is handled at last round by base transform automatically.
A flag "create_new_surface" is used to indicate if new surfaces have been generated
and then push new outbuf forward accordingly.

Considering the upstream element may not be the msdk element, it is necessary to
always set the input surface timestamp as same as input buffer's timestamp and
convert it to msdk timestamp.

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

2 years agowebrtc: improve matching on the correct jitterbuffer
Matthew Waters [Thu, 6 May 2021 12:22:12 +0000 (22:22 +1000)]
webrtc: improve matching on the correct jitterbuffer

The mapping between an RTP session and the SDP m= line is not always the
same, especially when BUNDLEing is used.

This causes a failure in a specific case where if when bundling,
if mline 0 is a data channel, and mline 1 an audio/video section,
then retrieving the transceiver at mline 0 (rtp session used) will fail
and cause an assertion.

This fix is actually potentially a regression for cases where the remote
part does not provide the a=ssrc: media level SDP attributes as is now
becoming common, especially when simulcast is involved.

The correct fix actually requires reading out header extensions as used
with bundle for signalling in the actual data, what media and therefore
transceiver is being used.

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

2 years agova: Use GST_CAPS_FEATURE_MEMORY_VA to replace "memory:VAMemory".
He Junyan [Mon, 16 Aug 2021 05:45:39 +0000 (13:45 +0800)]
va: Use GST_CAPS_FEATURE_MEMORY_VA to replace "memory:VAMemory".

"memory:VAMemory" is a commonly used string which notates our VA-kind
memory type. We now used a definition in va lib to replace the simply
string usage.

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

2 years agova: Use MEMORY_DMABUF definition to replace "memory:DMABuf" strings.
He Junyan [Mon, 16 Aug 2021 05:32:51 +0000 (13:32 +0800)]
va: Use MEMORY_DMABUF definition to replace "memory:DMABuf" strings.

GST_CAPS_FEATURE_MEMORY_DMABUF is already a common definition, we should
just use it rather than use the "memory:DMABuf" strings by ourselves.

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

2 years agofdkaacdec: Add Converter class to hint gst-validate
Thibault Saunier [Mon, 9 Aug 2021 23:02:56 +0000 (19:02 -0400)]
fdkaacdec: Add Converter class to hint gst-validate

fdkaacdec have minimal conversion capability, adding the Converter class allow
gst-validate to behave properly and not spit an error when it notice that the
number of channels or rate miss-match in and out.

Same logic as with opusdec, see: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1142>

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

2 years agowasapi2: Increase rank to primary + 1
Seungha Yang [Wed, 9 Jun 2021 14:29:43 +0000 (23:29 +0900)]
wasapi2: Increase rank to primary + 1

wasapi2 plugin should be preferred than old wasapi plugin if available because:
* wasapi2 supports automatic stream routing, and it's highly recommended
  feature for application by MS. See also
  https://docs.microsoft.com/en-us/windows/win32/coreaudio/automatic-stream-routing
* This implementation must be various COM threading issue free by design
  since wasapi2 plugin spawns a new dedicated COM thread and all COM objects'
  life-cycles are managed correctly.
  There are unsolved COM issues around old wasapi plugin. Such issues are
  very tricky to be solved unless old wasapi plugin's threading model
  is re-designed.

Note that, in case of UWP, wasapi2 plugin's rank is primary + 1 already

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

2 years agoccconverter: fix overflow when not doing framerate conversion
Mathieu Duponchelle [Thu, 12 Aug 2021 18:39:24 +0000 (20:39 +0200)]
ccconverter: fix overflow when not doing framerate conversion

When converting from one framerate to another, counters are
reset periodically, however when not converting they never are
and can_genearte_output ends up making overflow-prone calculations
with large values for input_frames and output_frames.

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

2 years agowebrtcbin: Don't assume that non-audio medias are video medias when creating transceivers
Sebastian Dröge [Thu, 12 Aug 2021 12:26:27 +0000 (15:26 +0300)]
webrtcbin: Don't assume that non-audio medias are video medias when creating transceivers

And print the unknown media kind in the logs.

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

2 years agowebrtcbin: Use the correct media for deciding the media kind when creating the transc...
Sebastian Dröge [Thu, 12 Aug 2021 12:25:50 +0000 (15:25 +0300)]
webrtcbin: Use the correct media for deciding the media kind when creating the transceiver from the SDP

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

2 years agocodecs: h264dec: Output the picture directly if already a frame.
He Junyan [Thu, 29 Jul 2021 13:30:32 +0000 (21:30 +0800)]
codecs: h264dec: Output the picture directly if already a frame.

We forget one case that is the frame and field pictures may be mixed
together. For this case, the dpb is interlaced while the last picture
may be a complete frame. We do not need to cache that complete picture
and should output it directly.

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

2 years agova: caps: Make the template raw video caps classified by features.
He Junyan [Fri, 6 Aug 2021 09:11:55 +0000 (17:11 +0800)]
va: caps: Make the template raw video caps classified by features.

The current output of raw video caps is not good. When we have multi
profiles and each profile support different formats, the output of
gst-inspect may like:

 SRC template: 'src'
 Availability: Always
 Capabilities:
   video/x-raw(memory:VAMemory)
         width: [ 1, 16384 ]
         height: [ 1, 16384 ]
         format: NV12
   video/x-raw
         width: [ 1, 16384 ]
         height: [ 1, 16384 ]
         format: NV12
   video/x-raw(memory:VAMemory)
         width: [ 1, 16384 ]
         height: [ 1, 16384 ]
         format: P010_10LE
   video/x-raw
         width: [ 1, 16384 ]
         height: [ 1, 16384 ]
         format: P010_10LE
   video/x-raw(memory:VAMemory)
         width: [ 1, 16384 ]
         height: [ 1, 16384 ]
         format: P012_LE
   video/x-raw
         width: [ 1, 16384 ]
         height: [ 1, 16384 ]
         format: P012_LE

The gst_caps_simplify does not classify the caps by same features, but
just leave them interweaved. We need to handle them manually here, the
result should be:

  SRC template: 'src'
  Availability: Always
  Capabilities:
    video/x-raw
          width: [ 1, 16384 ]
          height: [ 1, 16384 ]
          format: { (string)P010_10LE, (string)P012_LE, (string)NV12 }
    video/x-raw(memory:VAMemory)
          width: [ 1, 16384 ]
          height: [ 1, 16384 ]
          format: { (string)P010_10LE, (string)P012_LE, (string)NV12 }

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