Damian Hobson-Garcia
dd8ef3ec1b
waylandsink: Move buffer commits to the display thread
...
Syncrhonizing buffer commits to the streaming thread can lead to
dropped frames when frame callbacks are not processed before the
next frame is ready for rendering. Depending on the drift between
the wayland compositor and buffer source timings, this can lead to
periods of significant frame drop, especially when the media frame
rate is close to the display frame rate.
Cache buffers in the streaming thread and peform commits on the
display thread to eliminate the buffer commit racing.
The implementation is the same for both waylandsink and gtkwaylandsink,
so move it to the common wayland library under gst-lib.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6133 >
2024-02-27 17:20:42 +00:00
Damian Hobson-Garcia
612ee3b591
wayland: Add API to ref/unref current GstBuffer inside a GstWlBuffer
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6133 >
2024-02-27 17:20:42 +00:00
Damian Hobson-Garcia
1b3bb334eb
wayland: Add synchronized requests to WlDisplay
...
Add synchonized versions of wl_display_sync() and wl_callback_destroy()
that will ensure that to callbacks can be managed in a thread safe way
on the display queue even when they are dispatched from a separate
thread.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6133 >
2024-02-27 17:20:42 +00:00
naglis
476a34cfdb
gstplay: Fix typos in documentation
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6177 >
2024-02-23 00:35:58 +00:00
ekwange
0cbb396ab9
mse: Add logging init for mediasource sample map
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6033 >
2024-02-21 18:11:25 +00:00
Edward Hervey
62b9049d20
mpegst: Fix ownership of return value
...
This inherits from the same rule as gst_buffer_add_meta
```
gst-mpegtspesmetadatameta.h:98: Warning: GstMpegts:
gst_buffer_add_mpegts_pes_metadata_meta: return value: Invalid non-constant
return of bare structure or union; register as boxed type or (skip)
```
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6146 >
2024-02-20 11:33:33 +02:00
Edward Hervey
d26194db0e
libgstplay: Use playbin3 by default
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6120 >
2024-02-15 09:00:45 +01:00
Seungha Yang
d98c922995
h265decoder: Fix DPB size calculation
...
MaxDpbSize specified in A.4.2 tells upper bound of decoded picture
buffer size but does not tell actual required size.
Use max_dec_pic_buffering value as a dpb size. Some backends
such as DXVA and NVDEC might require pre-allocated DPB buffer
and unnecessary large DPB size will result in waste of GPU memory.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6101 >
2024-02-14 15:05:59 +00:00
Víctor Manuel Jáquez Leal
2011dec249
vulkan/decoder: fix documentation generation
...
GstVulkanDecoderParameters is an union, not a struct, and that isn't handled by
hotdoc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6089 >
2024-02-10 17:17:23 +00:00
Víctor Manuel Jáquez Leal
f0c5a853a6
vulkan/decoder: don't initialize function table once
...
Since it has to be associated with the device and it gets destroyed when the
decoder is freed.
Now it's created when the decoder starts and it's flagged.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6089 >
2024-02-10 17:17:23 +00:00
Seungha Yang
b3a29b61c5
dxvavp8decoder: Fix reference frame setting
...
Fixing typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6088 >
2024-02-10 21:18:44 +09:00
Sebastian Dröge
77a09c1781
analytics: Allow getting a related meta with ANY type
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6068 >
2024-02-07 14:07:52 +00:00
Tim-Philipp Müller
f1940077a2
codecparsers: av1bitwriter: fix Since marker
...
... and add them to the symbol index to make hotdoc happy
2024-02-06 16:37:13 +00:00
Tim-Philipp Müller
6651bb3ed8
codecparsers: document new GstH265Level and GstH264Level enums
...
... and add them to the symbol index to make hotdoc happy.
2024-02-06 16:37:13 +00:00
Tim-Philipp Müller
b9b249be48
va: fix g-i annotation
...
This parameter annotation is unknown :[allow-null-none] None
2024-02-06 16:37:12 +00:00
sergey radionov
ebc51e3253
nice: resolve result should go to nice helper thread
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5921 >
2024-02-06 09:12:13 +00:00
Olivier Crête
351f823704
analytics: Always return a string from mtd_type_get_name()
...
It makes it easier to use in printf() style strings without worrying
about getting a NULL.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6035 >
2024-02-02 15:49:56 +00:00
Daniel Morin
8122f623f6
analytics: Change indexes type from i32 -> gsize
...
- gst_analytics_cls_mtd_get_length() return a gsize, this type dicated index
type for gst_analytics_cls_mtd_get_quark() and
gst_analytics_cls_mtd_get_level().
- Minor cleanup/improvement on index validation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6018 >
2024-01-31 15:22:43 +00:00
Daniel Morin
42227d7de3
analytics: add api on OD to retrieve bbox confidence
...
- Add a specific api to retrieve bbox confidence level without having to
retrieve it's location.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6017 >
2024-01-31 14:40:56 +00:00
Seungha Yang
51162acc31
cuda: Report device open error
...
Call gst_cuda_result() with CUDA_ERROR_NO_DEVICE error code if
we could not open device, so that application can catch the error
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6006 >
2024-01-30 14:30:41 +00:00
Seungha Yang
cd6d62ddf0
cuda: Use cuStreamDestroy_v2 API
...
Sync up with CUDA 11.x/12.0 header
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6006 >
2024-01-30 14:30:41 +00:00
Víctor Manuel Jáquez Leal
c760c72f7a
vkformat: fetch correctly feature flags2
...
Feature flags2 are fetch through VkFormatProperties3KHR and needs more guards
checking.
Moved out all the feature flags fetching to another function for clarity.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6014 >
2024-01-30 12:57:41 +00:00
Víctor Manuel Jáquez Leal
c24b47ecee
vkformat: use VK_KHR_get_physical_device_properties2 to guard
...
and VK_KHR_format_feature_flags2 rather than a meaningless version handling.
Also the patch brings back the usage of features2 for video extensions, use KHR
version to support the guarded symbols.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6014 >
2024-01-30 12:57:41 +00:00
Víctor Manuel Jáquez Leal
394aaa6a59
vulkan: early return if gst_buffer_pool_set_config() fails
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6013 >
2024-01-30 11:58:04 +00:00
He Junyan
040042113e
codecparsers: Implement the AV1 bit code writer
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3015 >
2024-01-30 08:24:25 +00:00
He Junyan
e1d96d0669
codecparsers: av1: add ref_global_motion_params in frame header
...
In order to ease the AV1 bit writer to write the global_motion_params
when primary_ref_frame is enabled, we need to add this field to set
the global_motion_params of the reference frame.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3015 >
2024-01-30 08:24:25 +00:00
He Junyan
14a5d936f8
codecparsers: av1: add expected_frame_id in frame header
...
We need it to ease the bit code writing of AV1 frame header.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3015 >
2024-01-30 08:24:25 +00:00
Robert Mader
9ee58825cc
vaallocator: Allow non-linear modifiers for dummy mem_maps
...
A client may map dmabufs without the intention to either read or write
to the memory. One example is clients wanting to use the
`gst_video_frame_map()` helper function.
Thus, in order to make buffers from `GstVaDmabufAllocator` conveniently
usable, ignore the modifier check if the client specified neither
`GST_MAP_READ` nor `GST_MAP_WRITE`.
Also skip the `va_sync_surface()` call in that case, as it's likely only
needed for CPU reads/writes.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5965 >
2024-01-29 17:10:50 +00:00
Nicolas Dufresne
0b38cb2320
vulkan: Fix clang compiler warning
...
clang does not like the array index assignment without the `=` sign in
it. This is a gnu extension I believe, and adding the sign is proper.
This fixes the following two warnings:
```
../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideo-private.c:32:40:
warning: use of GNU 'missing =' extension in designator [-Wgnu-designator]
[GST_VK_VIDEO_EXTENSION_DECODE_H264] {
^
=
../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideo-private.c:36:40:
warning: use of GNU 'missing =' extension in designator [-Wgnu-designator]
[GST_VK_VIDEO_EXTENSION_DECODE_H265] {
^
=
```
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5996 >
2024-01-26 16:42:30 +00:00
Seungha Yang
3855646f1d
d3d12: Add MPEG-2 decoder
...
Most of code additions are just gluing already implemented
GstDxva and GstD3D12Decoder interfaces
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5979 >
2024-01-25 11:45:23 +00:00
Stéphane Cerveau
dd6fca1d02
vulkan video: add GST_VK_VIDEO_EXTENSIONS enum
...
To avoid using mysterious value, use an enum to
show the valid value in _vk_codec_extensions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5922 >
2024-01-24 17:00:47 +00:00
Matthew Waters
f50b43c83b
vulkan/format: also get features in the fallback case
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5576 >
2024-01-24 13:54:41 +00:00
Matthew Waters
634fc913a6
vulkan/format: don't assign an uneeded boolean
...
We don't actually need the basics_primary/secondary boolean. The
returned format is decided by the requested usage with fallbacks as
necessary.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5576 >
2024-01-24 13:54:41 +00:00
Matthew Waters
420548a6c6
vulkan/format: there is no current need to use the 64-bit feature flags
...
All of our feature flags are currently covered by the first
VkFormatFeatureFlag enum so far.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5576 >
2024-01-24 13:54:41 +00:00
Matthew Waters
080b25cbfe
vulkan/format: correct fallback features in from_video_info_2
...
The features were not actually used and were written into a boolean
value.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5576 >
2024-01-24 13:54:41 +00:00
Seungha Yang
f368d63ecd
av1parser: Fix potential stack overflow during tile list parsing
...
The tile_count_minus_1 must be less than or equal to 511 as specified
in spec "6.11.1 General tile list OBU semantics"
Fixes #3214 / CVE-2024-0444 / ZDI-CAN-22873
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5970 >
2024-01-24 12:29:12 +00:00
Daniel Stone
da9d4225b1
wayland: Actually use wayland-protocols version dep
...
Closes : #3242
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5962 >
2024-01-23 13:11:23 +00:00
Daniel Stone
3a37778f69
gstwayland: Support wp_single_pixel_buffer_v1
...
This protocol does what it says on the box, avoiding the need for a 1x1
wl_shm buffer.
A wayland-projects wrap has been added for users who do not have v1.26
available.
This commit was partly authored by Robert Mader.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2662 >
2024-01-22 16:51:36 -05:00
Seungha Yang
e353fe8fcc
h264decoder: Handle malformed avc/avc3 packets
...
Packetized stream format should not contain start-code prefix
in bitstream and each [nal-length-byte, nal-byte] unit should consist of
single nal unit. But there are malformed streams in the world.
Use newly added gst_h264_parser_identify_and_split_nalu_avc()
method to identify each nal unit.
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3219
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5772 >
2024-01-17 14:57:57 +00:00
Seungha Yang
c737799900
h264parser: Add gst_h264_parser_identify_and_split_nalu_avc() method
...
Equivalent to _split_nalu_hevc() method in h265parser. This method
will scan start-code prefix and split into individual NAL units
if start-code prefix is detected
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5772 >
2024-01-17 14:57:57 +00:00
Chris Spencer
2388932767
vkmemory: don't map memory more than once
...
vkMapMemory may not be called on a memory object that is already
host-mapped. If the gstreamer memory object is mapped more than once then
reuse the existing Vulkan mapping.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5917 >
2024-01-16 17:44:48 +01:00
Chris Spencer
865227b750
vkimagebufferpool: allow specifying initial image layout
...
The pool currently defaults to performing a layout transition to
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, with some special exceptions for
video usages. This may not be a legal transition depending on the usage.
Provide an API to explicitly control the initial image layout.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5881 >
2024-01-13 05:54:00 +00:00
Scott Moreau
f0d15f335d
gst-launch: accept option to set program name
...
The option --prog-name="PROGRAM-NAME" can be passed to set the program name.
The program name is used by gtk and gstreamer to set the class or app-id.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5263 >
2024-01-12 17:11:11 +00:00
Stéphane Cerveau
f337d37d6d
codecparsers: add slice type name for h265
...
Add a method to convert the slice type to a descriptive
name.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5908 >
2024-01-11 13:17:43 +01:00
Stéphane Cerveau
9c250179c6
codecparsers: add helper methods for h264
...
Add two helper methods to convert profile
and slice types
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5908 >
2024-01-11 13:17:43 +01:00
Olivier Crête
745197d386
analytics: Implement scale meta transform for Object detection meta
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5863 >
2024-01-10 18:35:17 -05:00
Olivier Crête
5d3035553c
analytics: Replace type quark with opaque struct pointer
...
This way, we can add function pointers in there for things like
transformations.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5863 >
2024-01-10 18:34:53 -05:00
Olivier Crête
91815710dd
analyticsmeta: Make the GstAnalyticsRelatableMtdData struct private
...
Only ask the subclass about how much space they need, this way we can keep
the allocation details more private.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5863 >
2024-01-10 18:19:38 -05:00
Stéphane Cerveau
476c7efcb7
vulkan: decoder: create union for profile usage
...
As a profile can include a VkVideoDecodeUsageInfoKHR
or VkVideoEncodeUsageInfoKHR, use union to separate the both.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5701 >
2024-01-10 17:15:12 +00:00
Stéphane Cerveau
97ebaa0bc1
gstutils: add gst_util_ceil_log2
...
Move ceil_log2 from nalutils.* to gstutils.*
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5888 >
2024-01-09 15:34:10 +00:00