Commit graph

26121 commits

Author SHA1 Message Date
Seungha Yang 6c52008413 mfvideosrc: Expose sorted caps
Sort the list of supported caps for downstream to be able to select
the best image in terms of quality (resolution and framerate) by default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1452>
2020-07-22 18:11:18 +09:00
Seungha Yang c3ecea0aa4 mfvideosrc: Don't expose unsupported formats
Some UVC cameras support H.264 stream but we don't support it yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1452>
2020-07-22 18:10:57 +09:00
Víctor Manuel Jáquez Leal 30a588f31e docs: update plugins doc cache
Add va plugin

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1387>
2020-07-21 16:15:47 +00:00
Víctor Manuel Jáquez Leal 820bbc1bce va: documentation since tag
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1387>
2020-07-21 16:15:47 +00:00
Víctor Manuel Jáquez Leal 1ca39b571d vah264dec: add documentation caps for pad templates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1387>
2020-07-21 16:15:47 +00:00
Seungha Yang 2a0de96015 d3d11window: Disable d3d11 video processor for HDR10 stream.
d3d11 video processor is showing buggy behaviors in various cases.
And this HDR10 is one case of them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1454>
2020-07-21 15:41:20 +00:00
Seungha Yang d1af0b6386 codecs: h264decoder: Fix wrong annotations
What intended was GstH264Decoder actually.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1453>
2020-07-21 22:40:40 +09:00
Seungha Yang bf659379cf codecs: h264decoder: Update document with Since marks
To make documentation CI happy with the newly added APIs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1449>
2020-07-21 18:30:07 +09:00
Seungha Yang 973a2569d4 codecs: h264decoder: Rename API arguments
Although it's not public ones, make them consistent with vfunc
for them to be nicer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1449>
2020-07-21 17:53:29 +09:00
Nicolas Dufresne bb9fbf0626 v4l2codecs: h264dec: Use the new picture lookup
This will avoid having to create a reference chain from CodecFrame
to GstH264Picture to GstV4l2Request.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1449>
2020-07-21 17:18:42 +09:00
Nicolas Dufresne 6523c5bcb6 h264decoder: Add ability to lookup by system_frame_number
This is to avoid having to create a reference chain in decoders from
GstVideoCodecFrame to GstH264PIcture to implementation wrapper.

So this change introduces:

 - gst_h264_dpb_remove_outputed (dpb)
 - gst_h264_dpb_get_picture(dpb, system_frame_num)
 - gst_h264_decoder_get_picture (dec, system_frame_num)

In order to ensure that frames can be looked up during the draining
process, we now first remove all (including reference) frames that
have been outputed but are still in the DPB. Then for each remaining
buffers, we remove it from the DPB to reach reference 1 and output it.

Previously we could take all not outputed outside of the DPB which would
prevent lookup by the base class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1449>
2020-07-21 17:18:42 +09:00
Seungha Yang 82fb55bdff codecs: h264decoder: Make GstVideoCodecFrame hold the last reference of the buffer
... when gst_video_decoder_finish_frame() is called.

Some subclasses attach GstBuffer to GstH264Picture as an user data
which will increase reference count of the buffer. It would result
to buffer copy per every frame.

Background here is, GstVideoDecoder wants writable output buffer for
GstMeta handling, and if the output buffer is not writable
(i.e., reference count is not one), the buffer will be copied.
Even if underlying GstMemory wouldn't be copied, buffer copy operation
will introduce extra memory allocation overhead which is not optimal.

By this modification, subclass might be able to receive the last
reference to GstH264Picture

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1449>
2020-07-21 17:18:42 +09:00
Seungha Yang e921a07715 codecs: h264decoder: Pass GstVideoCodecFrame to output_picture()
All subclasses are retrieving list to get target output frame, which
can be done by baseclass. And pass the ownership of the GstH264Picture
to subclass so that subclass can clear implementation dependent resources
before finishing the frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1449>
2020-07-21 17:18:42 +09:00
Seungha Yang 7a024a740f codecs: h264decoder: Don't attach extra ref of GstH264Picture to GstVideoCodecFrame
The lifecycle of GstH264Picture is being managed by our DPB
implementation. If it's still required, subclass can do that
by itself in the new_picture() method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1449>
2020-07-21 17:18:42 +09:00
Seungha Yang 37aeb91d54 mfvideosrc: Don't error out when if we've found supported format
While retrieving supported formats by device, the last return might
not be S_OK in case that it's not supported one by us (e.g., H264, JPEG or so).
But if we've found at least one supported raw video format,
we can keep going on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1451>
2020-07-20 16:13:37 +00:00
Seungha Yang 14f6799f93 codecs: h264decoder: Drop non-decodable frames
Otherwise GstVideoDecoder baseclass will hold the corresponding broken frames
until new reset event happens such as FLUSH or downwards state change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1450>
2020-07-20 21:00:48 +09:00
Matthew Waters 597c1b4ec6 webrtc: remove private properties/signals from the now public ice object
We don't want to expose all of the webrtcbin internals to the world.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1444>
2020-07-20 15:56:20 +10:00
Seungha Yang c1093e3481 plugins: Use g_win32_error_message for HRESULT to string conversion
We don't need to duplicate a method for HRESULT error code to string
conversion. This patch is intended to
* Remove duplicated code
* Ensure FormatMessageW (Unicode version) and avoid FormatMessageA
  (ANSI version), as the ANSI format is not portable at all.
  Note that if "UNICODE" is not defined, FormatMessageA will be aliased
  as FormatMessage by default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1442>
2020-07-18 11:05:52 +09:00
Seungha Yang f68c8d853b wasapi2util: Fix wrong use of debug category
Haven't noticed so far since there is no debug statement in the source file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1445>
2020-07-17 15:58:16 +09:00
Ederson de Souza 51d5aee94d avtp: Update documentation
- Mention that a new capability is required by "avtpsink" element;
 - Use "clockselect" element to change pipeline clock, instead of a
   gst-launch option that never saw the light of day.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1443>
2020-07-16 13:32:56 -07:00
Silvio Lazzeretti 3803fa29b2 wasapi: added missing lock release in case of error in gst_wasapi_xxx_reset
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1440>
2020-07-15 20:11:48 +00:00
Damian Hobson-Garcia e6944da134 waylandsink: use GstMemory instead of GstBuffer for cache lookup
The GstMemory objects contained in a GstBuffer could be replaced
by an upstream element, which would break the association beteen
the GstBuffer and the wayland wl_buffer, make the cache lookup
results incorrect.
This patch changes the cache lookup to use the first GstMemory
in a buffer instead.  For multi-plane buffers, this assumes that
all of the GstMemory(s) will always be moved together as a set,
and that the same (first) GstMemory isn't used with different
combinations of other GstMemory(s).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1401>
2020-07-15 14:35:06 +00:00
Damian Hobson-Garcia ff5f264045 waylandsink: Keep per display wayland buffer caches
Instead of attaching a single wayland wl_buffer to each GStBuffer as qdata,
keep a separate cache for each display.
A unique wl_buffer and associated metadata is created for each display.
This allows for sharing of GstBuffer objects between multiple
displays, such as when using tee elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1401>
2020-07-15 14:35:06 +00:00
Nicolas Dufresne 7b3c101ced v4l2codecs: Enable 32x32 tiled NV12 support
This is used by Cedrus driver to support Allwinner VPU, also known as the
sunxi platforms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1437>
2020-07-15 13:24:13 +00:00
Tim-Philipp Müller 99a0615592 docs: update for new pixel formats
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/753
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/754

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1441>
2020-07-15 12:43:20 +01:00
Jordan Petridis 43736a7800 opencv: suppress another warning about non-existent include dirs
Ammend to 92456967d0 !1427

The .pc file of opencv4 seems to be broken

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1438>
2020-07-15 09:49:07 +00:00
Haihao Xiang e7160a97cf msdkh265enc: add the missing comma
Otherwise main-444 and main-444-10 are concatenated

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1436>
2020-07-15 08:38:07 +08:00
Nicolas Dufresne 2778fd7e31 doc: Updated cache file for the new pixel format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 17:06:59 -04:00
Nicolas Dufresne 782dc857e0 rtpsrc: Add domain name support
This add domain name resolution (similar to udpsrc does) to the rtpsrc
element.

Fixes 1352

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Nicolas Dufresne 19c632f4e8 ristsrc: Add support for domain name
This add domain name resolution (similar to udpsrc does) to the ristsrc
element.

Fixes 1352

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Nicolas Dufresne f6ac2e44bb rtpsrc: Always set rtcp socket address
Regardless if it's multicast or not, set the address property to match
the element address. This is the address of the interface to listen to,
which is expected to be ANY in most cases, but should be honnored even
for RTCP non-multicast case.

This also fixes an assertion if the address is not a parsable IPv4 or
IPv6 string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Nicolas Dufresne 82fe23f212 rtpsink: Fix error handling on bad DNS
This will properly print the DNS being attempted to resolved and avoid
trying to unref a NULL pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Nicolas Dufresne 89fbcc71d9 ristsink: Fix error handling on bad DNS
This will properly print the DNS being attempted to resolved and avoid
trying to unref a NULL pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Seungha Yang a43d6f6cd9 mfvideosrc: Enable WinRT capture impl. for desktop target
... if target OS version was specified as Windows 10.
When enabled, desktop application can select target capture
implementation between WinRT and Win32
via GST_USE_MF_WINRT_CAPTURE environment
(e,g., GST_USE_MF_WINRT_CAPTURE=1 for WinRT impl.).
Default is Win32 implementation in case of desktop target.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1434>
2020-07-14 16:59:06 +00:00
Seungha Yang 2d71ad49f8 h265parser: Fix possible invalid memory access
... and do more strict validation for num_tile_columns_minus1 and
num_tile_rows_minus1.

As per specification Table A.8, allowed maximum number of tile rows
and tile columns are 22 and 20, respectively. So we should adjust the size
of each array.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1372>
2020-07-14 16:34:46 +00:00
Seungha Yang 495ed45d05 d3d11decoder: Disable zero-copy for Qualcomm devices
Qualcomm driver looks buggy in zero-copy scenario. Even if we disable
zero-copy, device-to-device memory copy will be used with d3d11videosink
which should be fast enough.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1432>
2020-07-12 01:40:45 +09:00
Haihao Xiang c0e809d6b8 msdkh265enc: add support for screen content coding extension
Because the valid input formats for screen content coding extension is
a subset of input formats for range extension, user must specify the
profile for screen content coding extension in the caps filter

Example:
gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12 ! msdkh265enc
low-power=1 ! video/x-h265,profile=screen-extended-main ! fakesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1389>
2020-07-11 23:42:52 +08:00
Haihao Xiang e1d1cb07a6 msdkh265enc: allow user to choose profile
Example:
gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12 ! msdkh265enc !
video/x-h265,profile=main-444 ! fakesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1389>
2020-07-11 23:42:52 +08:00
Haihao Xiang 55f3590317 msdkenc: support tune property in msdkh264enc and msdkh265enc
Introduce a new property for encoding mode selection, the default value
for this new property allows the SDK to decide what to do. In addition,
low-power is marked as deprecated since this fix

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1426>
2020-07-11 13:57:52 +00:00
Haihao Xiang 3ecb2a82be Revert "msdkh265enc: let MSDK select the encoding mode by default"
This reverts commit 9e977832c1.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1426>
2020-07-11 13:57:52 +00:00
Tim-Philipp Müller 395ecb3d2f avtp: rename tstamp-mode to timestamp-mode
I thnk w cn spre the xtra lttrs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1397>
2020-07-11 00:14:44 +01:00
Mathieu Duponchelle 13376f88fe basetsmux: make use of gst_aggregator_finish_buffer_list
Fixes #1276

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1429>
2020-07-10 20:12:11 +00:00
Tim-Philipp Müller 510e8ef8cb docs: fix element names in section headers
Hopefully that'll make hotdoc pick up the docs for these elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1428>
2020-07-10 19:22:29 +00:00
Tim-Philipp Müller 92456967d0 opencv: suppress warnings about non-existent include dirs
Looks like opencv4 ships with a broken .pc file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1427>
2020-07-10 14:57:44 +01:00
Tim-Philipp Müller e86a549b5d docs: fix up for errorignore convert-error signal removal
The commit that added that was reverted. Need to remove this
from docs cache manually.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1422>
2020-07-08 23:50:35 +01:00
Seungha Yang ad8529caf7 d3d11: Disable D3D11Debug and DXGIDebug layer for UWP build
WACK (Windows App Certification Kit) doesn't seem to be happy with
the DXGIGetDebugInterface1 symbol.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1421>
2020-07-08 21:11:31 +00:00
Tim-Philipp Müller 5247e2319c meson: set release date from .doap file for releases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1420>
2020-07-08 19:14:24 +00:00
Vivia Nikolaidou bf38898af8 cccombiner: Update segment according to video sink pad
Otherwise the following pipeline would preroll after 1000 hours:
gst-launch-1.0 videotestsrc ! x264enc ! cccombiner ! fakesink silent=0 sync=1 -v

Fixes #1355

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1419>
2020-07-08 17:11:38 +00:00
Andreas Frisch 0e075b4dbf mpegtsmux: Don't assume English for ISO-639 language descriptor
Previously, "en" (should have actually been "eng") was assumed
for the ISO-639 language descriptor if no language was explicitely given.
Neither ETSI EN 300 468 nor ATSC A/52 mandate for a language descriptor,
so we should simply not set it, if it's unknown.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1386>
2020-07-08 13:37:12 +00:00
Jan Schmidt 46cc64e09f mpegtsmux: Fix handling of MPEG-2 AAC
The audio/mpeg,mpegversion=2 caps in GStreamer refer to
MPEG-2 AAC (ISO 13818-7), not to the extended MP3 (ISO 13818-3),
which is audio/mpeg,mpegversion=1,mpegaudioversion=2/3

Fix the caps, and add handling for MPEG-2 AAC in both ADTS and raw
form, adding ADTS headers for the latter.
2020-07-08 12:24:13 +00:00