Commit graph

5740 commits

Author SHA1 Message Date
Alexander Slobodeniuk 651dcb4912 d3d11: fix building with address sanitizer
When building with address sanitizer it gives next error:
"gstd3d11window_corewindow.cpp : fatal error C1128: number of sections
exceeded object file format limit: compile with /bigobj"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5779>
2023-12-07 21:36:20 +00:00
Andoni Morales Alastruey 71bad85714 csharp: disable codegen when not building as a subproject
Code generation is a development feature not required in distribution
tarballs. Disable it when the girs dir is not found
2023-12-07 17:34:34 +01:00
Andoni Morales Alastruey 90e5fec8be csharp: don't force a build when updating sources 2023-12-07 17:34:34 +01:00
Andoni Morales Alastruey 49adba12b3 csharp: fix code generation script to list files correctly 2023-12-07 17:34:34 +01:00
Andoni Morales Alastruey 4be602a137 csharp: update c# bindings
Update to C# bindings to use a more recent version of GtkSharp
and regenerate the bindings with that version

Fix #1718
2023-12-07 17:34:34 +01:00
Andoni Morales Alastruey 265a5c0df0 csharp: fix log string to describe the error correctly 2023-12-07 17:34:34 +01:00
Andoni Morales Alastruey 1b98ec70f4 csharp: update gtk-sharp subproject
bindinator is now part of gtk-sharp and the submodule is no longer
needed.
2023-12-07 17:34:30 +01:00
Andoni Morales Alastruey dd8b07fb3f csharp: use girs from the root project 2023-12-07 15:59:55 +01:00
Víctor Manuel Jáquez Leal 7332eb6427 vaallocator: force non-derived for old mesa drivers
Mesa <23.3 can't map derived images for P010 format. This patch forces
non-derived if this is the case.

See: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24381
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5760>
2023-12-07 10:42:50 +00:00
Víctor Manuel Jáquez Leal ddf6fd9c61 va: check surface status before get derive image
According with documentation the surface has to be in ready state before getting
it derived image. This patch adds that check.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5760>
2023-12-07 10:42:50 +00:00
Víctor Manuel Jáquez Leal 6b1fba14bf vaallocator: remove runtime mapping selection
The original idea was to select the type of mapping (either using derive images
or downloading the image) in runtime, under the assumption that both methods
shared the same memory layout (offsets and strides), because a single
GstVideoMeta is assigned by the buffer pool at allocation time. Nonetheless, in
recent hardware this assumption is invalid, raising memory access errors.

This patch removes completely the mapping type selection at runtime, using the
method selected when the allocator is configured, synced with the bufferpool
allocation.

This problem was fixed originally for iHD driver only. But now it makes sense to
remove all of it.

Original-patch-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5760>
2023-12-07 10:42:50 +00:00
Víctor Manuel Jáquez Leal 90af9b7704 vaallocator: don't fail if drm fourcc are different
When exporting a DMABuf from a VASurface the user might tell that the surface
was allocated with certain fourcc, but the returned VADRMPRIMESurfaceDescriptor
migth tell a different fourcc, as in the case or radeonsi driver, for duplicated
fourcc, such as YUY2 and YUYV.

Originally it was supposed to be a failed exportation. This patch relax this
validation by allowing different fourcc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5760>
2023-12-07 10:42:50 +00:00
Mengkejiergeli Ba be7e502769 msdk: Let deviceID config the mfx implementation
In multi-card scenario, user can set GST_MSDK_DRM_DEVICE env variable to
choose the device. This patch can align vpl's queried results with the
users' choice by passing deviceID when creating mfx implementation.

Co-authored-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5697>
2023-12-07 11:17:20 +08:00
Nicolas Dufresne 4a3aa20af7 meson: Update libgudev wrap to 238
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5775>
2023-12-06 20:17:56 +00:00
Daniel Morin 81051c16b6 onnx: replace video-region-of-interest with analytics-meta
- Use analytics-meta/OD to transport object detection results

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5767>
2023-12-06 18:25:16 +00:00
Daniel Morin 4425562661 analytics: fix analytics-meta re-use
- Fix alignment error when source and destination analytics-meta have the same
  relation order.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5767>
2023-12-06 18:25:16 +00:00
Seungha Yang 012222bcb3 cudaipcsink: Fix deadlock on stop
Manually close connection if client does not hold any shared memory
on stop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5747>
2023-12-06 16:09:27 +00:00
Seungha Yang ed5987efd4 d3d11ipcsink: Fix deadlock on stop
Manually close connection if client does not hold any shared memory
on stop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5747>
2023-12-06 16:09:27 +00:00
Seungha Yang b168647073 nvdec: Fix division by zero when calculating buffer duration
Don't try to calculate buffer duration from variable framerate

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5764>
2023-12-06 13:38:09 +00:00
renjun wang 4ff2f07e51 v4l2codecs: av1: Fix typo in debug log message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5722>
2023-12-06 10:25:24 +00:00
Daniel Morin d3ebaa316d onnx: avoid leak on failure and cleanup
- Unmap buffer on Ort exception
- Avoid retrieving unused videometa

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5761>
2023-12-05 16:54:45 +00:00
Daniel Morin 15e5866e51 onnx: add offset and scale properties
- Offset each datapoint by the value set on offset property.
- Scale each datapoint by the value set on scale property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5761>
2023-12-05 16:54:45 +00:00
Daniel Morin 3793619a02 onnx: fix tensor id loading
- Fix quark genaration. String loaded from the model/file are not static.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5761>
2023-12-05 16:54:45 +00:00
Daniel Morin 48e3836482 onnx: Add support for float datatype
This is a bit of a hack solution has I think the correct solution is to
expose model caps on sinkpad (eventually sinkpads). Till then I think
this is reasonable.

- Add a property to onnxinference to set datatype.
- Fix internal buffer allocation size based on datatype.
- Extract method to remove alphe channel and convert to planar image
  when requested. Also template the method to support writing to buffers
  of different datatype.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5761>
2023-12-05 16:54:45 +00:00
Thibault Saunier f59219228f videorate: Add a property to force dropping out of segment buffers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5725>
2023-12-05 14:04:05 +00:00
Thibault Saunier 6dc86b1f91 basesrc: Expose automatic-eos as a property
It is useful for appsrc for example and no good reason to not expose it as a property

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5725>
2023-12-05 14:04:05 +00:00
Jan Schmidt 3304eae3e8 audio: Extra documentation for gst_audio_ring_buffer_set_timestamp()
Clarify the documentation that gst_audio_ring_buffer_set_timestamp()
expects timestamps sampled directly from the pipeline clock

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5657>
2023-12-05 12:42:17 +00:00
Guillaume Desmottes 56e72889c1 meson: update PACKAGE_BUGREPORT
Some were still using pre-monorepo links.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5762>
2023-12-05 11:47:51 +01:00
Guillaume Desmottes a56923d5e6 qtdemux: fix bug report URL
Using PACKAGE_BUGREPORT as in other modules.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5762>
2023-12-05 09:25:22 +01:00
Philippe Normand 0b5e2ee80a validate: Fix memory leak in gst_validate_abort()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5757>
2023-12-04 20:04:05 +00:00
Ruben Gonzalez 97817ef44c gstgaussblur: delete unused code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5737>
2023-12-04 18:54:31 +00:00
Daniel Morin aaee569087 analytics: replace id type from gint to guint
- Replace all id type from gint to guint
- Fix annotation for GstAnalyticsODMtdData

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5758>
2023-12-04 10:14:59 -05:00
Jordan Yelloz 4ec5de8784 gstcontext: Added gst_clear_context()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5756>
2023-12-02 09:03:47 +00:00
Jordan Yelloz ac6952e936 gstpromise: Added gst_clear_promise()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5756>
2023-12-02 09:03:47 +00:00
Thibault Saunier 14c7d3f4e9 qtdemux: Do not update demux->offset when droping data on EOS
The offset is updated right after and we were breaking it by updating it
twice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5724>
2023-12-02 08:08:26 +00:00
Thibault Saunier b1b29de0fb qtdemux: Do not mark stream as EOS only if all streams are EOS
The `GstFlowCombiner` is responsible for tracking the flow of each
stream and handle the overal flow return value. Without that, we
can end up with the following scenario:

- Audio+video stream
- Only the video stream is linked downstream
- The audio stream goes EOS, video doesn't yet
  -> We update the Flow in the combiner with OK as all streams are not EOS
- Video goes EOS because downstream returned EOS
-> `qtdemux` returns `FLOW_OK` forever because the unlinked audio pad
  has `last_flowret==FLOW_OK`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5724>
2023-12-02 08:08:26 +00:00
Thibault Saunier 8295b2ae5c qtdemux: Determine EOS based on the stream segment
Depending on the stream segment might vary (because of edts for example)
leading to EOS being sent at the wrong time (too early for example).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5724>
2023-12-02 08:08:26 +00:00
Seungha Yang 36529475ae tests: appsrc: Fix test on Windows
Windows does not support fork() so all tests will run in a single
process, and global variables will be reused across multiple tests.
Thus, each test should reset global variables.

Also, setup pad chain/event functions before playing state

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5752>
2023-12-02 01:57:48 +00:00
Thibault Saunier 96cf1f8c8e ges: asset: Avoid trying to load twice the same asset
When requesting an asset from different threads we had no
guarantee that during the time we lookup an asset (which didn't exist)
and the time we create the asset with the same type/ID another thread
could not end up doing the same thing. In turns we could end up with
2 different threads loading the exact same asset and the cache
basically forgetting about one of the entries meaning that the user
would never get notified about one of those being ready to be used.

There was also the case when requesting "sync" where the user was
requesting an asset while another thread is creating it so it was
still in "ASSET_INITIALIZING" state, meaning that the returned asset
would be NULL which would be considered as an error in apps.

Since the cache lock is recursive we can just take it during the whole
ges_asset_request_async call and have other method still hold it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5732>
2023-12-01 21:51:57 +00:00
Aaron Boxer b405ff34d3 mpegtsmux: allow attaching PCR to non-PES streams
There is an existing PMT mapping between PCR_%s and an mpegtsmux sink
pad name, where %s equals the program number that the PCR corresponds
to. We re-purpose this functionality to also support a mapping between
PCR_%s and an arbitrary PID. If this mapping is set, then the header PCR
PID is set to this value, and PCR is attached to the stream with this
PID.

Note: the current implementation also attaches PCR to the video stream,
so this may be inefficient.

Co-authored-by: Jordan Yelloz <jordan.yelloz@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5726>
2023-12-01 18:01:34 +00:00
Seungha Yang 75d1b3f92f appsrc: Fix flow return when buffer is dropped
Flow EOS on buffer drop (upstream leaky mode) was not
intended behavior. Appsrc should return OK instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5753>
2023-12-02 01:09:59 +09:00
Hosang Lee 7bf646e5ba qtdemux: Don't overflow sample index
Don't reduce sample index if it is already at 0.
Assigning -1 to a guint32 variable causes unexpected behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5743>
2023-12-01 13:34:12 +00:00
Seungha Yang 269df73f92 gl: Add RBGA format support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5738>
2023-12-01 12:19:12 +00:00
Seungha Yang 9b41666cfd video: Fix RBGA format poffset
The offset array should be [0, 2, 1, 3]

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5738>
2023-12-01 12:19:12 +00:00
Jimmy Ohn 9c6b0f4615 decodebin2: Properly free when shutting down in gst_decode_bin_expose
missing_plugin_details causes memory leakages when shutting down.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5744>
2023-12-01 19:10:54 +09:00
Jimmy Ohn 2c19c92041 encoding-target: Properly free when missing type field in parse_encoding_profile
pname and description in parse_encoding_profile function causes
memory leakages when missing the 'type' field for streamprofile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5744>
2023-12-01 09:39:47 +00:00
Hosang Lee 041e0c6cab qtdemux: Fix reverse playback for pcm audio stream
Some raw lpcm or adpcm may have larger sample sizes than the max
buffer size value set.
Trimming the buffer causes bogus size error on reverse playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5742>
2023-12-01 15:11:04 +09:00
Seungha Yang adfa4d459e qsv: Update plugin doc cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5706>
2023-11-30 21:55:24 +09:00
Seungha Yang 865d7a1351 qsvh265dec: Add support for GBR decoding
Use GBR equivalent output formats if RGB colorspace is detected

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5706>
2023-11-30 21:50:26 +09:00
Seungha Yang e4729e5784 qsvh265dec: Add support for HEVC RExt profiles
Adding 4:2:0 high bitdepth and 4:2:2/4:4:4 decoding support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5706>
2023-11-30 21:38:04 +09:00
Seungha Yang 0178cc188b qsv: Add util methods for video format mapping
Remove duplicated format mapping code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5706>
2023-11-30 21:38:04 +09:00
Seungha Yang 801492b334 d3d11: Add RBGA format support
Allocates DXGI_FORMAT_AYUV texture for RBGA so that it can be used
by video decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5703>
2023-11-29 16:54:16 +00:00
Seungha Yang 5cbd062856 video: Add RBGA format
This new format is intended to be used by hardware decoders
where VUYA is only supported 4:4:4 decoding surface but
stream is encoded with GBR color space, HEVC and VP9 GBR streams
for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5703>
2023-11-29 16:54:16 +00:00
Benjamin Gaignard cd14b0892e codecparsers: av1: Clip max tile rows and cols values
Clip tile rows and cols to 64 as describe in AV1 specification
to avoid writing outside array range but preserve sb_cols
and sb_rows value which are used to futher computation.

Fixes ZDI-CAN-22226 / CVE-2023-44429

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5702>
2023-11-29 15:48:50 +00:00
Benjamin Gaignard f525de6d00 Revert "codecparsers: av1: Clip max tile rows and cols values"
This reverts commit b76a801f57.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5702>
2023-11-29 15:48:50 +00:00
ekwang.lee 7bfb9ea3eb docs: Add documentation for GST_VALIDATE_LAUNCHER_DEBUG
Add documentation for the environment variable GST_VALIDATE_LAUNCHER_DEBUG

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5009>
2023-11-29 14:05:24 +00:00
Stéphane Cerveau 44ba107715 vkupload: unref vkimagebufferpool
Since the vkupload pool refacto, the pool
was not properly unrefed leading to a leak.

Fix for fd5c344fb6

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5729>
2023-11-29 12:10:11 +00:00
Seungha Yang ccf6ac2b4c h264decoder: Fix GstVideoCodecFrame leak
If current buffer has no slice data, frame should be released.
Otherwise frames will stay in decoder baseclass forever.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5693>
2023-11-29 10:52:58 +00:00
Jordan Yelloz e33d5303f7 gstpromise: Added GST_IS_PROMISE() macro
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5728>
2023-11-28 15:41:49 -07:00
Maksym Khomenko 20f48f0fd0 rtpbasepayload: add extensions property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5694>
2023-11-28 15:05:24 +00:00
Maksym Khomenko 4eff26ee1c rtpbasepayload: fix documentation formatting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5694>
2023-11-28 15:05:24 +00:00
Stéphane Cerveau 7ac98ce598 vkupload: browse over the input buffer mems
To upload/convert the GstBuffer to vkImage, need to
browse over the input mems to fill the out gst buffer vkImage.

This patch is fixing a missing plane/mem with encoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5651>
2023-11-28 13:53:54 +00:00
Stéphane Cerveau fd5c344fb6 vkupload: implement decide_allocation vmethod
in the case of an upstream element proposing a buffer pool,
use it to allocate the buffer image with the given parameters
set by the upstream element.

Besides the buffer pool handling is sync'd with GstBaseTransform
base class.

See the case of vulkanupload ! vulkanh264enc

Co-authored-by: Victor Jaquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5651>
2023-11-28 13:53:54 +00:00
ekwang.lee 6b0f7729e1 validate:launcher: Using surrogateescape error handler
Use surrogateescape error handler to convert undecodable bytes without error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5008>
2023-11-28 13:00:15 +00:00
Seungha Yang 6992e14eee d3d11: Fix string version shader code
RGBA to BGRA conversion code should have written in compute
shader.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5723>
2023-11-28 21:02:44 +09:00
Seungha Yang c432a73e80 msdk: Fix build error after d3d11 API change
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3158
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5723>
2023-11-28 19:17:20 +09:00
Stéphane Cerveau 12b2dfe41b meson: fix gstreamer-full static mode on win32
Win32 was expecting the symbol gst_init_static_plugins in gstreamer-full
dynamic mode.
Add mode in gstreamer gstreamer-full options to tell if its a
gstreamer-full static or shared mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5098>
2023-11-27 18:12:18 +00:00
Seungha Yang 461c4bc32c d3d11: Add support for more packed formats using compute shader
Adding below listed formats support, and reorders supported format
list based on preference

<YUV 4:2:2>
UYVY, VYUY, YVYU, v210, v216

<YUV 4:4:4>
v308, IYU2

<RGB 16bits per pixel>
RGB16, RGB15, BGR16, BGR15

<RGB 8bits per channel>
ARGB, xRGB, ABGR, xBGR, RGB, BGR

<RGB 10bits per channel>
r210, BGR10A2

<RGB 16bits per channel>
BGRA64

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5717>
2023-11-27 15:14:09 +00:00
Seungha Yang f23d4475b3 d3d11convert: Allow MSAA only for native DXGI formats
Enable MSAA only if converter can render directly on texture
without post-processing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5717>
2023-11-27 15:14:09 +00:00
Seungha Yang 845f5d4856 d3d11: Rework memory allocation params signalling
Hide GstD3D11AllocationParams detail from public header and
set setter methods.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5717>
2023-11-27 15:14:09 +00:00
Jan Alexander Steffens (heftig) 393e254255 baseparse: Reset metadata for reverse playback fragment buffers
Don't let the adapter leak uncontrollable values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5718>
2023-11-27 14:38:45 +00:00
Jan Alexander Steffens (heftig) 3319d152a8 baseparse: Add missing gst_buffer_make_writable
When the subclass attempts to finish without an explicit `out_buffer`,
we take a buffer from our adapter. We need to make this buffer writable
before copying the metadata.

This led to data races such as in the following pipeline, which randomly
messed up the buffer PTS:

    gst-launch-1.0 -e audiotestsrc timestamp-offset=5555 num-buffers=100 \
      ! opusenc ! tee name=t ! queue ! opusparse ! fakesink silent=0 \
      t. ! queue ! opusparse ! fakesink silent=0 -v | grep '0000, dur'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5718>
2023-11-27 14:38:44 +00:00
Philippe Normand 986a36273f pbutils: Don't include default vp9 parameters in resulting codec mime string
According to the document defining the vp9 codec string, the optional fields
should all be present only if at least one of them has a non-default value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5716>
2023-11-27 10:36:01 +00:00
Seungha Yang 721533d042 d3d11: Use shader model 4
Since shader model 4 is sufficient for the current pixel shader
implementations, prebuild HLSL with shader model 4 as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5709>
2023-11-25 20:27:43 +09:00
Seungha Yang df0e6c4140 d3d11converter: Do not use R32_UINT UAV
It does not work well with YUY2 texture on some GPUs. Always use
the same DXGI formats for each SRV and UAV

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5709>
2023-11-25 20:27:43 +09:00
Seungha Yang 030800905b d3d11device: Remove outdated comment
We do support 4:2:2 YUV formats using compute shader now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5709>
2023-11-25 20:27:43 +09:00
Seungha Yang 3ab8d520fb d3d11: Drop legacy device support
Direct3D feature level 10 supported GPUs were released
more than 15 years ago, around the time when Windows
Vista / 7 were released. Also our d3d11 plugin/library
does not support feature level 9.x very well already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5709>
2023-11-25 20:27:43 +09:00
Philippe Normand ee1b905ff3 dashdemux2: Fix a couple leaks and a use-after-move
The tags and caps were leaked for unknown streams, I'm not sure they'd be valid
in that case, but better safe than sorry.

The tags ownership is transfered when calling `gst_adaptive_demux_track_new()`
so unreffing those afterwards was a mistake.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5714>
2023-11-24 17:01:33 +00:00
Thibault Saunier ce661c3b99 validate: Add support to replace variables in deeply nested structures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5713>
2023-11-23 16:56:40 -03:00
Link Mauve 4cd9dd3940 v4l2codecs: Query the right buffer before expbuf
We were previously always querying index 0, and while the number of planes per
buffer will never change, it seems more proper to query the right buffer rather
than always the first one.

This was found while reading strace logs, and wondering why the
V4L2_BUF_FLAG_MAPPED flag was present on all ¬0 indices even though that
happened before VIDIOC_EXPBUF.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5647>
2023-11-22 15:50:08 +00:00
Ruben Gonzalez 2d663880af debug: delete reference to gstdump script
It's an interesting script from @thiblahute my-devtools repository[1],
but no official.

[1] https://github.com/thiblahute/my-devtools

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5705>
2023-11-22 11:45:38 +01:00
Stéphane Cerveau 15b719d7f6 vkbufferpool: add support for video encoded buffers
Add support for non video raw  buffers to allocate memory
such as in encoded content scenario.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5645>
2023-11-21 19:16:37 +00:00
Stéphane Cerveau c6a5437e0d vkbufferpool: allow to set allocation params
Add the possibility to change the vulkan usage and mem properties from
external source.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5645>
2023-11-21 19:16:37 +00:00
Daniel Morin d23a90cb16 analytics: base class for analytics meta
- GstAnalyticRelationMeta is a base class for analytics
  meta. It's able to store analytics results (GstAnalyticRelatableMtd)
  and describe the relation between each analysis results.
- GstAnalysisRelationMeta also contain an algorithm able to explore
  analysis results relation using a bfs.
- Relation(edge) between analysis results (vertice) are stored in an adjacency-matrix
  that allow to quickly identify if two analysis results are related and by
  which relation they related. It also work for indirect relation
  and can provide the path of analysis results by which two
  analysis results are related.
- One allocation per buffer to store analysis results. Here we rely on
  the application to guess how much space will be required to store all
  analysis results. This is something that could be improved
  significantly but it's a starting point.
- Define common analysis results, classification, object-detection,
  tracking that are subclass of GstAnalyticRelatableMtd. The also
  provide exemple of how to extend GstAnalyticRelatableMtd to have them
  benefit for the mechanim to express relation with other analysis
  results.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4962>
2023-11-21 18:04:53 +00:00
Olivier Crête aa7333fe43 meta: Add a new "clear" transform to avoid re-allocations
In the buffer pool, try to clear metas before freeing them so we
avoid constant reallocations on every frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4962>
2023-11-21 18:04:53 +00:00
Nicolas Dufresne 150adf6df4 videorate: Don't forget last_ts on caps changes
Whenever that caps changes does not imply that a new segment will start.
Don't reset the last_ts if only the caps have changed. This fixes issues
if you have a stream without only first frame with TS=0, and have resolution
change happening. This was a regression introduced by !3059, which issue was
described in #1352. The reported issue is still fix after this change.

Fixes #1034

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5687>
2023-11-21 16:36:37 +00:00
Stéphane Cerveau 159f24c07f vulkan: use gst_vulkan_device_select_queue
Use gst_vulkan_device_select_queue api to retrieve a valid queue
in vkupload, vkdownload, vkimagebufferpool, and vkvideofilter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5656>
2023-11-21 13:51:21 +00:00
Stéphane Cerveau 74c6298eb7 vkdevice: select queue with expected flags
Allow to select a queue with the given flags
such as compute bit etc from a given device.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5656>
2023-11-21 13:51:21 +00:00
Seungha Yang 0004a52866 qsvdecoder: Fix stream format detection
Fixing typo

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5700>
2023-11-21 21:22:47 +09:00
Nirbheek Chauhan ec3962f9c7 directxmath.wrap: Fix cpuid mismatch on MinGW
This fixes a build failure with meson 1.3.0, which was caused by
a bugfix in Meson that made the cc.compile() check succeed on MSYS2
MinGW and enable DirectXMath SIMD, which in turn triggered the broken
`__cpuid()` issue mentioned in the meson.build file.

Upstream fix: https://github.com/microsoft/DirectXMath/pull/172

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5690>
2023-11-20 20:08:57 +00:00
Nirbheek Chauhan f65d074354 meson: Rework d3d11 checks, add new d3d11-math option
This allows us to ensure that directxmath SIMD is enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5690>
2023-11-20 18:49:13 +00:00
Seungha Yang b42b45af46 d3d11: Add Y412 format support
It's mapped to DXGI_FORMAT_Y416 and major format for 12bits 4:4:4
video decoding. Since DXGI_FORMAT_Y416 format cannot be a render target,
adding corresponding compute shader code too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5692>
2023-11-21 02:40:10 +09:00
Víctor Manuel Jáquez Leal b83927f301 vulkanh264dec: add Vulkan H.264 decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Stéphane Cerveau 23a144dcec test: look for proper queue among multiple physical device
There might be multiple GPUs in a system and only one might provided vulkan
video extensions. Now, in order to run the tests, the proper GPU is looked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Víctor Manuel Jáquez Leal 221811119a test: add vkvideodecode test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Víctor Manuel Jáquez Leal 5bece78ca2 vkqueue: add decoder factory
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Víctor Manuel Jáquez Leal 4f475732bd vkdecoder: add gstvkdecoder helper object
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Víctor Manuel Jáquez Leal 8ee3ec105c vkvideo-private: video structures and session handle
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Stéphane Cerveau 96daac8ac7 vkvideoutils: add GstVulkanVideoOperation enum
To differentiate a video/x-h264 caps use with a decoder or an encoder
and get the correct video profile, the API expects an enum
GstVulkanVideoOperation to handle this difference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Víctor Manuel Jáquez Leal 8ee0f04d8d vkvideoutils: add dec postfix to profiles
So it the future don't collide with encoding profiles.

Original-patch-by: Stéphane Cerveau <scerveau@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00