Commit graph

625 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal d463feaa08 vaencoder: Honor entrypoint at constructor.
The entrypoint is set when the encoder helper is constructed,
nonetheless it was also passed as parameter when opening. That's
buggy.

In order to simplify the code, the entrypoint at construction is
honored.

But gst_va_encoder_has_profile_and_entrypoint() now doesn't rely in
the internal list of profiles since it only contains those that
belongs to codec and entrypoint, thus it queries directly the VA
driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal 79c47fbdb8 vabaseenc: Scope error bail out.
Though this is not enforced by the GStreamer code style, it's clearer
to add a nested scope for error handling using label/goto.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal d608872ba3 vabaseenc: Use class entrypoint.
Add a macro to access to class entrypoint and use it instead of move
it to a variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
2022-10-26 08:19:32 +00:00
Seungha Yang 722f097b9d nvcodec: Update for documentation
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
  properties
* Fix some typos
* Add since markers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 7ce3fccf25 mediafoundation: Update for documentation
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
  properties
* Add doc caps
* Add since markers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 9d926ae8b1 mfvideoencoder: Document only hardware encoders
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang e9415aafb5 mfvideoencoder: Fix device enumeration
Although a GPU does not support the codec, the other GPU might
be able to support the codec

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang d92c43cb0f amfcodec: Update for documentation
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
  properties
* Add doc caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 4038a486a0 qsv: Use GST_PARAM_DOC_SHOW_DEFAULT flag
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 6974b6f6ff d3d11: Update for documentation
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
  properties
* Add doc caps
* Increase deinterlace max resolution

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 31be056b6e d3d11: Run indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 1ec4905e92 wic: Add since marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 92fd435a25 directshow: Add since marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 23261bccbb qsv: Enable MinGW toolchain support
Use PCRE regex method to work around (likely) GCC std::regex bug,
and enable building for non-MSVC

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3239>
2022-10-24 10:53:40 +00:00
Seungha Yang 426535f3a6 d3d11screencapture: Add WinRT API based capture mode
Add Windows Graphics Capture (WGC) API based screen capture mode.
The conditions where this mode is used:
* Explicitly requested by user (capture-api property)
* To capture specific window
* When DXGI desktop duplication API does not work on hybrid graphics systems
  (e.g., multi-gpu laptop)

Full features of this implementation require Windows 11. And Windows 11
SDK is required to build this feature.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3144>
2022-10-21 14:21:28 +00:00
Seungha Yang 087e335006 d3d11screencapture: Subclassing capture implementation
Preparation to use WinRT capture API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3144>
2022-10-21 14:21:28 +00:00
Seungha Yang dcd3f210a0 qsv: Add plugin doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2738>
2022-10-21 21:29:25 +09:00
Seungha Yang 2b3f690355 qsv: Update SDK version to v2022.2.4
See release note
https://github.com/oneapi-src/oneVPL/releases/tag/v2022.2.0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2738>
2022-10-21 21:29:25 +09:00
Seungha Yang 573a0489f6 d3d11videosink: Add "emit-present" property
Controls the decision for "present" signal use, and
allows delayed "present" signal handler install via the property

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3176>
2022-10-18 21:19:01 +00:00
Seungha Yang cb7958e710 wasapi2: Add support for process loopback capture
Adding loopback capture mode for specified PID.

Note that this feature requires Windows 10 build 20348
(Windows 11/Windows Server 2022 or later),
and any process loopback related properties will not be exposed
if OS does not support it.

Example launch lines:
* wasapi2src loopback-mode=include-process-tree loopback-target-pid=<PID>
 Captures audio generated by an application (specified by PID)
 and its child process
* wasapi2src loopback-mode=exclude-process-tree loopback-target-pid=<PID>
 Captures desktop audio excluding PID and its child process

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1278
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3195>
2022-10-17 23:28:48 +00:00
Piotr Brzeziński 1e70525bc9 avfvideosrc: Allow specifying crop coordinates during screen capture
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3153>
2022-10-12 21:19:31 +00:00
Wojciech Kapsa b618ff3369 decklink: reset calculation of gst_decklink_video_src_update_time_mapping on no_signal. When the HDMI cable was disconnected for a long time, the calculation took too much time. SDI cable works fine.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3132>
2022-10-10 08:13:30 +00:00
Wojciech Kapsa 505f48f237 decklink: Add new persistent-id property and sort devices by persistent ID
The order of the devices iterator from the SDK is undefined and can
randomly change.

Keep the device-number property for backwards compatibility and
simplicity but prefer the persistent-id property and also use it for the
device provider implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3078>
2022-10-06 15:50:11 +00:00
Stéphane Cerveau fb09c028e3 h265parse: fix typo in member of GstH265SPS
Rename sps_extnsion_params to sps_extension_params

Fix comment about vui_parameters_present_flag

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3072>
2022-10-04 10:01:12 +00:00
Christopher Obbard 0c83ddcdf7 v4l2codecs: Warn user when no media devices are found
Currently if the user is not able to access the devices under /dev/media*,
either due to no media devices present on the system or simply no permission
to access the device, v4l2codecs initialises with no features or debug messages.

Since calling `GST_DEBUG="v4l2*:7" gst-inspect-1.0 v4l2codecs` is a typical way
to diagnose why element(s) failed to enumerate, we should be more verbose here
when the user is not able to access any /dev/media* device. So print a simple
debug message in this case to aid debugging.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3088>
2022-09-29 19:12:14 +00:00
Víctor Manuel Jáquez Leal f9371ccc38 vabaseenc: Move out encoder validation from assertion.
Assertion can be disabled at compilation time. Still it's important to
validate it the encoder object was opened by the subclass. This patch
removes the assertion and returns if the encoder is open.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3051>
2022-09-20 18:59:18 +00:00
Mengkejiergeli Ba 03a24de4cb msdkav1enc: We should not set other alignment here
According to spec, we have 32bit alignment for height (progressive) and
16bit alignment for width, so here we don't need to add other alignment
settings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3050>
2022-09-20 16:25:15 +08:00
He Junyan cf2581953b va: h264enc: Fix rate control enum register failure for the second GPU.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3041>
2022-09-19 09:24:36 +00:00
Víctor Manuel Jáquez Leal a8387fdc6b vah264enc: Avoid precision lost by just rounding up.
The code where dividing by 16 and later multiplying by 16, which is
spurious and a potential loose of precision.
2022-09-17 10:14:40 +02:00
Víctor Manuel Jáquez Leal 69c75f9827 vah264enc: Update AUD property if driver can't handle raw data. 2022-09-17 10:10:19 +02:00
Víctor Manuel Jáquez Leal 42861617d5 vah264enc: Remove unused dispose method. 2022-09-17 10:04:51 +02:00
Eric Knapp f720a5dd66 vadeinterlace: Fix passthrough latency query
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3038>
2022-09-17 05:47:41 +00:00
Seungha Yang b6ca76eb68 nvh265sldec: Sync up with d3d11h265dec implementation
Each RefPicSetStCurrBefore/RefPicSetStCurrAfter/RefPicSetLtCurr array
might have empty element (i.e., reference pictures might not be stored
sequentially). Don't error out for the empty element case,
but instead, iterates each array and fill NVDEC's reference list
as much as possible

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1441
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3039>
2022-09-16 20:25:23 +00:00
Víctor Manuel Jáquez Leal f4260ecdc5 va: baseenc: Fix gobject style for chained method.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3035>
2022-09-16 19:10:12 +00:00
He Junyan 9a991cfe9e va: av1dec: user internal buffer pool for non output layers.
The AV1 support multi spatial layers within one TU with different
resolutions, and only the highest spatial layer need to be output.
For example, there are two spatial layer, base level is 800x600
and higher level is 1920x1080. We need to decode both because the
higher level needs base layer as reference, but we only need to output
1920x1080 frames here.

The current manner always renegotiates the caps once we detect the
current picture resolution changes, so we renegotiate again and
again between different layers. That's a big waste and has very
low performance. We now only do the renegotiation for the highest
output layer. For other non output layers, we just keep a internal
buffer pool which is big enough to handle the surface allocation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2382>
2022-09-16 09:45:00 +00:00
Thibault Saunier 339e5916c6 Build documentation for rust plugins
- Update the docker image we use, starting using the standard one adding
  `gtk4-doc` as required by rust plugins
- Update the plugins_doc_caches as required, some more plugins are built
  with the new image
- Install ninja from pip as the version from F31 is too old
- Avoid buildings all GSreamer plugins when building the doc as it takes
  time and resources for no good reason
- Stop linking to `GInstanceInitFunc` as it is not present in latest GLib
  documentation, leading to warnings in hotdoc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2954>
2022-09-15 20:11:47 +00:00
Seungha Yang c91d72e677 nvdec: Fix for HEVC decoding when coded resolution is larger than display resolution
As documented in the SDK header, we should set coded width/height
values to the corresponding decoder configuration option,
instead of display resolution

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1438
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3022>
2022-09-14 05:59:20 +09:00
Seungha Yang ca47012a55 cudaupload,cudadownload: Fix document
* Fix typo, NVIDA -> NVIDIA
* Add cudadownload doc to the source file

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3018>
2022-09-13 16:40:51 +00:00
Seungha Yang 7ea3c55549 cudaupload,cudadownload: Use shared GstD3D11Device context if possible
Handle d3d11 device context in set_context() method with
additional device compatibility check so that only NVIDIA GPU
associated d3d11 device can be configured in the element.
And clear old d3d11 device per set_info() for d3d11 device to be
updated as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3018>
2022-09-13 16:40:51 +00:00
Víctor Manuel Jáquez Leal e4f6ade308 va: Complete library and plugin documentation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1025>
2022-09-13 14:57:21 +02:00
Víctor Manuel Jáquez Leal a51ac72b5e va: Move gstvavideoformat out of library headers.
Since it's no needed for API consumers. Though it can be added later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1025>
2022-09-13 14:57:21 +02:00
Víctor Manuel Jáquez Leal 1c69fe3fc8 vajpegdec: Enhance explanation comment.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2948>
2022-09-07 05:57:40 +00:00
Víctor Manuel Jáquez Leal 230e1e6bb4 va: caps: Use G_STMT_START / END
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2948>
2022-09-07 05:57:40 +00:00
Víctor Manuel Jáquez Leal 44fe871534 vajpegdec: Check if driver has internal color conversion.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2948>
2022-09-07 05:57:40 +00:00
Florian Zwoch a1b60be22b va: Fix log message when registering H264 encoder.
The log message would report an error for the H264 decoder when
registering failed, but we tried to register the H264 encoder instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2974>
2022-09-02 10:29:11 +00:00
Mengkejiergeli Ba da9479a034 msdkvpp: Add va memory when fixating src caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Mengkejiergeli Ba bb79853d20 msdkvpp : Use va pool at linux path and system pool for windows
We use msdkvpp's own pool to allocate buffers instead of external frame
allocator mfxFrameAllocator.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Mengkejiergeli Ba 4c6b719445 msdkvpp: Import buffer to msdk_surface
If the buffer is not msdk_buffer, we can try to directly import the
attached memory (i.e. va mem and dmabuf mem) by applying the common
uitl function: import_to_msdk_function ().

Here add a flag "from_qdata" in GstMsdkSurface to handle the cropping case,
we should avoid updating the crop values when msdk_surface is from the
memory's qdata, because the crop info from this surface is the already
updated one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Mengkejiergeli Ba 45819899c3 msdkvpp: Add va caps at sink and src pad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Mengkejiergeli Ba 966a2c3754 msdkenc: Apply common util func to import mem as msdk_surface
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00