Víctor Manuel Jáquez Leal [Fri, 5 Mar 2021 08:18:15 +0000 (09:18 +0100)]
vulkan: Declare missing auto-pointer cleanup functions.
Also removed a couple guards since, given the glib dependency, they
are set.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2396>
Víctor Manuel Jáquez Leal [Wed, 3 Mar 2021 11:54:20 +0000 (12:54 +0100)]
vulkan: filter: Use filter variable name for choosing queue.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2396>
Víctor Manuel Jáquez Leal [Wed, 3 Mar 2021 07:50:13 +0000 (08:50 +0100)]
vulkansink: Fix element metadata.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2396>
Yinhang Liu [Fri, 25 Jun 2021 01:19:25 +0000 (09:19 +0800)]
msdkvpp: use NV12 as default format on srcpad
By default, sinkpad is NV12 format and srcpad is BGRA format, the
different format will trigger an implicit format conversion in
msdkvpp, which will cause performance drop.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2394>
Dominique Martinet [Mon, 31 May 2021 23:40:17 +0000 (08:40 +0900)]
gst-libs/gst/wayland: handle display passing better
failure to pass a display in 'handle' would result in uninitialized value
being returned, which would often segfault later down the road when trying
to initialize gstreamer context with it.
Check the return value of gst_structure_get() to make sure we return valid
data.
Furthermore, the gstglimagesink in gst-plugins-base also has a similar
mechanism but uses 'display' as field name to pass the value; instead of
requiring the application to behave differently depending on what sink
was automatically detected just try to read both values here, with display
being the new default.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2292>
Philippe Normand [Thu, 8 Jul 2021 13:46:11 +0000 (14:46 +0100)]
dashdemux: Log protection events on corresponding pad
GstDashDemuxStream is not a GstObject, so use its pad as associated object when
emitting log messages.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2389>
He Junyan [Thu, 8 Jul 2021 08:49:27 +0000 (16:49 +0800)]
va: vpp: Improve the color properties setting.
The current setting of color properties are not very correct and
we will get some kind of "unknown Color Standard for YUV format"
warnings printed out by drivers. The video-color already provides
some standard APIs for us, and we can use them directly.
We also change the logic to: Finding the exactly match or explicit
standard first. If not found, we continue to find the most similar
one.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2385>
Seungha Yang [Thu, 8 Jul 2021 10:03:06 +0000 (19:03 +0900)]
mfvideosrc: Fix negotiation when interlace-mode is specified
Given caps does not need to be strictly subset of device caps.
Allow accept it if device caps and requested caps can intersect
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1619
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2384>
Mathieu Duponchelle [Thu, 8 Jul 2021 00:24:18 +0000 (02:24 +0200)]
cccombiner: mark field 0 as valid when generating padding CDP
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2383>
Seungha Yang [Tue, 6 Jul 2021 08:14:21 +0000 (17:14 +0900)]
mfvideobuffer: Don't error for unexpected Unlock/Unlock2D call
Some GPU vendor's MFT implementation calls IMFMediaBuffer::Unlock()
without previous IMFMediaBuffer::Lock() call. Which is obviously
driver bug but we can ignore the Unlock call.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2381>
Stéphane Cerveau [Wed, 30 Jun 2021 08:30:43 +0000 (10:30 +0200)]
dashsink: fix crash with no pad name for representation
if there is no pad name, the representation id
was NULL, causing a crash when writing the mpd file.
gst-launch-1.0 videotestsrc num-buffers=900 ! video/x-raw, width=800,
height=600, framerate=30/1 ! x264enc ! video/x-h264, profile=high !
dashsink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2064>
Stéphane Cerveau [Tue, 9 Mar 2021 10:40:43 +0000 (11:40 +0100)]
dashsink: Add signals for allowing custom playlist/fragment
Instead of always going through the file system API we allow the
application to modify the behaviour. For the playlist itself and
fragments, the application can provide a GOutputStream. In addition the
sink notifies the application whenever a fragment can be deleted.
Following the HLS change:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/918
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2064>
He Junyan [Tue, 6 Jul 2021 06:06:24 +0000 (14:06 +0800)]
codecs: h265dec: Disable the POC order warning for negative POC.
There may be leading frames after the IRAP frames, which has negative
POC. This kind of frames are allowed and they will be displayed before
the IRAP frame. So the warning should not be triggered for them. Init
the last_output_poc to G_MININT32 can avoid this.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2380>
He Junyan [Tue, 6 Jul 2021 05:38:16 +0000 (13:38 +0800)]
codecs: h264dec: Disable the POC order warning for negative POC.
There may be leading frames after the IDR frame, which has negative
POC. This kind of frames are allowed and they will be displayed before
the IDR frame. So the warning should not be triggered for them. Init
the last_output_poc to G_MININT32 can avoid this.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2380>
Jan Alexander Steffens (heftig) [Fri, 25 Jun 2021 13:57:03 +0000 (15:57 +0200)]
interlace: Push the reconfigure event in the right direction
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2361>
He Junyan [Mon, 5 Jul 2021 07:44:34 +0000 (15:44 +0800)]
va: basedec: Fix some artifact when do the crop copy.
The default video converter setting will add some artifact into
the picture for 10/12 bits conversion. This make the MD5 checksum
change from the original picture.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2379>
Seungha Yang [Sun, 4 Jul 2021 17:05:03 +0000 (02:05 +0900)]
d3d11decoder: Enable zero-copy for Qualcomm
Qualcomm GPU works fine with current implementation now.
Noticeable difference between when it was disabled and current
d3d11 implementation is that we now support GstD3D11Memory
pool, so there will be no more frequent re-binding decoder surface anymore.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2377>
Edward Hervey [Mon, 5 Jul 2021 05:42:39 +0000 (07:42 +0200)]
mxfdemux: Check validity of interleaved File Package
As specified by the S377 MXF core specification, if a file package has
interleaved content, then all tracks must be using the same Edit Rate
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2378>
Seungha Yang [Sun, 4 Jul 2021 16:54:02 +0000 (01:54 +0900)]
d3d11vp9dec: Fix for incorrect use_prev_in_find_mv_refs setting
Set use_prev_in_find_mv_refs depending on context. The value seems
to be used by AMD and Qualcomm (Intel and NVIDIA doesn't make difference
as per test)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2376>
Haihao Xiang [Tue, 11 May 2021 06:07:14 +0000 (14:07 +0800)]
gstmsdkvpp: add RGBP and BGRP in src pad
It requires MFX version 2.4+
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2234>
Seungha Yang [Sat, 3 Jul 2021 15:36:27 +0000 (00:36 +0900)]
mediafoundation: Port to IID_PPV_ARGS
Make code short where possible
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
Seungha Yang [Sat, 3 Jul 2021 15:24:09 +0000 (00:24 +0900)]
mfaudioenc: Remove pointless enumerating for hardware audio encoder
Hardware audio encoder can exist in theory, but it's untested
and we are not sure whether it can be preferred over software
implementation which is implemented by MS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
Seungha Yang [Sat, 3 Jul 2021 14:12:08 +0000 (23:12 +0900)]
mediafoundation: Fix typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
Seungha Yang [Sat, 3 Jul 2021 13:56:48 +0000 (22:56 +0900)]
mediafoundation: Run gst-indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
He Junyan [Sat, 26 Jun 2021 13:42:37 +0000 (21:42 +0800)]
va: Consider the compatibility when we get_profile() for H265 decoder.
Adding the compatile profiles when we decide the final profile used for decoding.
The final profile candidates include:
1. The profile directly specified by SPS, which is the exact one.
2. The compatile profiles decided by the upstream element such as the h265parse.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2322>
He Junyan [Sun, 27 Jun 2021 07:34:28 +0000 (15:34 +0800)]
h265parse: Add special profile case for profile_idc 0.
This is a work-around to identify some main profile streams having
wrong profile_idc. There are some wrongly encoded main profile streams
which doesn't have any of the profile_idc values mentioned in Annex-A,
instead, general_profile_idc has been set as zero and the
general_profile_compatibility_flag[general_profile_idc] is TRUE.
Assuming them as MAIN profile for now.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2322>
He Junyan [Sat, 26 Jun 2021 07:11:47 +0000 (15:11 +0800)]
h265parse: Map -intra profiles to non-intra compatible profiles.
All the -intra profiles can map to non-intra profiles as compatible
profiles, except the monochrome case for main and main-10.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2322>
He Junyan [Thu, 1 Jul 2021 11:27:28 +0000 (19:27 +0800)]
va: vp9dec: update segmentation and store the result.
The segmentation is stateful, its information may depend on the previous
segmentation setting. For example, if loop_filter_delta_enabled is TRUE,
the filter_level[GST_VP9_REF_FRAME_INTRA][1] should inherit the previous
frame's value and can not be calculated by the current frame's segmentation
data only. So we need to maintain the segmentation state inside the vp9
decoder and update it when the new frame header comes.
We also fix the CLAMP issue of lvl_seg and intra_lvl because of their wrong
uint type here.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
He Junyan [Wed, 30 Jun 2021 07:23:15 +0000 (15:23 +0800)]
codecparsers: vp9statefulparser: Fix the gst_vp9_get_qindex clamp issue.
The alternate quantizer is a delta value and should be int type.
We mark it wrongly as uint, that will make CLAMP (data, 0, 255)
always choose 255 rather than 0 if the data < 0.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
He Junyan [Wed, 30 Jun 2021 07:32:42 +0000 (15:32 +0800)]
codecparsers: vp9parser: Use macro to define the size of filter_level in Segmentation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
He Junyan [Wed, 30 Jun 2021 04:15:42 +0000 (12:15 +0800)]
codecparsers: vp9parser: Delete the verbose redefine of MAX_LOOP_FILTER.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
He Junyan [Tue, 29 Jun 2021 15:21:24 +0000 (23:21 +0800)]
va: allocator: dma: Fail when mapping the non-linear buffer.
The current way of DMA buffer mapping is simply forwarding the job
to parent's map function, which is a mmap(). That can not handle the
non-linear buffers, such as tiling, compressed, etc. The incorrect
mapping of such buffers causes broken images, which are recognized
as bugs. We should directly block this kind of mapping to avoid the
misunderstanding.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2353>
Matthew Waters [Fri, 2 Jul 2021 03:10:25 +0000 (13:10 +1000)]
ccconverter: fix framerate caps negotiation from non-cdp to cdp
We can only convert from non-cdp to cdp within the confines of valid cdp
framerates. The existing caps negotiation code was allowing any
framerate to convert to a cdp output which is incorrect and would hit an
assertion later.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2372>
He Junyan [Wed, 9 Jun 2021 07:16:39 +0000 (15:16 +0800)]
codecs: h265decoder: Consider the conformance window changes when new_sequence().
The change of conformance_window_flag and crop windows size also has impact on the
output resolution and caps. So it deserves a trigger of new_sequence() to notify
the sub class to update caps and pool.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2312>
Seungha Yang [Tue, 15 Jun 2021 16:07:09 +0000 (01:07 +0900)]
h265decoder: Don't hold reference to GstVideoCodecFrame for dropped picture
We are dropping RASL (Random Access Skipped Leading picture) which
is associated with an IRAP (Intra Random Access Picture) that has
NoRaslOutputFlag equal to 1, since the RASL picture will not be
outputted and also it should not be used for reference picture.
So, corresponding GstVideoCodecFrame should be released immediately.
Otherwise GstVideoDecoder baseclass will hold the unused frame.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2330>
Edward Hervey [Mon, 21 Jun 2021 11:23:13 +0000 (13:23 +0200)]
mxfvanc: Handle empty ANC essence
Not having any *actual* ANC is totally fine and common usage with several MXF
variants.
In order to properly advance the streams, the essence handler returns an empty
GAP buffer which gets converted to a GST_EVENT_GAP.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2345>
Seungha Yang [Wed, 30 Jun 2021 09:11:46 +0000 (18:11 +0900)]
mfvideoenc: Don't ignore previous flow return value
In case of ASYNC MFT (hardware encoder), we were ignoring previous
finish_frame or pad_push return value. so, error wasn't propagated.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2370>
Seungha Yang [Wed, 19 May 2021 15:49:15 +0000 (00:49 +0900)]
d3d11compositor: Add scaling policy to support PAR-aware scaling
Identical to https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1156
but for D3D11.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2263>
youngsoo.lee [Wed, 30 Jun 2021 04:56:49 +0000 (13:56 +0900)]
opencv: Fix build error on macOS
The build fails on macos with the following error:
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:2226:15: error: no template named 'initializer_list' in namespace 'std'
Mat_(std::initializer_list<_Tp> values);
fatal error: too many errors emitted, stopping now [-ferror-limit=]
35 warnings and 20 errors generated.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2368>
Ezequiel Garcia [Wed, 3 Mar 2021 18:38:45 +0000 (15:38 -0300)]
v4l2codecs: vp8: Check kernel version
Print a warning if the kernel version is too old.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2075>
Ezequiel Garcia [Tue, 2 Mar 2021 21:13:27 +0000 (18:13 -0300)]
v4l2codecs: vp8: Update to the new uAPI
Starting from Linux v5.13, the V4L2 stateless VP8 uAPI
is updated and stable.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2075>
Seungha Yang [Sat, 26 Jun 2021 16:15:49 +0000 (01:15 +0900)]
nvcodec: Enhance CUDA runtime compiler library loading on Windows
The name of installed CUDA runtime compiler library is formed like
nvrtc64_{major-version}{minor-version}_0.dll on Windows
(which is differnt from documented in https://docs.nvidia.com/cuda/nvrtc/index.html)
And minor version might not be exactly same as that of CUDA.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2362>
Seungha Yang [Mon, 14 Jun 2021 09:49:20 +0000 (18:49 +0900)]
d3d11: Add AV1 decoder
Introduce Direct3D11/DXVA AV1 decoder element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2365>
Seungha Yang [Sun, 27 Jun 2021 14:09:30 +0000 (23:09 +0900)]
av1decoder: Store display resolution for duplicated picture
Target display resolution might be required by subclass implementation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2365>
Seungha Yang [Sun, 27 Jun 2021 11:35:49 +0000 (20:35 +0900)]
av1decoder: Fix debug typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2365>
Seungha Yang [Sun, 27 Jun 2021 11:19:39 +0000 (20:19 +0900)]
av1parser: Fix tile size calculation
Remaining size should exclude already read "tile size bits".
And see also "5.11.1. General tile group OBU syntax"
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2365>
Olivier Crête [Tue, 29 Jun 2021 01:13:56 +0000 (21:13 -0400)]
webrtc receivebin: Drop serialized queries before receive queue
If they're not dropped, they can be blocked in the queue even if it is
leaky in the case where there is a buffer being pushed downstream. Since
in webrtc, it's unlikely that there will be a special allocator to
receive RTP packets, there is almost no downside to just ignoring the
queries.
Also drop queries if they get caught in the pad probe after the queue.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2363>
Olivier Crête [Sat, 26 Jun 2021 18:31:01 +0000 (14:31 -0400)]
webrtc receivebin: Only set queue to leaky when the pad is blocked
When the pad is no longer blocked, remove the leakyness to make sure
everything gets into the jitterbuffer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2363>
Olivier Crête [Sat, 26 Jun 2021 18:25:39 +0000 (14:25 -0400)]
webrtc receivebin: Don't unblock pad until sender is unblocked
As ther OpenSSL session is created when the receiver goes into
playing, we have to wait for the ICE session to be connected before we
can start delivering packets to the DTLS element.
Fixes #1599
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2363>
Sebastian Dröge [Thu, 24 Jun 2021 10:17:09 +0000 (13:17 +0300)]
webrtcbin: Sync to the clock per stream and not per bundle
By using the clocksync inside the dtlssrtpenc, all streams inside a
bundled are synchronized together. This will cause problems if their
buffers are not already arriving synchronized: clocksync would wait for
a buffer on one stream and then buffers from the other stream(s) with
lower timestamps would all be sent out too late.
Placing the clocksync before the rtpbin and rtpfunnel synchronizes each
stream individually and they will be send out more smoothly as a result.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2355>
Olivier Crête [Thu, 24 Jun 2021 18:58:12 +0000 (14:58 -0400)]
webrtc: Remove the webrtc-priv.h header from public headers
And this time for real, also import it in a couple more places
inside the webrtc element to make it build.
Fixes #1607
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2359>
He Junyan [Wed, 9 Jun 2021 09:29:19 +0000 (17:29 +0800)]
va: change AV1 GstVideoAlignment setting to left-top corner.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Fri, 18 Jun 2021 02:37:06 +0000 (10:37 +0800)]
va: h264dec: Set the GstVideoAlignment correctly.
We should set GstVideoAlignment based on the sequence's crop information.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Wed, 9 Jun 2021 09:21:18 +0000 (17:21 +0800)]
va: h265dec: Set the GstVideoAlignment correctly.
We should set GstVideoAlignment based on the conformance window info.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Wed, 9 Jun 2021 09:19:04 +0000 (17:19 +0800)]
va: pool: Add VideoCropMeta to the buffer if crop_top/left > 0.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Wed, 9 Jun 2021 09:14:42 +0000 (17:14 +0800)]
va: basedec: Copy the frames into other_pool if needed.
If decoder's crop_top/left value > 0 and the downstream does not
support the VideoCropMeta, we need to manually copy the frames
into the other_pool and output it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Wed, 9 Jun 2021 07:44:33 +0000 (15:44 +0800)]
va: basedec: Setup the other_pool to copy output if crop_left/top.
If the decoder has crop_top/left value > 0(e.g. the conformance
window in the H265). Which means that the real output picture
locates in the middle of the decoded buffer. If the downstream can
support VideoCropMeta, a VideoCropMeta is added to notify the
real picture's coordinate and size. But if not, we need to copy
it manually and the other_pool is needed. We always assume that
decoded picture starts from top-left corner, and so there is no
need to do this if crop_bottom/right value > 0.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Sun, 6 Jun 2021 16:49:49 +0000 (00:49 +0800)]
va: No need to set the alignment for VideoMeta
The base va decoder's video_align is just used for calculation the
real decoded buffer's width and height. It does not have meaning
for the VideoMeta, because it does not align to the real picture
in the output buffer. We will use VideoCropMeta to replace it later.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Wed, 2 Jun 2021 16:07:05 +0000 (00:07 +0800)]
va: Delete the useless align expand in va_pool_set_config().
The base va decoder's video_align is just used for calculation the
real decoded buffer's width and height. While the gst_video_info_align
just calculate the offset and stride based on the video_align. But
all the offsets and strides are overwritten in gst_va_dmabuf_allocator_try
or gst_va_allocator_try, which make that calculation useless.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
Sebastian Dröge [Mon, 28 Jun 2021 14:41:38 +0000 (17:41 +0300)]
webrtc: Re-add WebRTC object docs to the public headers
So they end up in the generated documentation and the Since markers
appear in the .gir files too.
Also remove wrong "Since: 1.16" markers for some objects that were
available since 1.14.0 already.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1609
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2366>
Sebastian Dröge [Fri, 25 Jun 2021 07:20:06 +0000 (10:20 +0300)]
webrtcbin: Set transceiver kind and codec preferences immediately when creating it
Otherwise the on-new-transceiver signal will always be emitted with kind
set to UNKNOWN and no codec preferences although both are often known at
this point already.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2360>
Sebastian Dröge [Fri, 25 Jun 2021 09:14:03 +0000 (12:14 +0300)]
webrtcbin: Add a test for setting codec preferences as part of "on-new-transceiver" when setting the remote offer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>
Sebastian Dröge [Fri, 25 Jun 2021 09:13:42 +0000 (12:13 +0300)]
webrtc: Use fail_unless_equals_string() for string assertions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>
Sebastian Dröge [Tue, 8 Jun 2021 08:40:14 +0000 (11:40 +0300)]
webrtcbin: Store newly created transceivers when creating an answer also in the seen transceivers list
Otherwise it might be used a second time for another media afterwards.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>
Sebastian Dröge [Tue, 8 Jun 2021 08:39:27 +0000 (11:39 +0300)]
webrtcbin: When creating a new transceiver as part of creating the answer also take its codec preferences into account
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>
Sebastian Dröge [Tue, 8 Jun 2021 08:38:11 +0000 (11:38 +0300)]
webrtcbin: Fix a couple of caps leaks of the offer caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>
Philippe Normand [Thu, 24 Jun 2021 11:28:11 +0000 (12:28 +0100)]
webrtcbin: Stop transceivers update after first SDP error on data channel
When invalid SDP is supplied, _update_data_channel_from_sdp_media() sets the
GError, so it is invalid to continue any further SDP processing, we have to exit
early when the first error is raised.
This change is similar to the one applied in
064428cb34572fa1a018ebbaba6925967ba99dc0.
See also #1595
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2356>
Olivier Crête [Mon, 21 Jun 2021 20:50:46 +0000 (16:50 -0400)]
webrtcbin test: Fix race in new test
Pull a buffer from a sink to make sure that the caps are already
set before trying to update them.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2348>
Mengkejiergeli Ba [Tue, 22 Jun 2021 08:12:57 +0000 (16:12 +0800)]
msdk: fix qp range for vp9enc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2349>
Sebastian Dröge [Thu, 10 Jun 2021 08:46:35 +0000 (11:46 +0300)]
avwait: Don't consider it a segment change if the segment is the same except for the position
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2319>
Seungha Yang [Mon, 21 Jun 2021 08:13:33 +0000 (17:13 +0900)]
d3d11: Add support for GRAY and more YUV formats
By this commit, following formats will be newly supported by d3d11 elements
* Y444_{8, 12, 16}LE formats:
Similar to other planar formats. Such Y444 variants are not supported
by Direct3D11 natively, but we can simply map each plane by
using R8 and/or R16 texture.
* P012_LE:
It is not different from P016_LE, but defining P012 and P016 separately
for more explicit signalling. Note that DXVA uses P016 texture
for 12bits encoded bitstreams.
* GRAY:
This format is required for some codecs (e.g., AV1) if monochrome
is supported
* 4:2:0 planar 12bits (I420_12LE) and 4:2:2 planar 8, 10, 12bits
formats (Y42B, I422_10LE, and I422_12LE)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2346>
Sebastian Dröge [Thu, 10 Jun 2021 08:42:24 +0000 (11:42 +0300)]
tsmux: When selecting random PIDs, name the pads according to those PIDs
Some elements will make use of the automatically generated names to
create new pads in future muxer instances, for example splitmuxsink.
Previously we would've created a pad with a random pid that would become
"sink_0", and then on a new muxer instance a pad "sink_0" and tsmux
would've then failed because 0 is not a valid PID.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2318>
Seungha Yang [Tue, 22 Jun 2021 16:43:08 +0000 (01:43 +0900)]
mfvideoenc: Enhance B-frame timestamp handling
When B-frame is enabled, encoder seems to adjust PTS of encoded sample
by using frame duration.
For instance, one observed timestamp pattern by using B-frame enabled
and 30fps stream is:
* Frame-1: MF pts 0:00.
033333300 MF dts 0:00.
000000000
* Frame-2: MF pts 0:00.
133333300 MF dts 0:00.
033333300
* Frame-3: MF pts 0:00.
066666600 MF dts 0:00.
066666600
* Frame-4: MF pts 0:00.
099999900 MF dts 0:00.
100000000
We can notice that the amount of PTS shift is frame duration and
Frame-4 exhibits PTS < DTS.
To compensate shifted timestamp, we should
calculate the timestamp offset and re-calculate DTS correspondingly.
Otherwise, total timeline of output stream will be shifted, and that
can cause time sync issue.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2354>
Sebastian Dröge [Thu, 10 Jun 2021 08:36:43 +0000 (11:36 +0300)]
tsmux: Recheck existing pad PIDs when requesting a new pad with a random pid
Previously pads might have been requested already (e.g. in NULL state),
then reset was called (e.g. because changing state) and then a new pad
was requested. Resetting is re-creating the internal muxer object and as
such resetting the pid counter, so the next requested pad would get the
same pid as the first requested pad which then leads to collisions.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2317>
Seungha Yang [Mon, 21 Jun 2021 17:34:18 +0000 (02:34 +0900)]
mfh264enc, mfh265enc: Set profile string to src caps
Set configured profile to src caps so that downstream can figure
out selected profile.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2347>
Olivier Crête [Wed, 21 Apr 2021 20:24:00 +0000 (16:24 -0400)]
webrtc lib: Make the datachannel struct private
This will prevent any unsafe access.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
Olivier Crête [Wed, 21 Apr 2021 20:19:41 +0000 (16:19 -0400)]
webrtc lib: Make the DTLSTransport struct private
This will prevent any unsafe access.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
Olivier Crête [Wed, 21 Apr 2021 20:17:23 +0000 (16:17 -0400)]
webrtc lib: Make the icetransport struct private
This will prevent any unsafe access.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
Olivier Crête [Wed, 21 Apr 2021 20:04:26 +0000 (16:04 -0400)]
webrtc lib: Make the rtpreceiver struct private
This will prevent any unsafe access.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
Olivier Crête [Wed, 21 Apr 2021 20:00:57 +0000 (16:00 -0400)]
webrtc lib: Make the rtpsender struct private
This will prevent any unsafe access.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
Olivier Crête [Wed, 21 Apr 2021 20:00:34 +0000 (16:00 -0400)]
webrtc lib: Make the transceiver struct private
This will prevent any unsafe access.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
Mathieu Duponchelle [Fri, 18 Jun 2021 17:26:35 +0000 (19:26 +0200)]
x265enc: add negative DTS support
Use the same set_min_pts approach as x264enc.
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/304
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2340>
Seungha Yang [Thu, 17 Jun 2021 11:10:35 +0000 (20:10 +0900)]
decklinkaudiosrc: Don't assume that stream time is always valid
As per SDK doc, IDeckLinkInputCallback::VideoInputFrameArrived
method might not provide video frame and it can be null.
In that case, given stream_time can be invalid.
So, we should not try to convert GST_CLOCK_TIME_NONE
by using gst_clock_adjust_with_calibration()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2337>
Thibault Saunier [Mon, 14 Jun 2021 17:16:30 +0000 (13:16 -0400)]
transcoder: Fix usage of g_error_propagate
In the error callback we were propagating an error we were not owning
which is incorrect use of the API.
Also we were clearing a GError we already propagated which is wrong
as propagating gives ownership away.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2325>
Thibault Saunier [Mon, 14 Jun 2021 17:13:24 +0000 (13:13 -0400)]
transcoder: Add a missing object unlocking
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2325>
Stéphane Cerveau [Mon, 14 Jun 2021 13:07:05 +0000 (15:07 +0200)]
faad: fix typo in element documentation
seealso is now see_also
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2323>
Víctor Manuel Jáquez Leal [Thu, 17 Jun 2021 18:17:14 +0000 (20:17 +0200)]
tests: msdkh264dec: Run test only if factory is available.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2336>
Víctor Manuel Jáquez Leal [Thu, 17 Jun 2021 09:25:11 +0000 (11:25 +0200)]
msdk: Demote error log message to warning.
It is not an error that the available hardware doesn't support VA-API/MSDK. Just
none plugin features will be registered.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2336>
Seungha Yang [Sun, 20 Jun 2021 09:48:21 +0000 (18:48 +0900)]
libs: d3d11: Port to C++
In general, C++ COM APIs are slightly less verbose and more readable
than C APIs. And C++ supports some helper methods
(smart pointer and C++ only macros for example) which are not allowed for C.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2343>
U. Artie Eoff [Wed, 16 Jun 2021 17:23:37 +0000 (10:23 -0700)]
msdk: declare external dependencies
Track kernel and VA driver dependencies so gstreamer
will re-inspect the plugin if any of them change.
Also, do not blacklist the plugin if !msdk_is_available
since it could be a transient issue caused by one or
more external dependency issues (e.g. wrong/missing
driver specified, but corrected by user later on).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2335>
Seungha Yang [Wed, 16 Jun 2021 16:00:33 +0000 (01:00 +0900)]
h264parse,h265parse: Push parameter set NAL units again per segment-done
Some decoder implementations might drain out internal buffers and
reset its status on segment-done event. So, in case that
upstream stream-format is packetized but downstream supports only
byte-format, required codec-data might not be forwarded toward
downstream if such parameter set NAL units don't exist in inband
bitstream. Therefore, parse elements should re-send parameter set NAL
units like the case of flush event.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2334>
Nicolas Dufresne [Wed, 16 Jun 2021 14:31:13 +0000 (10:31 -0400)]
vp8decoder: Drain the output queue on EOS/finish
The finish() virtual method was flushing the queue, instead push the
remaining buffers. It is not required to reset in finish() unlike
drain(). This a regression causing last frame to always be lost.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2333>
Nicolas Dufresne [Wed, 16 Jun 2021 14:30:18 +0000 (10:30 -0400)]
v4l2slvp8dec: Only ask for output delay once per negotiation
While it's technically possible to change it per frame, asking for
that every frame is not very useful. This mimic H264 decoder better.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2333>
He Junyan [Wed, 16 Jun 2021 08:56:14 +0000 (16:56 +0800)]
va: Improve the default mapping between rt_format and video format.
We add 12 bits entries into this default mapping. And the old mapping
is not precise. For example, the NV12 should not be used as the default
mapping for VA_RT_FORMAT_YUV422 and VA_RT_FORMAT_YUV444, it is even not
a 422 or 444 format.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2332>
He Junyan [Wed, 16 Jun 2021 08:43:40 +0000 (16:43 +0800)]
va: Add 12 bits rt_format setting in H265.
In order to support 12 bits format decoding, we need to add the
support for 12 bits rt_format in H265.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2332>
He Junyan [Wed, 16 Jun 2021 08:32:30 +0000 (16:32 +0800)]
va: Fix a typo in video format mapping.
GST_VIDEO_FORMAT_Y412_LE is a 4:4:4 format and so should be mapped
to VA_RT_YUV444_12 rt format.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2332>
He Junyan [Tue, 15 Jun 2021 13:36:43 +0000 (21:36 +0800)]
h265parse: Fix a typo in get_compatible_profile_caps().
The GST_H265_PROFILE_MAIN_444_10 profile should be compatible with
GST_H265_PROFILE_SCREEN_EXTENDED_MAIN_444_10, not the current
GST_H265_PROFILE_SCREEN_EXTENDED_MAIN_10.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2328>
Randy Li (ayaka) [Tue, 15 Dec 2020 10:11:08 +0000 (18:11 +0800)]
waylandsink: prevent frame callback being released twice
For those using context from the application which
would be the embedded video case, if the frame callback
is entering at the same time as window is finalizing,
a wayland proxy object would be destroyed twice, leading
the refcout less than zero in the second time, it can
throw an abort() in wayland.
For those top window case, which as a directly connection
to the compositor, they can stop the message queue then
the frame callback won't happen at the same time as the
window is finalizing. It doesn't think it would bother
them about this.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1883>
Nicolas Dufresne [Mon, 14 Jun 2021 20:04:52 +0000 (16:04 -0400)]
alphadecodebin: Fix stall due to QoS
alphacombine element is a simple element that assumes buffers are always
paired, or at least that missing buffers are signalled with a GAP. The QoS
implementation in the GstVideoDecoder base class allow decoders dropping
frames independently and that could lead to stall in alphacombine.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2326>
Stéphane Cerveau [Tue, 2 Feb 2021 10:02:02 +0000 (11:02 +0100)]
jpeg2000parse, openjpeg: add support for YCrCb 4:1:1 sampling
Add YCrCb 4:1:1 support in openjpeg elements
and fix in jpeg2000parse the YCrCb 4:1:0 support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2321>