New vulkan formats don't match the number of planes with the number of memories
attached to the buffer. This patch changes the pattern of using planes for
traverse the memories with the number of attached memories.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351>
It's a generalization of the original gst_vulkan_get_or_create_image_view().
The reason for passing the whole VkImageViewCreateInfo structure rather than
just the missing fields, is because VkImageSubresourceRange and
VkComponentMapping can be different and those are most of VkImageViewCreateInfo.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351>
This is going to be used when the pool is used by a video decoder for
VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, since the frame allocation needs the
VkVideoProfileInfoKHR, and for that here GstCaps is used to wire it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351>
The specification says:
VUID-vkAllocateMemory-pAllocateInfo-01713
must pAllocateInfo->allocationSize be less than or equal to
VkPhysicalDeviceMemoryProperties::memoryHeaps[memindex].size where memindex =
VkPhysicalDeviceMemoryProperties::memoryTypes[pAllocateInfo->memoryTypeIndex].heapIndex
as returned by vkGetPhysicalDeviceMemoryProperties for the VkPhysicalDevice that
device was created from.
Though this can be catch by the validation layer, the requested frame size
depends on the use case so it's better to check this restriction by our code.
This patch also makes use of this new function to find memory type index,
and removes the unused function to find memory type index, which, as GstVulkan is
considered unstable, we can do it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351>
The purpose of this function is to get more info about the mapped Vulkan format
from the GStreamer format, since they can be multiple Vulkan formats for one
GStreamer format.
Also a Vulkan format may have certain usage and aspects that must be verified.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351>
Originally the opened device only created one queue of one family queue, to say
graphics one. This approach felt short when other queue family is required not
shared with the graphics queue family, for example video decoding.
This new approach proposes to create those queues with supported families. For
now, only video decoding and encoder are created, if they are available.
In order to hold multiple queues opened, an array of VkDeviceQueueCreateInfo is
held along the live the device object, because it's used to traverse or get the
opened queues.
The algorithm to choose which queues create (or open) is to look for the queue
with more family bits, which also supports the one we are requesting, thus
minimizing the number of global queues of a certain family to create.
Nonetheless, the number of queues to open per family is set to be all of them,
widening the possibility of parallelism.
Also, this commit do a cosmetic refactor the assigning the physical device
nearer where it's used.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351>
Also adds a meson option to enable them.
The symbol GST_VULKAN_HAVE_VIDEO_EXTENSIONS is an alias of
defined(VK_VERSION_1_4) || (defined(VK_VERSION_1_3) && VK_HEADER_VERSION >= 238
if the option is allowed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351>
max-qp and min-qp will set the same quantizer scale for I/P/B frames,
while max-qp-i/p/b and min-qp-i/p/b enable the max/min quantizer for I,P,B
frame separately. When max/min-qp and max/min-qp-i/p/b are given
simultaneously, the later set one will overide the previous one.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4589>
when play rtsp stream with playbin3 enabled, there are some critical logs:
g_object_get_is_valid_property: object class 'GstPlayBin3' has no property named 'n-video'
g_object_get_is_valid_property: object class 'GstPlayBin3' has no property named 'n-audio'
g_object_get_is_valid_property: object class 'GstPlayBin3' has no property named 'n-text'
self->collection could be NULL when READY->PAUSED if the pipeline
is live, then it will fallback to query playbin2's property,
we can call gst_play_streams_info_create_from_collection
directly, it will check self->collection internal.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4460>
The devices list returned by g_udev_client_query_by_subsystem() may
contain udev devices in disorder path name. For example, on some
platform it may contain renderD129 before renderD128 device. This
will cause we register wrong va plugin name. In this case, the
renderD129 will be registered as default plugins such as vah265dec,
while the renderD128 will be registered as varenderD128h265dec.
This conflicts with the non-udev version of gst_va_device_find_devices().
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4643>