Commit graph

3531 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
0f8f2d0057 vkformat: add gst_vulkan_format_get_map function
This will be used later to compare the format selected by
gst_vulkan_format_from_video_info_2(), to verify if it's multiple memory buffer
or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 20:28:04 +02:00
Víctor Manuel Jáquez Leal
17f3a22130 vulkanupload: request storage usage for bufferpool
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 10:52:19 +02:00
Víctor Manuel Jáquez Leal
2d17bba6f1 vkimagebufferpool: define a default usage
Define a default usage and use it instead of repeating the same bitwise
addition.

Therefore, when usage is defined as zero, the usage is defined with the
format's supported usage and the default usage, now without the storage
bit, but with color and input attachment bits.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 10:52:19 +02:00
Víctor Manuel Jáquez Leal
b1eebec485 vkformat: unward G8_B8R8_2PLANE_420_UNORM
Since it exists since VK_VERSION_1_1. It should be ignored by usage flags or the
no_multiplane parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 10:52:19 +02:00
Robert Mader
abf3361de3 waylandsink: Fix surface cropping for rotated streams
The wp_viewport source rectangle is applied in surface-local coordinates
after buffer_transform and buffer_scale. Therefore we need to swap width
and height for 90/270 deg. rotations.

This fixes playback of rotated videos such as portrait videos from
mobile devices.

See also: https://wayland.app/protocols/viewporter#wp_viewport

Fixes: 0b648f9a2d ("waylandsink: Crop surfaces to their display width height")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7136>
2024-07-10 17:13:54 +00:00
Ruben Gonzalez
1c238aaa37 vkh265dec: Fix H.264 ref in logs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7146>
2024-07-08 15:30:45 +02:00
Seungha Yang
e692bf0fb9 d3d12memorycopy: Enhance d3d12 to d3d11 copy
If a d3d12 memory holds non-direct-queue fence but the fence was
created with D3D12_FENCE_FLAG_SHARED flag, use the fence instead of
waiting for fence at CPU side. Note that d3d12ipcsrc or
d3d12screencapture elements will hold such sharable fence.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7139>
2024-07-08 09:57:04 +00:00
Nirbheek Chauhan
0b9ec1b657 applemedia: Disable some deprecation errors
This needs significant work to use the new Metal→Vulkan integration
extension `VK_EXT_metal_objects`

```
MoltenVK/mvk_deprecated_api.h:132:1: note: 'vkGetMTLDeviceMVK' has been explicitly marked deprecated here
MVK_DEPRECATED_USE_MTL_OBJS
^
MoltenVK/mvk_deprecated_api.h:74:52: note: expanded from macro 'MVK_DEPRECATED_USE_MTL_OBJS'
 #define MVK_DEPRECATED_USE_MTL_OBJS   VKAPI_ATTR [[deprecated("Use the VK_EXT_metal_objects extension instead.")]]
                                                    ^
../sys/applemedia/videotexturecache-vulkan.mm:303:20: error: 'vkSetMTLTextureMVK' is deprecated:
Use the VK_EXT_metal_objects extension instead.
    VkResult err = vkSetMTLTextureMVK (memory->vulkan_mem.image, texture);
                   ^
MoltenVK/mvk_deprecated_api.h:151:1: note: 'vkSetMTLTextureMVK' has been explicitly marked deprecated here
MVK_DEPRECATED_USE_MTL_OBJS
^
MoltenVK/mvk_deprecated_api.h:74:52: note: expanded from macro 'MVK_DEPRECATED_USE_MTL_OBJS'
 #define MVK_DEPRECATED_USE_MTL_OBJS   VKAPI_ATTR [[deprecated("Use the VK_EXT_metal_objects extension instead.")]]
                                                    ^
2 errors generated.
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
8619e163bf vk-video: Fix uint64_t string format errors
With clang on macOS:

```
error: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long')
...
error: format specifies type 'unsigned long' but the argument has type 'VkImageView' (aka 'unsigned long long')
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
156a016313 meson: Find MoltenVK with the objc++ compiler everywhere
When building for iOS in Cerbero, as of MoltenVK SDK 1.3.283, we have
to statically link to libMoltenVK since it no longer ships a dylib.
This requires linking to libc++, so we find the dep with the objc++
compiler to ensure that meson uses the right linker.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
adedac6bd9 meson: Fix some confusing code in applemedia's build file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
4293719206 meson: Fix vulkan automagic in applemedia plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
5ed3e045d8 meson: Fix vulkan library build on iOS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
5c41d387e3 meson: Use / instead of join_paths for vulkan
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
54a6643986 meson: Fix automagic dependency checks in gstvulkan
Windowing, in particular, was getting silently disabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Taruntej Kanakamalla
f54320b161 lc3: remove bitstream comparison in the tests
since the encoded output is changing based on version
it does not make sense to check the output bitstream with a fixed
bytearray since the version in the target might vary. So sticking
to checking the number of output buffers and encoded frame size
similar to the other tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7141>
2024-07-05 18:27:20 +05:30
Víctor Manuel Jáquez Leal
426616cca7 vavpp: simplify gst_va_vpp_transform_caps()
The code is simplified by using GQuarks for looking for caps features, and
removing inner loops.

Also, it's used the pad template caps to compare with the incoming caps because
is cheaper at the beginning of negotiation, where the pad template caps is used.
And, since the ANY caps where removed, there's no need to check for an initial
intersection.

Finally, the completion of caps features is done through a loop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6698>
2024-07-04 08:54:16 +00:00
He Junyan
f235e0308d vadeinterlace: Do not append ANY caps into pad template
Just like the vapostproc, we delete the ANY caps in pad template to
avoid unexpected negotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6698>
2024-07-04 08:54:15 +00:00
He Junyan
38a4224c8c vapostproc: Do not append ANY caps into pad template
The ANY caps in pad template caps seems to mess up the DMA negotiation.
The command of:

GST_GL_API=opengl gst-launch-1.0 -vf videotestsrc ! video/x-raw,format=NV12 !
  vapostproc ! "video/x-raw(memory:DMABuf)" ! glimagesink

fails to negotiate, but in fact, the vapostproc can convert the input NV12
formant into the RGBA format to render.

The ANY may help the passthough mode, but we should make the negotiate correct
first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6698>
2024-07-04 08:54:15 +00:00
Lim, Siew Hoon
e82eb628b1 vacompositor: Initialize the allocation related variables in decide_allocation()
Prevent garbage value has been pass thru and causing
pipeline fail to run later on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7097>
2024-07-04 06:48:46 +00:00
Lim, Siew Hoon
f498ba25da vabasedec: Initialize the allocation related variables in decide_allocation()
Prevent garbage value has been pass thru and causing
pipeline fail to run.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7097>
2024-07-04 06:48:45 +00:00
Lim, Siew Hoon
c270c5643d vabasetranform: Initialize the allocation related variables in decide_allocation()
Prevent garbage value has been pass thru and causing
pipeline fail to run.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7097>
2024-07-04 06:48:45 +00:00
He Junyan
e9801cb0a5 vah265enc: Set the trellis only when HW supports it
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6663>
2024-07-04 05:59:07 +00:00
He Junyan
2049c7e050 vah264enc: Init missing fields in reset_state()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6663>
2024-07-04 05:59:06 +00:00
He Junyan
5706e3566c vah264enc: Set the trellis only when HW supports it
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6663>
2024-07-04 05:59:06 +00:00
He Junyan
5b27aff33b va: baseenc: Set the trellis parameter anyway
The driver may enable trellis by default. So we should also set the
trellis info to driver even when the trellis option is turned off.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6663>
2024-07-04 05:59:06 +00:00
jadarve
fd25409a70 doc: fix Since marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:22 +00:00
jadarve
3323245606 mpegts: Added missing function prototype
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
5c3f3d8f16 doc: fix docstrings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
14c4d62915 doc: fix single line Since comments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
7f35a4f7c3 doc: fix Since marker for gst_mpegts_descriptor_from_metadata_pointer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
fad36407bb doc: update docstrings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
c12a861fb7 doc: update plugin cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
728c83f74d mpegtsmux: mux meta/x-id3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
0a57f361ce mpegts: use GstMpegtsMetadataApplicationFormat in metadata descriptor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
992a35b8f9 mpegts: added metadata pointer descriptor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
669a351c78 mpegts: moved metadata descriptors to gstmpegtsdescriptor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:20 +00:00
Chris Spoelstra
0f7bb97e81 srtsrc: fix case fallthrough of authentication param
Add missing breaks to two case statements.
Also adds a missing lock of srtobject->element when getting the value
of PROP_AUTHENTICATION.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4367>
2024-07-02 16:49:32 +02:00
Seungha Yang
c0a02affa4 d3d12: Add support for resource copy between d3d11 and d3d12
If driver can support cross-api resource sharing, use device-to-device
resource copy in d3d12upload/download elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7119>
2024-07-01 20:18:42 +00:00
Seungha Yang
6cac053549 d3d12bufferpool: Use shared heap by default
... to make cross-api resource sharing possible

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7119>
2024-07-01 20:18:42 +00:00
Sebastian Dröge
f8fb72b0d7 ajasrc: Drop some frames after signal recovery
After signal recovery the capture times for the next frames are simply
wrong. Experimentally this affected 2-3 frames and seemed to be related
to the buffer fill level after signal recovery, so drop at least 5
frames and up to fill level + 1 frames in this situation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7106>
2024-07-01 11:37:08 +00:00
Sebastian Dröge
63dec7c704 ajasrc: Reset clock after signal loss or signal change
Otherwise timestamps would continue as if there was no gap, and the next
frames until the clock has compensated would be all too late.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7106>
2024-07-01 11:37:08 +00:00
Thibault Saunier
5f50b93f0a meson: Remove duplicated library definitions for gstmse and gstanalytics
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7109>
2024-06-30 15:43:27 +00:00
Seungha Yang
c2531853fc d3d12commandallocatorpool: Remove unused methods
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7108>
2024-06-29 20:47:39 +09:00
Seungha Yang
c013e88295 d3d12decoder: Use sub-allocated bitstream buffer
Since a buffer resource will occupy at least 64KB,
allocating upload resource per decoding command might not be
an optimal approach. Instead, use sub-region of a upload resource
for multiple decoding command if sub-regions are not overlapped
each other.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7108>
2024-06-29 20:47:39 +09:00
Guillaume Desmottes
037d36f28d rtmp2: guard against calling gst_amf_node_get_type() with NULL
gst_amf_node_get_type() raises a CRITICAL if called with a NULL node.
All callers were checking for this except those.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7103>
2024-06-28 07:18:29 +00:00
Xavier Claessens
84b3a0950d build: Add missing common options that are yielding in subprojects
- Align `glib_debug`, `glib_assert` and `glib_checks` options with GLib,
  otherwise glib subproject won't inherit their value. Previous names
  and values are preserved using Meson's deprecation mechanism.
- Add `extra-checks` and `benchmarks` options in the main project so it
  can be inherited in GStreamer subprojects.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1165>
2024-06-27 15:53:46 +00:00
He Junyan
77f779e86a vaav1enc: Move repeat header data to a dedicated buffer
When enable parallel encoding, it is possible that the unshown frame
is not output but it is already be marked as a repeated frame header.
So we need to use a dedicated buffer to hold the repeat frame header,
don't mix it with the orignal frame data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6867>
2024-06-27 12:48:37 +00:00
Seungha Yang
76fd732d42 qsv: Check d3d shared resource tier using D3D11 API
We can check the tier using d3d11 API. Thus, don't need to
create d3d12 device

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7099>
2024-06-26 16:25:06 +00:00
Jan Schmidt
73480e60d0 adaptivedemux: Fix handling closed caption streams
Fix a typo "CLOSED_CAPTION" -> "CLOSED-CAPTION" and
a broken if statement that always bailed out for
closed captions

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6985>
2024-06-26 13:44:27 +00:00