Nicolas Dufresne
4402a8044f
fakesinks: Fix recursive notify loop
...
The proxy callback for the notify::last-message was emiting the signal
again on the child, which caused an infinit loop. We could swap the child
and the user data to signal to the bin instead, but it was found that proxying
this signal was not very useful. Typical use case it to set silent=0 and use
deep-notify feature. Proxying that signal just duplicate that output which
isn't very useful.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4766 >
2023-06-13 23:33:08 +00:00
Nicolas Dufresne
5f2a664415
v4l2codecs: h265: Set num_delta_pocs_of_ref_rps_idx
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4413 >
2023-06-13 14:34:45 +00:00
Nicolas Dufresne
6a7835e106
v4l2codecs: Extend the API with num_delta_pocs_of_ref_rps_idx
...
This value is an alternative to short_term_ref_pic_set_size and can be used
to parse the RPS portion of a slice header, instead of skipping over it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4413 >
2023-06-13 14:34:45 +00:00
Seungha Yang
e422a991f3
h265decoder: Calculate DPB size based on level
...
As specified in "A.4 Tiers and levels", calculate DPB size based
on level in order to avoid over preallocated DPB
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4840 >
2023-06-13 02:57:06 +00:00
Jan Alexander Steffens (heftig)
6e9d67bbc1
mpegtsmux: Use terminological ISO 639-2 language codes
...
These are preferred in most circumstances.
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2649
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4795 >
2023-06-12 08:51:10 +00:00
Seungha Yang
ebd5ff73be
d3d11convert: Add support for premultiplied alpha conversion
...
Adding "src-alpha-mode" and "dest-alpha-mode" properties
to support alpha mode conversion
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4825 >
2023-06-10 18:12:58 +00:00
Seungha Yang
80878a6ea4
d3d11testsrc: Add "alpha" and "alpha-mode" properties
...
Adding global alpha and alpha mode options
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4825 >
2023-06-10 18:12:58 +00:00
Seungha Yang
cb28a16007
d3d11overlaycompositor: Handle premultiplied alpha in pixel shader
...
Do premultiplied -> straight alpha conversion using GPU
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4825 >
2023-06-10 18:12:58 +00:00
Seungha Yang
15735a4ef3
d3d11converter: Add support for premultiplied alpha
...
Adding "src-alpha-mode" and "dest-alpha-mode" properties
and performs premultiplied alpha conversion if needed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4825 >
2023-06-10 18:12:58 +00:00
Seungha Yang
1aa9e74aaf
cudadownload: Always download CUDA memory if it's bound to decoder
...
Decoder bounded CUDA memory is allocated by driver and the pool size
is fixed. Since we don't know how many buffers would be held by
downstream non-CUDA element, we should download such CUDA memory
and release it back to decoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4810 >
2023-06-08 22:27:06 +00:00
Víctor Manuel Jáquez Leal
8dff9d5ad0
doc: use gir file if dependency is not available
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4781 >
2023-06-08 08:50:05 +00:00
Víctor Manuel Jáquez Leal
94250e8c31
msdk: remove libva check before 1.12
...
Since gstmsdk depends on gstva library it also bumps the required version.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4781 >
2023-06-08 08:50:05 +00:00
Víctor Manuel Jáquez Leal
53860147c6
va: bump libva version to 1.12
...
Remove all checks in gstva for all version lower than 1.12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4781 >
2023-06-08 08:50:04 +00:00
Seungha Yang
8a4642cad7
win32ipc: Use gst_util_get_timestamp()
...
Instead of duplicating the same code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4794 >
2023-06-08 01:02:45 +00:00
Seungha Yang
3c5684e085
d3d11: Use gst_util_get_timestamp()
...
instead of duplicating the same code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4794 >
2023-06-08 01:02:45 +00:00
Vivia Nikolaidou
0e62bb2ba6
basetsmux: Fix language crash when ts_pad->stream is NULL
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4785 >
2023-06-07 16:58:38 +00:00
Vivia Nikolaidou
0a331402d6
tsdemux: Detect language from ac3 descriptor
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4709 >
2023-06-07 13:04:03 +00:00
Seungha Yang
4d6a2dea89
d3d11ipcsrc: Stop asynchronously in case of io-mode=import
...
In case of import mode, d3d11ipcsrc does not know when outputted
memories will be released.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4774 >
2023-06-06 17:54:44 +00:00
Seungha Yang
ef1853aa8d
d3d11ipc: Use unnamed shareable handle
...
Exchanging HANDLE would have smaller overhead than string
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4774 >
2023-06-06 17:54:44 +00:00
Seungha Yang
1e5343f0c6
d3d11memory: Add support for resource sharing via NT handle
...
Adding gst_d3d11_memory_get_nt_handle() method so that GstD3D11Memory
can hold shareable NT handle and for easy reuse of it
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4774 >
2023-06-06 17:54:44 +00:00
Seungha Yang
aada49c6a6
d3d11ipcsink: Don't clear prepared sample on render
...
render() can be called multiple times for the same prepared sample
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4774 >
2023-06-06 17:54:44 +00:00
Sebastian Dröge
f1e7ac13cd
decklink: Implement Windows string conversion with common API between MinGW and MSVC
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4738 >
2023-06-06 06:21:46 +00:00
Sebastian Dröge
ab582a3b7d
decklink: Add some newlines in long defines
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4738 >
2023-06-06 06:21:46 +00:00
Maksym Khomenko
72e7ae724f
decklink: Calculate string size before malloc
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4738 >
2023-06-06 06:21:46 +00:00
Sebastian Dröge
ab946cd41e
decklink: Use the macOS version of the SDK on macOS and not the Linux one
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4738 >
2023-06-06 06:21:46 +00:00
Sebastian Dröge
a2850bcb88
decklink: Free SDK strings after usage on Linux
...
While they're const char* they still need to be freed like on Windows
and macOS and would be leaked otherwise.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4738 >
2023-06-06 06:21:46 +00:00
Sebastian Dröge
59ca9ef342
decklink: Correctly handle SDK strings on macOS
...
They're CFStringRef* and not plain NUL-terminated char* C strings.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4738 >
2023-06-06 06:21:46 +00:00
Aaron Boxer
e624e7c695
onnxobjectdetector: gracefully handle Ort exceptions rather than dumping core
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4765 >
2023-06-05 17:47:58 +00:00
Víctor Manuel Jáquez Leal
e074cb55f7
va: remove unused parameters in internal function
...
gst_va_buffer_surface_new() don't use neither format, width nor height.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4768 >
2023-06-04 19:16:53 +02:00
Matthew Waters
c3af29db1e
build/android: remove all references to gnustl
...
Not needed anymore with NDK R25.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4747 >
2023-06-03 23:21:34 +00:00
Seungha Yang
e4c43db5d5
d3d11basefilter: Forward video related metas if needed
...
The same as in GstVideoFilter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4751 >
2023-06-02 00:33:52 +00:00
Michael Grzeschik
ea2764aa69
uvcsink: add probe handling for live pipelines
...
Currently the uvcsink is only capable to run in an application
that is handling the state transitions of the pipeline properly
by checking on streaming event from the uvcsink.
This code is improving the element by adding an fakesink to
consume possible videostream flow in case the pipeline state
is not changing on hosts streamoff.
This is helpfull when using local gst-launch pipelines where
the streaming event is not monitored to change the pipelines
state.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304 >
2023-06-01 19:19:05 +00:00
Michael Grzeschik
5d82deb2c5
uvcsink: add new bin element around v4l2sink
...
This patch adds an element to stream video data to an uvc video gadget.
The element handles the uvc events STREAMON, STREAMOFF, SETUP and DATA.
to start, stop and configure the video buffer flow by the use of pad
probes. It works with linux kernels of versions higher than v6.1.
The element makes use of the v4l2sink proxy property v4l2sink::device
to locate the corresponding device to parse the configfs for additional
data.
The code in uvc.c is basically derived from /lib/uvc.c in
https://git.ideasonboard.org/uvc-gadget.git .
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304 >
2023-06-01 19:19:05 +00:00
Michael Grzeschik
6ef14df09b
uvcsink: configfs.{c,h}: add helper function to parse by videodev
...
- add helper function video_find_config_name
- add helper function configfs_parse_uvc_videodev
With these helper functions it is possible to parse the
configfs entry corresponding to the used videodev.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304 >
2023-06-01 19:19:05 +00:00
Michael Grzeschik
079fc8216c
uvcsink: configfs.c: use G_N_ELEMENTS instead of ARRAY_SIZE
...
We don't have ARRAY_SIZE in glib.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304 >
2023-06-01 19:19:05 +00:00
Michael Grzeschik
fd3a6ce642
uvcsink: configfs.c: fix globing in uvc_video_device
...
The gadget in the sysfs can be postfixed with an index.
Fix the globbing by adding a wildcard after /gadget*/.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304 >
2023-06-01 19:19:05 +00:00
Michael Grzeschik
38aa1fc414
uvcsink: configfs.c: refactor location of GUID formats
...
- move GUID handling to beginning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304 >
2023-06-01 19:19:05 +00:00
Michael Grzeschik
da61d8f96d
uvcsink: configfs.{c,h}: add parsing of more fields from format
...
- add parsing of dwMaxVideoFrameBufferSize
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304 >
2023-06-01 19:19:05 +00:00
Michael Grzeschik
e50dcac517
uvcsink: configfs.c: fix code for local usage
...
- use local header file and remove unused reference to tools.h
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304 >
2023-06-01 19:19:05 +00:00
Michael Grzeschik
42c53f971c
uvcsink: add configfs.{c,h} from https://git.ideasonboard.org/uvc-gadget.git
...
- imported both files and run gst-indent on them
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304 >
2023-06-01 19:19:04 +00:00
Vivia Nikolaidou
395e0c3925
tsmux: Resend PMT whenever the language changes
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4711 >
2023-06-01 17:05:11 +00:00
Víctor Manuel Jáquez Leal
06d793033d
vulkan/format: use basic features (v1) as fallback
...
if vkGetPhysicalDeviceFormatProperties2 isn't available.
This approach assumes that, for basic features flags symbols,
VkFormatFeatureFlagBits and VkFormatFeatureFlagBits2 are binary equivalent.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4746 >
2023-06-01 13:58:47 +00:00
Matthew Waters
0a74a967e3
vulkan/format: don't rely on vulkan header version for function availability
...
e.g. android will have update vulkan.h headers but old platforms will
not contain the function and will result in a link error.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4746 >
2023-06-01 13:58:47 +00:00
Arun Raghavan
d5755744c3
webrtcdsp: Update code for webrtc-audio-processing-1
...
Updated API usage appropriately, and now we have a versioned package to
track breaking vs. non-breaking updates.
Deprecates a number of properties (and we have to plug in our own values
for related enums which are now gone):
* echo-suprression-level
* experimental-agc
* extended-filter
* delay-agnostic
* voice-detection-frame-size-ms
* voice-detection-likelihood
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2943 >
2023-06-01 09:34:37 +00:00
Mathieu Duponchelle
211928ca41
webrtc/nice: put usage of OPTION_CONSENT_FRESHNESS behind check
...
See https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/257
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4750 >
2023-06-01 00:42:28 +00:00
Thibault Saunier
4a4d7821a5
cudabasetransform: Handle video related meta as appropriate
...
This implements the same logic as GstVideoFilter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4731 >
2023-05-31 20:09:42 +00:00
Thibault Saunier
8d3f90eb8d
cuda: memory: Enhance debug when CU_GL_DEVICE_LIST_ALL fails
...
Ensuring error from cuda is logged
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4731 >
2023-05-31 20:09:42 +00:00
Colin Kinloch
82c449ce00
waylandsink: Emit "map" signal boarder surface is ready
...
This allows gtkwaylandsink to queue a draw of its gtk widget at the
correct time, avoiding a race.
Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4722 >
2023-05-31 18:57:56 +00:00
Stéphane Cerveau
5873747a59
tools: add bad/ges/omx tools to gst_tools
...
In static mode, these tools must be built
after the gstreamer-full library to use
the symbol gst_init_static_plugins.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4128 >
2023-05-31 15:17:11 +00:00
Stéphane Cerveau
dd17beb681
gstreamer-full: add full static support
...
Allow a project to use gstreamer-full as a static library
and link to create a binary without dependencies.
Introduce the option 'gst-full-target-type' to
select the build type, dynamic(default) or static.
In gstreamer-full/static build configuration gstreamer (gst.c)
needs the symbol gst_init_static_plugins which is defined
in gstreamer-full.
All the tests and examples are linking with gstreamer but the
symbol gst_init_static_plugins is only defined in the gstreamer-full
library. gstreamer-full can not be built first as it needs to know what plugins
will be built.
One option would be to build all the examples and tests after
gstreamer-full as the tools.
Disable tools build in subprojects too as it will be built at the end of
build process.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4128 >
2023-05-31 15:17:11 +00:00
Jan Alexander Steffens (heftig)
4008b872bb
fdkaacdec: Support up to 5 rear channels
...
The `switch (n_rear)` supports up to 5 rear channels, but our channel
set only had space for 3. Size the set properly to fix this.
This didn't actually cause any memory unsafety as `PUSH_CHAN` would stop
incrementing `n_rear` if the channel set is already full.
Thanks to @alatiera for noticing this.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4712 >
2023-05-30 14:18:08 +02:00
Mengkejiergeli Ba
a15a16c99b
msdkenc: Add a property to insert pic timing SEI for avc and hevc
...
User can decide whether to insert pic timing sei with pic_struct
syntax via oneVPL API mfxExtCodingOption.PicTimingSEI.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4673 >
2023-05-29 02:11:20 +00:00
Jordan Petridis
6032f51162
openjpegenc: do not set bpp field on opj_image_cmptparm_t
...
It's deprecated in favor of the .prec field which we already set.
https://github.com/uclouvain/openjpeg/pull/1383/
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4715 >
2023-05-26 20:24:27 +00:00
Víctor Manuel Jáquez Leal
8b75e5fb57
vkvideoutils: fix code-style
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716 >
2023-05-26 10:08:27 +02:00
Víctor Manuel Jáquez Leal
b982fae9c7
tests: check if vulkan h264 decoding is supported
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716 >
2023-05-26 10:08:27 +02:00
Víctor Manuel Jáquez Leal
365454790a
vkphysicaldevice: fetch queue family query result support
...
And merged in a single structure the queue family operations report.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716 >
2023-05-26 10:08:27 +02:00
Víctor Manuel Jáquez Leal
e2a40c58bf
vkimagebufferpool: chain the correct structure
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716 >
2023-05-26 09:45:07 +02:00
Víctor Manuel Jáquez Leal
e9414b9582
vkvideoutils: fix bug for chroma string comparison
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716 >
2023-05-26 09:45:07 +02:00
Seungha Yang
8e1677bd6a
d3d11videosink: Fix error on pause and play
...
The show_frame() can be called without prepare() call on paused to
playing state change. Thus the prepared buffer should not be cleared
on show_frame()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4700 >
2023-05-25 13:24:43 +00:00
Vivia Nikolaidou
1781b26ad2
tsmux.h: Remove TSMUX_MAX_ES_INFO_LENGTH dead code
...
Also TsMux.es_info_buf which was also not used anywhere
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681 >
2023-05-23 14:00:11 +00:00
Vivia Nikolaidou
9e84b737cb
tsmux: Separate DVB and ATSC AC3 descriptors
...
The previous code was ATSC-specific. Separated it into gstatscmux.c and
added the DVB-specific one from ETSI EN 300 468 V1.11.1 (2010-04)
https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.11.01_60/en_300468v011101p.pdf
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681 >
2023-05-23 14:00:11 +00:00
Vivia Nikolaidou
866d5d87c4
tsmux: Refactor AC3 descriptor to use GstByteWriter
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681 >
2023-05-23 14:00:11 +00:00
Vivia Nikolaidou
637e263504
tsmux: Parse bitrate from tags into the stream
...
Instead of parsing a hardcoded zero and always writing the highest
limit.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681 >
2023-05-23 14:00:11 +00:00
Vivia Nikolaidou
7a98a4214b
tsmux: Fix 0x81 descriptor for AC3 streams
...
According to ATSCA/52:2018
https://prdatsc.wpenginepowered.com/wp-content/uploads/2021/04/A52-2018.pdf
Used wireshark as ground truth for detection/parsing.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681 >
2023-05-23 14:00:11 +00:00
Ruben Gonzalez
059965fe53
doc: Fix newline char between authors
...
Found running `gst-inspect-1.0 -a |& grep -v ":" | grep @`
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4682 >
2023-05-20 05:48:23 +00:00
Seungha Yang
f435d192e1
d3d11videosink: Don't use CS_OWNDC style
...
It's completely unnecessary since we never use
the device context (e.g., BeginPaint() or GetDC() never called).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4684 >
2023-05-20 03:16:47 +00:00
Shengqi Yu
b092c3f580
h264parse: adjust some logs printing level in h264parse
...
adjust log level from GST_ERROR to GST_WARNING when h264 caps have
codec_data but no avc format or have no codec data or stream-format.
Because theses are not real errors, it is easy to mislead if print error
logs.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4675 >
2023-05-20 02:07:36 +00:00
Thibault Saunier
6dff93acf6
testsrcbin: Remove spurious caps unref
...
Caps are cleared at the end of the function
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2575
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4668 >
2023-05-19 22:00:39 +00:00
Ma, Mingyang
a2e83a019a
msdkdec: Fix decoding cases with resolution change (VP9)
...
The resolution of VP9 video can be changed without keyframe.
The change detected by MSDK/VPL should be negotiated with downstream.
Only the situation can be fixed here if the changed resolution is less than or equal to the initial surface resolution.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4450 >
2023-05-19 05:51:36 +00:00
Víctor Manuel Jáquez Leal
8670a023f1
vkimagebufferpool: prepare new allocated buffers
...
This means change initial memory undefined layout and access to the ones
required for their usage.
This is only used if VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME is available.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:30 +00:00
Víctor Manuel Jáquez Leal
7c9d88d586
vkdownload: input memories may not match output memories
...
Split the iterations, one for images and another for buffers, while first
barrier on images, and later in buffers after copy.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:30 +00:00
Víctor Manuel Jáquez Leal
e177080bec
vulkan: number of memories in buffer rather than number of planes
...
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 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
565fe3291e
vkutils: add gst_vulkan_get_or_create_image_view_with_info()
...
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 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
bb29b4dfec
vkdevice: enable device optional extensions
...
Enable before-hand what the user might use.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
00189bf8f3
tests: vkimagebufferpool and format mapping
...
This test will create a pool for VkImageMemory for decoding and others usages.
And a test for the new Vulkan format mapping.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
d7bbcffe14
vkformat: add VK_FORMAT_G8_B8R8_2PLANE_420_UNORM
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
b1321f78d3
vkswapper: use gst_vulkan_format_to_video_format()
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
d84926b60f
vkformat: add gst_vulkan_format_to_video_format()
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
ce7256e0d3
vulkan: use gst_vulkan_format_get_aspect()
...
In order to use it, without depending in a previous calling of
_create_info_from_args(), VkFormat as input parameter to
gst_vulkan_image_memory_init() was added.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
b8e908131d
vkformat: add gst_vulkan_format_get_aspect()
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
26d00ba0cc
vkimagebufferpool: fail if image cannot be allocated
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
d91c17264c
vkimagebufferpool: gst_vulkan_image_buffer_pool_config_set_decode_caps()
...
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 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
07271fc648
vkvideoutils: add gst_vulkan_video_profile_{to/from}_caps()
...
Add this new source file with utils for video profile mapping with GstCaps.
These method is used to pass this information along GStreamer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
c7c5dedd7f
vkimagebufferpool: use gst_vulkan_image_memory_alloc_with_image_info()
...
As the pool will be only used for images with usage
VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR only one layer has to be allocated.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
83e73a2f59
vulkan: find memory type index with requirements
...
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 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
4dd0fd6797
vkimagebufferpool: use gst_vulkan_format_from_video_info_2()
...
To get the number of images and its Vulkan formats for the GStreamer format.
Also it gets the basic image usage by default if it's not defined. It fails if the
video format is not supported.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
35dbd9f92c
vkformat: add gst_vulkan_format_from_video_info_2()
...
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 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
14dd6aac16
vkformat: move gst_vulkan_format_from_video_info()
...
Moved gst_vulkan_format_from_video_info() from gstvkimagememory to gstvkformat
in order to centralize the video format operations in a single source file.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
b1c166b53c
vkimagebufferpool: pass usage and memory properties
...
Pass, in config structure, usage and memory properties, assigning proper
defaults if they aren't set. This parameters are used in image memory
allocation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
7b62c26139
vkdevice: add gst_vulkan_device_queue_family_indices()
...
This method will return a GArray with all the queue family indices created by
the device when it's opened. This array will be used by VkImageCreateInfo to
allocate a new Vulkan image.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
ea2bd1882f
vkdevice: add programming parameters verification
...
To `gst_vulkan_device_foreach_queue()`.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
1e2ff519c6
vkbuffermemory: add gst_vulkan_buffer_memory_alloc_with_buffer_info()
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
64ba7fb2eb
vkimagememory: gst_vulkan_image_memory_alloc_with_image_info()
...
This new method instead of passing a bunch of variables which will fill
`VkImageCreateInfo`, the method accepts this whole structure, so the caller can
customize it as much as they want.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
5f5249cf73
vkimagememory: look up for Vulkan format using a static table
...
Replace the switch structure with explicit and extendable static table.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
1458c31031
vkdevice: enable multiple queues per device
...
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 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
25140499fc
vkdevice: enable features from physical device
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:29 +00:00
Víctor Manuel Jáquez Leal
9e807b58a0
vkphysicaldevice: add gst_vulkan_physical_device_get_features()
...
gst_vulkan_physical_device_get_features() is a private function to access to the
available features in the device.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:28 +00:00
Víctor Manuel Jáquez Leal
83160fb47c
vkphysicaldevice: fetch queue family video codec operations
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:28 +00:00
Víctor Manuel Jáquez Leal
dde60fab37
vkdebug: add video queue flags strings
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351 >
2023-05-19 04:26:28 +00:00
Víctor Manuel Jáquez Leal
d03df074f7
vulkan: detect vulkan video extensions
...
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 >
2023-05-19 04:26:28 +00:00