1954 Commits

Author SHA1 Message Date
Seungha Yang
fc73216671 d3d12swapchainsink: Fix force-aspect-ratio change in playing state
Set output updated flag so that viewport can be calculated again

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9392>
2025-07-14 17:07:35 +00:00
Piotr Brzeziński
c43d3900bf vtenc: Fix negotiation failure with profile=main-422-10
Previous version passed just enough data to the parser to detect
main/main-10, but main-422-10 is one of the range extensions profiles.
Those need a few more bits to be accurately detected, and since those
were just uinitialized memory previously, we'd incorrectly end up with
main or main-10 when the encoder was in fact giving us 4:2:2 10bit
output.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9348>
2025-07-10 08:04:45 +00:00
Doug Nazar
50a6f31902 decklink: Fix a memory leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9151>
2025-07-08 09:05:29 +00:00
Seungha Yang
feedb9a769 hipmemorycopy: Use stream associated with buffer
... instead of global device stream. memory object might hold
different stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9281>
2025-07-07 14:39:54 +00:00
Seungha Yang
c1f023baaf hipconverter: Avoid unnecessary sync
If input and output buffers are running on the same stream,
record event instead of sync

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9281>
2025-07-07 14:39:54 +00:00
Seungha Yang
7d259c4224 hipmemory: Allow lazy sync
Store recorded hip event and wait for sync later if needed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9281>
2025-07-07 14:39:54 +00:00
Seungha Yang
e9d96fd4e7 hip: Add GstHipEvent object
hip event handle wrapper object

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9281>
2025-07-07 14:39:54 +00:00
Seungha Yang
ad942d2627 hip: Use non-default stream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9281>
2025-07-07 14:39:54 +00:00
Seungha Yang
b465694957 hip: Add GstHipStream object
Adding hip stream abstraction layer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9281>
2025-07-07 14:39:53 +00:00
Seungha Yang
239a679fbf d3d12screencapture: Add support for monitor add/remove in device provider
Update device list on WM_DISPLAYCHANGE event

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4521
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9330>
2025-07-04 18:47:58 +00:00
Seungha Yang
7c4b87cc33 wasapi2: Fix various MinGW build warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9307>
2025-07-02 18:18:18 +00:00
Seungha Yang
df45c088ad waapi2: Remove unused WinRT deps and implementations
Removing unused WinRT API based implementations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9307>
2025-07-02 18:18:18 +00:00
Seungha Yang
0b3108cb3c wasapi2: Port to IMMDevice based device selection
Because of a couple of issues reported related to WinRT device
enumeration, porting to IMMDevice device id based device selection.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4311
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3936
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9307>
2025-07-02 18:18:18 +00:00
Seungha Yang
ba41200c96 wasapi2: Implement IMMDeviceEnumerator based enumerator
... and merge wasapi2{capture,render}deviceprovider into single
wasapi2deviceprovider since we can enumerate input/output audio
devices at once using IMMDeviceEnumerator

This is a preparation for complete porting to Win32 API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9307>
2025-07-02 18:18:18 +00:00
James Cowgill
ea08b70946 v4l2codecs: Use prop_offset in gst_v4l2_decoder_install_properties
Install properties at the given offset as intended instead of at 0.

Currently there are no elements with any properties, so this has no
effect. This change is needed if any element adds properties in the
future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9179>
2025-07-02 15:24:45 +00:00
Nicolas Dufresne
5e2a4a6d13 v4l2codecs: h265dec: Fail when frame cropping is needed while using DMABuf
It is not possible to do frame cropping when DMABuf caps feature is negotiated.
The VideoInfo size is zero, resulting in empty destination buffers, and video
convert library may not understand what the format actually is.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9305>
2025-06-30 21:17:16 +00:00
Nicolas Dufresne
e7be87b3de v4l2codecs: h265dec: Avoid cropping for zero top/left alignments
If the conformance window does not requires cropping the top or left of the
window, we can use GstVideoMeta to crop in a zero-copy fashion. If a copy
is needed, the frame copy can also handle it, and is a lot faster.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9305>
2025-06-30 21:17:16 +00:00
Nicolas Dufresne
0fbd76dd50 v4l2codecs: dec: Remove has_videometa member
Now that the code is properly located, this member is not needed
anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9305>
2025-06-30 21:17:16 +00:00
Nicolas Dufresne
c7b0b9a816 v4l2codecs: dec: Move copy_frames logic inside decide_allocation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9305>
2025-06-30 21:17:15 +00:00
Johan Sternerup
af63e991ec hip: Add missing #ifdef
So that it compiles without gstreamer-gl.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9289>
2025-06-26 11:37:30 +00:00
Seungha Yang
e3d0a8d83e d3d12screencapturesrc: Fix OS handle leaks/random crash in WGC mode
Multiple DispatcherQueues per thread seems to be causing OS handle leak
and random crashes were observed. Instead of creating
thread/DispatcherQueue per GstD3D12GraphicsCapture object,
reuse only single thread and DispatcherQueue

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4351
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9153>
2025-06-25 14:30:56 +00:00
Seungha Yang
67031a508c hip: Add plugin docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8923>
2025-06-25 01:17:27 +09:00
Seungha Yang
1d6ae8791d hip: Add hipcompositor element
Feature-wise it's the same as cudacompositor

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8923>
2025-06-25 00:15:55 +09:00
Seungha Yang
2b0f4705a5 hip: Load memset symbols
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8923>
2025-06-25 00:15:55 +09:00
Seungha Yang
be3d7b6f13 hipmemorycopy: Add support for GL interop
Enable memory copy between HIP and GL

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8923>
2025-06-25 00:15:55 +09:00
Seungha Yang
baa9bc9d95 hip: Add GstHipGraphicsResource object
hipGraphicsResource_t wrapper object for graphics api interop

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8923>
2025-06-25 00:15:55 +09:00
Seungha Yang
04fb36b2f9 hip: Load GL interop related symbols
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8923>
2025-06-25 00:15:55 +09:00
Seungha Yang
ecaab82f11 hip: Pass GPU arch to kernel compile option args
Pass current GPU arch to compile option instead of relying on auto
detection

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8923>
2025-06-25 00:15:55 +09:00
Seungha Yang
fc8f7c349b hip: Add support for NVIDIA kernel precompile
... with "hip-nvidia-precompile" and "hip-nvcc-arch" build options

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8923>
2025-06-25 00:15:55 +09:00
Seungha Yang
eb925e4212 hip: Add support for AMD kerenl precompile
Adding "hip-amd-precompile" build option. If enabled, AMD kernels
will be precompiled at build time. Also "hip-hipcc-arch" build option
(corresponding to --offload-arch hipcc option) is added
so that user can specify target GPU arch instead of auto-detection by hipcc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8923>
2025-06-25 00:15:55 +09:00
Seungha Yang
d26755f4d4 hip: Add support for memory copy between GstCuda and GstHip
Handle CUDA <-> HIP memory copy in hipupload and hipdownload elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8923>
2025-06-25 00:15:55 +09:00
Seungha Yang
7254e812ac hip: Add support for NVIDIA
Adding HIP <-> CUDA translation layer like the HIP SDK does
but uses dlopen() for CUDA as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8923>
2025-06-25 00:15:55 +09:00
Seungha Yang
24b93f2c41 hip: Remove build-time SDK dependency
Use dlopen at runtime

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8923>
2025-06-25 00:15:55 +09:00
Seungha Yang
0f9ce9de90 hip: Add AMD HIP plugin
Adding hipupload, hipdownload, and hipconvert family elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8923>
2025-06-25 00:15:55 +09:00
Matthew Waters
f7ad5cb570 decklink/clock: remove clock_offset
It is completely unused and only ever initialized to 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9267>
2025-06-23 08:25:57 +00:00
Matthew Waters
cae2b38614 decklink: calculate internal using values closer to the current clock times
In a previous version of the clock time conversion code, scheduled playback used
to be started (from 0) when transitioning to PLAYING and stopped when
transitioning PLAYING->PAUSED. This worked fine when converting running times
using the internal clock.  However, now the decklink clock will produce values
that are monotonically increasing and do not reset to 0 at the same moments as
running time anymore. This means that the clock adjustments could attempt to
convert a small running time based on a large clock time e.g. after pausing
for many hours. As the adjustment code is a simple linear interpolation based on
the current clock times (large) using the provided value (small), the small
differences in the rate could result in very large differences in the
output time.

Fix by instead using both internal and external clock times based on the values
that gst_clock_get_calibration() will return. By doing so, small changes in the
rate calculations between the internal and external clock times will not result
in potentially large differences in the output internal time from
gst_clock_unadjust_with_calibration().

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4197

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9267>
2025-06-23 08:25:57 +00:00
Nirbheek Chauhan
a8d9bfdcf2 amc: Overhaul hw-accelerated video codecs detection
Android 10 (API 29) added support for isHardwareAccelerated() to
MediaCodecInfo to detect whether a particular MediaCodec is backed by
hardware or not. We can now use that to ensure that the video hw-codec
is PRIMARY+1 on Android, since using a software codec for video is
simply not feasible most of the time.

If we're not able to detect isHardwareAccelerated(), perhaps because
the Android API version is too old, we try to use the codec name as
a fallback.

Also rank PRIMARY+1 the c2.android c2.exynos and c2.amlogic audio
codecs alongside OMX.google, because they are known-good.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9225>
2025-06-19 11:36:40 +00:00
Nirbheek Chauhan
fb04ef5be3 amc: Log under GST_FIXME for audio encoders
We don't support audio encoders yet, so log that correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9225>
2025-06-19 11:36:40 +00:00
Nirbheek Chauhan
966d8ec279 amc: Improve codec registration logging
Most of the messages can be printed with INFO threshold since they are
only printed on plugin registration.

Fix printing of codec caps, since GST_PTR_FORMAT truncates the output
in almost every case that I saw.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9225>
2025-06-19 11:36:40 +00:00
Nirbheek Chauhan
b8c9884674 amc: Print error messages when registering plugins
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9225>
2025-06-19 11:36:40 +00:00
Seungha Yang
c5fd61c908 d3d12swapchainsink: Add uv-remap and redraw action signal
New uv-remap signal can be used for UV coordinate remap operation
in videosink, and redraw signal can allow updating view even in paused
state

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9209>
2025-06-17 22:18:32 +00:00
Stéphane Cerveau
59eaf4cc39 parser: fix spelling of GstAV1SegmentationParams
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8795>
2025-06-17 21:07:13 +00:00
Matthew Waters
01d41b5d59 decklinkvideosink: show preroll frame correctly
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4254

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9199>
2025-06-17 10:50:54 +00:00
Seungha Yang
4d2869d4a3 d3d11decoder: Use interlace info in input caps
... instead of relying on only parsed values from bitstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9170>
2025-06-04 16:07:24 +00:00
Seungha Yang
4735e765a3 d3d12decoder: Use interlace info in input caps
... instead of relying on only parsed values from bitstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9170>
2025-06-04 16:07:24 +00:00
Seungha Yang
712203163e nvdec: Use interlace info in input caps
... instead of relying on only parsed values from bitstream.
Also parses HEVC specific interlace information

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9170>
2025-06-04 16:07:24 +00:00
Seungha Yang
6efe987d5c d3d11compositor: Fix negative position handling
Negative positions should be cropped out

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9158>
2025-06-01 18:21:28 +00:00
Seungha Yang
aa0c257d4c d3d12compositor: Fix negative position handling
Negative positions should be cropped out

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4249
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9158>
2025-06-01 18:21:28 +00:00
Seungha Yang
343cde7f87 d3d12compositor: Fix critical warnings
compositor will record rendering commands using multiple threads
(i.e., blending commands are recoded using thread pool, and
background one is recorded on aggregate thread).
And there can be temporary refcount increase (so not writable).
Updates fence once all rendering commands have been submitted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9157>
2025-06-01 23:02:33 +09:00
Seungha Yang
d5dfa3ef5e d3d12screencapturesrc: Fix desktop handle leak
Calling CloseDesktop() on a handle that is currently in use will fail.
Close the handle after current desktop handle change

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9136>
2025-05-29 17:19:33 +00:00