Commit graph

6087 commits

Author SHA1 Message Date
Olivier Crête 814f21557f soup: Avoid using GUri before GLib 2.66
Let's use gpointer for now

Fixes: #3169
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5906>
2024-01-11 18:06:59 +00:00
Xavier Claessens 6a3b2001a3 gstpad, gstobject: Add GMutexLocker helper
Add GST_OBJECT_AUTO_LOCK() and GST_PAD_STREAM_AUTO_LOCK() to simplify
g_autoptr(GMutexLocker) usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4300>
2024-01-11 17:20:23 +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
Mengkejiergeli Ba 0d04660c5d msdk: Fix memory leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5819>
2024-01-11 14:52:45 +08:00
Damian Hobson-Garcia fe64e68cc4 gloverlay: Apply updated overlay coordinates correctly
When overlay coordinates are updated, after the initial coordinates
are set, the shader indices are applied to the wrong buffer, resulting
in the background image appearing where the overlay should.

Bind the array buffer before applying subsequent coordinate
updates.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5901>
2024-01-11 01:53:16 +00: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
Víctor Manuel Jáquez Leal 7f14bfe8b8 va: basedec: fix return type
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5903>
2024-01-10 12:48:16 +01:00
Mengkejiergeli Ba 14c5d3ee91 msdk: Modify the caps order when register plugins
With this patch, the caps is registered in the order of memory features
as: VAMemory, DMABuf then raw caps in linux path, and D3D11Memory then
raw caps in windows path. It helps to prioritize the video memory for all
msdk elements when doing negotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5898>
2024-01-10 01:14:21 +00:00
Mengkejiergeli Ba 7d62166098 msdk: Remove useless function for vp8dec and vc1dec in windows path
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5898>
2024-01-10 01:14:21 +00:00
Philippe Normand 952f252104 decodebin3: Fix clean-up of EOS'd parsebin src pad
In `parse_chain_output_probe()` the corresponding input stream might receive EOS
and thus be removed before the actual pad is removed. So we cannot assert about
this in `parsebin_pad_removed_cb()`.

Also, driving-by, protect `find_input_stream_for_pad()` with the selection lock
similarly to other functions accessing the input streams list.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5887>
2024-01-09 19:00:38 +00:00
Robert Mader a64f2bf628 v4l2codecs: Always chain up to parent decide_allocation function for all codecs
Apply the changes to the codecs previously left out, fixing playback
issues seen with VP9.

See: 70ff80a873 ("v4l2codecs: Always chain up to parent decide_allocation function")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5896>
2024-01-09 17:29:52 +00:00
Robert Mader 75b7e5fcb3 v4l2codecs/av1decoder: Allow output caps to be updated
To bring AV1 in line - needed for the next commit.

See: d3c5fc815e ("v4l2codecs: Allow output caps to be updated")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5896>
2024-01-09 17:29:52 +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
Seungha Yang a242b93f33 d3d12decoder: Release decoder and heap on stop
Sometimes driver crash happens if ID3D12VideoDevice got closed first,
and then ID3D12VideoDecoderHeap/ID3D12VideoDecoder are released.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5895>
2024-01-09 13:52:44 +00:00
Seungha Yang 6ffed9b3dc d3d12videosink: Fix crash on set_buffer()
set_buffer() can be called with null buffer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5895>
2024-01-09 13:52:44 +00:00
Seungha Yang 7f2b4b6b09 d3d12: Fix warnings reported by debug layer
Fixing below debug layer report
ID3D12Device::CreateCommittedResource: Ignoring InitialState D3D12_RESOURCE_STATE_COPY_DEST.
Buffers are effectively created in state D3D12_RESOURCE_STATE_COMMON.

Buffer resource will be automatically promoted to D3D12_RESOURCE_STATE_COPY_DEST
at the very first COPY operation time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5895>
2024-01-09 13:52:44 +00:00
Seungha Yang e1ecd1de2f d3d12: Simplify fence data setup
Adding COM and GstMiniObject specific methods to skip passing
free function pointer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5895>
2024-01-09 13:52:44 +00:00
Seungha Yang 2c3f3c0cb6 d3d12device: Print live objects on finalize()
The report from debug layer can help tracing resource leak

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5895>
2024-01-09 13:52:44 +00:00
Sebastian Dröge 6fa41f78bb rtpsession: Remove some unused fields
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5899>
2024-01-08 12:57:04 +02:00
Seungha Yang 0077c4beb0 d3d12decoder: Set buffer flag on output buffer
... and remove unnecessary condition check

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5891>
2024-01-07 13:38:44 +00:00
Seungha Yang 02563605e8 d3d12videosink: Add gamma, primaries and sampling filter properties
Add properties to control conversion methods

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5891>
2024-01-07 13:38:44 +00:00
Seungha Yang 368d8b9252 d3d12videosink: Add support for 3D transformation
Add x, y, and z axis rotation with scaling support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5891>
2024-01-07 13:38:44 +00:00
Seungha Yang 72237d2563 d3d12videosink: Add support for MSAA
Adding "msaa" property to support MSAA rendering

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5891>
2024-01-07 13:38:44 +00:00
Seungha Yang de331217aa d3d12videosink: Add support for fullscreen mode
Adding "fullscreen-on-alt-enter" and "fullscreen" properties so that
use can control fullscreen mode switch

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5891>
2024-01-07 13:38:44 +00:00
Sanchayan Maity 00bbac6541 rtphdrext-clientaudiolevel: Fix level value being written by the extension
When level value is greater than 127, it was being clamped but this clamped
value was not the one being actually used. For level values greater than 127
this resulted in an incorrect value being used. As an example, a level value
of 187, after and'ed with 0x7F, it would result in 0x3B being reported as the
level value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5893>
2024-01-07 16:00:18 +05:30
Thibault Saunier e3be7e3162 nlecomposition: Simplify the way we ensure stream-start is sent
stream-start should always be sent once at the beginning of the stream,
so we should make sure it is pushed at the very beginning and after
resets (going back to READY).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5858>
2024-01-06 13:22:19 +00:00
Thibault Saunier 7fe786135f validate: scenario: Do not use a NULL scenario description structure
The scenario meta is optional and we have to take that into account.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3199
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5892>
2024-01-06 09:47:16 -03:00
Seungha Yang 24d515f57d d3d11screencapturesrc: Hide symbols
Fix potential linking error in case of static build

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5883>
2024-01-05 21:27:35 +09:00
Seungha Yang ae3ed20f41 d3d12: Add screen capture element
Since DXGI desktop duplication API does not work with Direct3D12 device,
this element will use Direct3D11 device to acquire frame.
Then other rendering operations (e.g., texture copy, render pipeline) will
happen using Direct3D12 API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5883>
2024-01-05 21:27:35 +09:00
Olivier Crête 6482514737 onnxinference: Fix leak of the output tensors
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5884>
2024-01-04 19:11:20 +00:00
Olivier Crête 06d477a89d onnx: Fix leak in ssdobjectdetector decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5884>
2024-01-04 19:11:20 +00:00
Thibault Saunier b85a9454e5 ges: Expose audioconvert mix-matrix property in audio sources
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5853>
2024-01-04 12:02:41 +00:00
Mengkejiergeli Ba 5d488c444e msdkvpp: Remove passthrough condition in propose_allocation
According to basetransform func: gst_base_transform_do_bufferpool,
it is the upstream to decide if it needs a bufferpool from vpp, so
we don't need passthrough condition in subclass propose_allocation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5879>
2024-01-04 04:35:40 +00:00
Daniel Morin 90a3b63eed h264parse: use AUD to detect first VCL NAL
- Fix skipsize on _update_backlog failure.
- Add robustness to AU completion detection by using AUD when present. If we've
received a AUD we overwrite the first VCL NAL detection when the result was
negative. VCL following AUD is the first VCL of next AU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5862>
2024-01-03 20:43:34 +00:00
Sebastian Dröge 3cd00da0bc h2652json: Fix mix-up of different enum types
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5873>
2024-01-03 09:03:30 +00:00
Seungha Yang 1b86c9d370 d3d12decoder: Try zero-copy in case of reverse playback too
In case of tier 1 decoder, always use reference-only picture to avoid
fixed-size pool limitation and output decoded picture without
copy even for negative rate. Also do not use copy queue for GPU to GPU
copy. Copy queue is specialized for upload/download and may occupy
PCIE bandwidth. Use direct queue as recommended by vendors.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5877>
2024-01-03 02:08:53 +09:00
Seungha Yang 1fb44b8160 d3d12decoder: Fix crash on flush
On flush event, baseclass will discard all pictures from DPB
but there can be still in-flight commands not finished yet.
Use our command queue, allocator and fence data helper objects
to keep resource available during command execution.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5877>
2024-01-03 01:36:42 +09:00
Seungha Yang d3b3a1c00a d3d12: Add {set,get}_user_data() methods to command allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5877>
2024-01-03 01:19:39 +09:00
Seungha Yang 9d5277e70e d3d12decoder: Fix barrier usage
Common state promotion and decay does not seem to be applied to
decoder commands. Use barriers explicitly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5877>
2024-01-03 01:17:32 +09:00
Edward Hervey 583fadc051 dvdspu: Support all video caps for "ANY" feature
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5827>
2024-01-02 14:13:04 +00:00
Arnaud Vrac 705ab7e35a dvdspu: handle frame size event from upstream
An IDX file or codec_data normally contains the original frame size of
the video. Allow upstream to provide this information by sending a
custom event, which will allow scaling the overlay correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5827>
2024-01-02 14:13:04 +00:00
Arnaud Vrac 559c4b8429 dvdspu: cache overlay composition
This avoids rendering the overlay buffer for each video frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5827>
2024-01-02 14:13:04 +00:00
Arnaud Vrac 5919bfec5e dvdspu: negotiate overlay composition meta with downstream
This allows attaching the overlay composition as a meta on the video
buffer instead of blending with the video.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5827>
2024-01-02 14:13:04 +00:00
Arnaud Vrac 85081cbef7 dvdspu: render to ARGB overlay instead of AYUV
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5827>
2024-01-02 14:13:03 +00:00
Arnaud Vrac b0ce390d50 dvdspu: render to AYUV overlay
Instead of only supporting writing SPU data directly to YUV frames,
render the SPU data to an intermediate AYUV overlay buffer. The overlay
data is then blended to the video frame.

For the PGS format, the overlay buffer size is set to the size of the
Composition Window, and its position in the overlay composition is set
to the window position. The objects to render are now cropped when the
cropping flag is set.

For the Vobsub format, the overlay buffer size is set to the size of the
Display Area.

Once rendered, the overlay composition rectangle is now moved and scaled
to fit the video output size, to avoid clipping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5827>
2024-01-02 14:13:03 +00:00
Seungha Yang 087e39564d d3d12videosink: Fix buffer leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875>
2024-01-02 13:02:47 +00:00
Seungha Yang b0ef890726 d3d12device: Store adapter index
... and remove unused fence object

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875>
2024-01-02 13:02:47 +00:00
Seungha Yang 0577d1c9de d3d12: Reduce shader visible descriptor size
Shader visible descriptors occupy GPU resource and there are hardware
limits. Thus, in order to minimize the amount of shader visible heaps,
only non shader visible descriptor heap (staging) will be held by d3d12memory.
Then converter will copy the staging descriptor to shader visible
descriptor heap per draw.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875>
2024-01-02 13:02:47 +00:00
Seungha Yang 0ce6e752e4 d3d12: Use CREATE_NOT_ZEROED heap flag if possible
Zero initialization would have overhead and it's not required
most cases except for textures. Use CREATE_NOT_ZEROED flag
in case of buffer resource or if a texture will be rendered without any
prior read operation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875>
2024-01-02 13:02:47 +00:00
Seungha Yang a1ba38cd64 d3d12: Add compositor element
Adding d3d12compositor element. d3d12compositor will build GPU commands
asynchronously and each command is serialized at final render stage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875>
2024-01-02 13:02:47 +00:00
Seungha Yang 996346f8d3 d3d12converter: Don't map output buffer with write flag
Conversion will happen when constructed command list is executed,
not by converter element. Thus this object should not map output buffer
with write flag which will result in error if multiple threads
are building commands for the same output target frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875>
2024-01-02 13:02:47 +00:00
Seungha Yang bffbf0d951 d3d12converter: Add support for texture upload
If buffer is not a d3d12 memory or allocated by other device,
upload to internal d3d12 memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875>
2024-01-02 13:02:47 +00:00
Seungha Yang f4fe17d8d2 d3d12converter: Add support for blending
Create new PSO if blend state update is required

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875>
2024-01-02 13:02:47 +00:00
Seungha Yang 7c701058ed d3d12: Add testsrc element
Adding testsrc element with d2d interop support via d3d11on12

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875>
2024-01-02 13:02:46 +00:00
Seungha Yang abe1f5044d cuda: Prefer CUBIN over PTX
System installed NVRTC library might be newer version than
driver, then generate PTX can be incompatible with the driver.
Instead of the intermediate code PTX, use actual assembly code
directly.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3108
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5639>
2024-01-02 10:10:09 +00:00
Tim-Philipp Müller bf4755331a vpx: fix plugin description
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5864>
2023-12-30 11:33:52 +00:00
Seungha Yang 7d210af46c docs: Update Windows plugins cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang 2f091e7118 d3d12: Add video sink element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang 660f2d7d27 d3d12: Add convert element
Implement converter object with convert element

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang 4198bd6932 d3d12: Add helper object for fence operation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang eeb57061d2 d3d12: Enable plugin only for Windows8 or newer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang 3e49d6a75f d3d12: Define more formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang 48cfca413d d3d12: Add header containing core features
... and include the single header instead of listing many ones

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang 41d8a12649 d3d12: Remove unused methods
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang 5ce2a7f64f d3d12bufferpool: Don't pre-allocate memory for size calculation
Unlike d3d11, we can know CPU accessible memory layout without
allocation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang d316356bf2 d3d12memory: Add alloc_wrapped() method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang 3308a976bd d3d12: Add upload element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang e4f794cbdd d3d12bufferpool: Wait fence before reusing buffer
Buffer can be released without waiting fence for previous commands

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang 1c5bba4b6b d3d12decoder: Remove ID3D12Device4 interface requirement
Old OS may not support the interface. And allow 11_0 feature level
hardware.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Seungha Yang 4e5d4a45a3 d3d12decoder: Reduce the number of resource barriers
Single barrier per texture is sufficient in case of array-of-textures.
Avoid unnecessary decay barriers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Seungha Yang e6bdb0458c d3d12decoder: Use flexible task queue
Instead of using fixed size command allocator array, make it
resizable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Seungha Yang efc023e76e d3d12: Rework command scheduling
* Use single fence object per queue and remove GstD3D12Fence
  implementation
* Add a helper method for texture copy
* Run background thread and release unused resource from the thread

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Seungha Yang 6d7d9291c3 d3d12: Add resource pool objects
Adding pool objects for command list, command allocator, and descriptor
heap

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Seungha Yang 93458c0155 d3d12memory: Add more SRV/RTV getter methods
Adding a method so that memory object can create SRV/RTV
on external descriptor heap. And remove unused methods

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Seungha Yang 2578f234dd d3d12: Remove d3d11 dependency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Sebastian Dröge 43fdc9e9f9 orc: Track main branch again
It's one of the projects we maintain and we should track the main branch
to make sure any regressions are caught as early as possible.

For GStreamer releases / release branches this should be pointed back to the
latest orc release tag.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5867>
2023-12-29 13:16:03 +00:00
Sebastian Dröge 5630294ce6 ptp-helper: Allow unused Stderr export
It's not used when building tests and would otherwise cause a warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5872>
2023-12-29 10:18:52 +02:00
Sebastian Dröge c292da7044 rtpsession: Only warn once if configured latency needs to be known but isn't yet
Otherwise we would warn about this once for every single packet until
the LATENCY event is received.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5854>
2023-12-27 11:00:44 +00:00
Thibault Saunier 04ae39f25b validate: scenario: Add a 'forward-eos' parameter to forward-appsink-to-appsrc
There might be cases where the user doesn't want to forward it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5803>
2023-12-27 02:14:19 +00:00
Thibault Saunier 80e44ac344 validate: scenario: Handle the case where execute_next_action is called with an action that is OK
It is now a valid case when running subaction in foreign scenarios

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5803>
2023-12-27 02:14:19 +00:00
Thibault Saunier 93f1ffe715 validate: doc: Enhance the way we render action type parameters
And update gst-validate-action-types.md

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5803>
2023-12-27 02:14:19 +00:00
Thibault Saunier f1e34de800 validate: scenario: Do not print position on sub pipelines
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5803>
2023-12-27 02:14:19 +00:00
Thibault Saunier a4a97c7568 validate: doc: Enhance documentation about testfile and meta fields
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5803>
2023-12-27 02:14:19 +00:00
Thibault Saunier a5a65b74ff validate: scenario: Ensure all pipelines with scenarios are stopped when exiting runner
Otherwise we end up with "dangling" sub pipelines on SIGINT

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5803>
2023-12-27 02:14:18 +00:00
Thibault Saunier 805641fe70 validate: doc: Update action types documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5803>
2023-12-27 02:14:18 +00:00
Thibault Saunier 6abc36ad34 validate: scenario: Cleanup the 'switch-track' action implementation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5803>
2023-12-27 02:14:18 +00:00
Thibault Saunier fbf478b3f5 validate: scenario: Add a way to set pipeline base-time, start-time and force using the system clock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5803>
2023-12-27 02:14:18 +00:00
Thibault Saunier aad06b091e validate: scenario: Add an action type to forward stream from an appsink to an appsrc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5803>
2023-12-27 02:14:18 +00:00
Thibault Saunier fd4cd3d85f validate:scenario: Add a 'create-sub-pipeline' action type
And allow running parallel pipelines, scenarios, and pass data from
one to the other using appsrc/appsink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5803>
2023-12-27 02:14:18 +00:00
Tim-Philipp Müller d415816cb1 rtpvrawdepay: only announce supported formats in sink template
For most video formats we currently just assume that they
have a depth of 8 bits, whilst advertising that we can
handle 8/10/12/16 bit depth.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5866>
2023-12-25 19:00:18 +01:00
Tim-Philipp Müller 888e5905d8 docs: contributing: add merging section to developer workflows
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5847>
2023-12-24 13:06:30 +00:00
Olivier Crête e19428a802 onnx: Update build instructions to use onnx-runtime 0.16.3
This synchronizes it with the meson.build file

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5861>
2023-12-22 14:43:23 -05:00
Michael Tretter 57a4d521fd videorate: keep pool if max_buffers is unlimited
The value 0 for max_buffers means unlimited. If the max_buffers are unlimited,
the videorate element shouldn't throw away the bufferpool, but just increase the
min_buffers value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5857>
2023-12-22 17:46:50 +00:00
Víctor Manuel Jáquez Leal fdfd51397b vajpegdec: only support progressive mjpeg streams
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal ec4054e637 jpegparse: always forward pixel-aspect-ratio
And by default it's 1/1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal ae55ebfdf2 jpegparse: fix endianness
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 470b90a14a jpegparse: on app0 use fourcc rather than strings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 367deef132 jpegparse: dump whole failed app marker
Instead of just log the parsed string. It's better for debugging.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 658b5b4399 jpegparse: don't trigger message for failed com marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 497890f678 jpegparse: refactor renegotation
Instead of comparing caps, just signal when renegotation is needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 03d51244c0 jpegparse: pass colorimetry in caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 20b636ee9a jpegparse: add support interlaced mjpeg
Interlaced MJPEG is a big hack. Most of the streams we've found are from old
AVID tools. There are two methods to detect interlaced stream: the container
offers a height bigger (or double) than the image's height in SOF. The other
is from a APP0 marker.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Jordan Petridis b39b178dd7 subprojects: update glib wrap to 2.78.3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5849>
2023-12-21 19:22:25 +02:00
Sebastian Dröge c9c26eab26 rtpvp8pay: Also set partition IDs in the packets if meta exists but without temporal_scalability
Encoders will add the meta to every single buffer, but we only cannot set
partition IDs properly when the meta has temporal_scalability set

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5814>
2023-12-21 11:26:49 +00:00
Aaron Boxer e2ee207367 onnx: add README outlining install and test instructions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5816>
2023-12-20 14:48:41 -05:00
Marek Vasut 5f3d4215a0 v4l2codecs: Switch gst_codec_picture_ts_ns() to gst_util_uint64_scale_int()
Instead of plain multiplication, use gst_util_uint64_scale_int()
to achieve the same effect with additional checks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 3335af0efe v4l2codecs: Deduplicate picture frame number to timestamp in ns
Add macro which converts picture frame number to suitable timestamp in
nanoseconds for use in V4L2 VB2 buffer lookup. Since multiple codecs do
the same operation and almost all got it wrong, do it in one place so it
can be fixed in one place again, if needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 552a171671 vp9decoder: Simplify gst_v4l2_codecs_vp9_dec_fill_refs()
In case reference_frames is NULL, return outright. Remove the
duplicate check from subsequent conditionals. No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 4560cdff5c h265decoder: Align wraparound fix
Instead of casting GST_CODEC_PICTURE_FRAME_NUMBER (ref_pic) to u64,
use 1000ULL which is also u64 . This only aligns the behavior here
with '*decoder: Fix multiplication wraparound' commits.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 7725aa7d77 h264decoder: Align wraparound fix
Instead of casting GST_CODEC_PICTURE_FRAME_NUMBER (ref_pic) to u64,
use 1000ULL which is also u64 . This only aligns the behavior here
with '*decoder: Fix multiplication wraparound' commits.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 3cbf09d0c9 mpeg2decoder: Fix multiplication wraparound
The GstMpeg2Picture system_frame_number is guint32, constant 1000 is guint32,
GstV4l2CodecMpeg2Dec *_ref_ts multiplication result is u64 .

```
u64 result = (u32)((u32)system_frame_number * (u32)1000);
```
behaves the same as
```
u64 result = (u32)(((u32)system_frame_number * (u32)1000) & 0xffffffff);
```

so in case `system_frame_number > 4294967295 / 1000`, the `result` will
wrap around. Since the `result` is really used as a cookie used to look
up V4L2 buffers related to the currently decoded frame, this wraparound
leads to visible corruption during MPEG2 decoding. At 30 FPS this occurs
after cca. 40 hours of playback .

Fix this by changing the 1000 from u32 to u64, i.e.:
```
u64 result = (u64)((u32)system_frame_number * (u64)1000ULL);
```
this way, the wraparound is prevented and the correct cookie is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 50fb6f8c02 av1decoder: Fix multiplication wraparound
The GstAV1Picture system_frame_number is guint32, constant 1000 is guint32,
GstV4l2CodecAV1Dec v4l2_av1_frame.*_frame_ts multiplication result is u64 .

```
u64 result = (u32)((u32)system_frame_number * (u32)1000);
```
behaves the same as
```
u64 result = (u32)(((u32)system_frame_number * (u32)1000) & 0xffffffff);
```

so in case `system_frame_number > 4294967295 / 1000`, the `result` will
wrap around. Since the `result` is really used as a cookie used to look
up V4L2 buffers related to the currently decoded frame, this wraparound
leads to visible corruption during AV1 decoding. At 30 FPS this occurs
after cca. 40 hours of playback .

Fix this by changing the 1000 from u32 to u64, i.e.:
```
u64 result = (u64)((u32)system_frame_number * (u64)1000ULL);
```
this way, the wraparound is prevented and the correct cookie is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 6f74818a07 vp9decoder: Fix multiplication wraparound
The GstVp9Picture system_frame_number is guint32, constant 1000 is guint32,
GstV4l2CodecVp9Dec v4l2_vp9_frame.*_frame_ts multiplication result is u64 .

```
u64 result = (u32)((u32)system_frame_number * (u32)1000);
```
behaves the same as
```
u64 result = (u32)(((u32)system_frame_number * (u32)1000) & 0xffffffff);
```

so in case `system_frame_number > 4294967295 / 1000`, the `result` will
wrap around. Since the `result` is really used as a cookie used to look
up V4L2 buffers related to the currently decoded frame, this wraparound
leads to visible corruption during VP9 decoding. At 30 FPS this occurs
after cca. 40 hours of playback .

Fix this by changing the 1000 from u32 to u64, i.e.:
```
u64 result = (u64)((u32)system_frame_number * (u64)1000ULL);
```
this way, the wraparound is prevented and the correct cookie is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 15c9a6caa9 vp8decoder: Fix multiplication wraparound
The GstVp8Picture system_frame_number is guint32, constant 1000 is guint32,
GstV4l2CodecVp8Dec v4l2_vp8_frame.*_frame_ts multiplication result is u64 .

```
u64 result = (u32)((u32)system_frame_number * (u32)1000);
```
behaves the same as
```
u64 result = (u32)(((u32)system_frame_number * (u32)1000) & 0xffffffff);
```

so in case `system_frame_number > 4294967295 / 1000`, the `result` will
wrap around. Since the `result` is really used as a cookie used to look
up V4L2 buffers related to the currently decoded frame, this wraparound
leads to visible corruption during VP8 decoding. At 30 FPS this occurs
after cca. 40 hours of playback .

Fix this by changing the 1000 from u32 to u64, i.e.:
```
u64 result = (u64)((u32)system_frame_number * (u64)1000ULL);
```
this way, the wraparound is prevented and the correct cookie is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Xavier Claessens 71b51f1077 ntv2: Use a patch overlay instead of diff
It is easier to maintain plain meson.build file instead of a diff. We
can edit it directly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5843>
2023-12-20 18:18:43 +00:00
Mengkejiergeli Ba 141cd38715 h264parse: Remove dead code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5833>
2023-12-20 13:03:25 +00:00
Sebastian Dröge 2e86fb691a video-format: Fix format order once again
RGBA should be before RBGA. Both the Python script and the gstreamer-rs
tests agree on that, but somehow this is not caught by the CI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5837>
2023-12-20 05:33:43 +00:00
Olivier Crête f5d5f2cf1a meta: Add API to register metas in two steps
And also remove the specific registration APIs for
serializable meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5830>
2023-12-19 22:41:31 +00:00
Olivier Crête 2a9c4e3270 meta: Move the clear operation to its own vfunc
Some transforms always assumed that the transformation was some kind
of copy. So adding a "clear" operation didn't work out in practice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5830>
2023-12-19 22:41:31 +00:00
Nicolas Dufresne 73338aa1ae doc: baseparse: Clarify consumed vs output size
When we finish a frame, we pass a size which semantic can easily be confused.
Improve the documentation to clarify that the parameter size is the amount of
input data being consumed and, if set, the output_buffer size can differ.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5754>
2023-12-19 16:08:08 -05:00
Chao Guo 2e75b8c8e9 v4l2object: clear old fds in poll when closing v4l2object
When reopening a v4l2 device, the v4l2object->poll will include some old fds,
which was assigned to this device before. If the pipeline opens multiple v4l2
devices, the old fd may been assigned to other v4l2 devices when reopening
devices.

This will cause the timing of the pipeline become confusing when polling devices,
leading functional abnormalities.

Therefore, when closing v4l2object, remove the old fds in poll to ensure that the
pipeline timing is normal.

Signed-off-by: Chao Guo <chao.guo@nxp.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5820>
2023-12-19 15:23:23 +00:00
Philippe Normand 61d3f5c8e0 play: Include pipeline dump in error details structure
This can be useful for debugging purposes. It can't be done on application side
because the on_error callback tears down the pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5828>
2023-12-18 20:13:38 +00:00
Philippe Normand c6c567e3e4 play: Fix error details parsing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5828>
2023-12-18 20:13:38 +00:00
Robert Mader c481fe7059 camerabin: Correctly relink viewfinderbin_queue
This reverts a part of de92a6c7f2. Unlike `image_filter` and
`video_filter`, `viewfinder_filter` does not get linked to `src` but
`viewfinderbin_queue`. Thus the fix in the mentioned commit does not
apply for it and should be reverted.

This was not spotted earlier as only the other filters are used in
the project that uncovered the issue.

Fixes: de92a6c7f2 ("camerabin: Fix source updates with user filters")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5689>
2023-12-18 17:07:31 +00:00
Seungha Yang 890d59e97e av1parser: Fix array sizes in scalability structure
Since the AV1 specification is not explicitly mentioning about
the array size bounds, array sizes in scalability structure
should be defined as possible maximum sizes that can have.

Also, this commit removes GST_AV1_MAX_SPATIAL_LAYERS define from
public header which is API break but the define is misleading
and this patch is introducing ABI break already

ZDI-CAN-22300

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5823>
2023-12-18 10:58:24 +00:00
Guillaume Desmottes b603095ac3 audioconvert: change gst_audio_convert_get_unit_size() log levels
INFO is a bit high for such technical details and best to use WARNING
when it fails.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5822>
2023-12-18 10:07:39 +00:00
Edward Hervey 2d57bec920 decodebin3: Don't send sticky events to unlinked decoder
This causes a lot of nasty side effects (like decoders assuming they are
actually linked downstream).

The reason why this was done was to check whether a decoder could handle the
actual caps, but this is the wrong way to do it.

The proper way to query whether a decoder can handle certain caps is via
`GST_QUERY_ACCEPT_CAPS` which is already done just before.

Partially reverts !4677 and partially fixes #3160

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5821>
2023-12-18 09:29:52 +01:00
Xavier Claessens 533f814fd9 h264parse: test - AU align with SEI between frame slices
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5741>
2023-12-17 21:42:47 +00:00
Daniel Morin 49f200cb54 h264parse: Improved AU boundary detection
- AU boundary detection reviewed to follow more closely H.264 spec. and more
  specifically clauses 7.4.1.2.3 and 7.4.1.2.4.
- The gist of the changes is a look-a-head in then next AU required identify the
  last vcl-nal of current AU and firt vcl-nal of next AU (according to
  7.4.1.2.4) followed by the identification of the first nal of next AU
  (according to 7.4.1.2.3).
- A backlog of all nals of current AU and next AU up to the point where current
  AU can identified completed is kept.
- In NAL alignement mode vcl-nal are sent immediatly but the history is kept to
  allow AU boundary detection. Non-vcl-nal can be delayed up to the reception of
  the next vcl-nal to allow a correct AUD insertion.
- Based on this improved AU boudary detection we can avoid erronous AUD
  insertion, like the one highlighted by test
  test_parse_sliced_with_prefix_and_sei_nal_au.
- Add support for MVC AU boundary detection. (H.7.4.1.2.4)
- Explicitly report SVC not supported. We don't have the SVC NAL parsing
  required to identify boundary. (missing dependency_id and quality_id fields
  from SVC, see G.7.4.1.2.4)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5741>
2023-12-17 21:42:47 +00:00
Xavier Claessens f545e79bee meta: gst_meta_serialize() is not introspectable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5355>
2023-12-17 16:13:26 +00:00
Xavier Claessens f076a9bf2f unixfd: Serialize buffer metas
Serialize every GstMeta that supports serialization into the NEW_BUFFER
payload. This is especially important for GstVideoMeta in the case of
multiplanar buffers, or if stride!=width.

Sponsored-by: Netflix Inc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5355>
2023-12-17 16:13:26 +00:00
Xavier Claessens 06d9d934f9 meta: Add serialize/deserialize API
This allows metas to be serialized to be transmitted or stored. This is
intended to be used for example by gdppay or unixfdsink.

Implemented on GstCustomMeta, GstVideoMeta, GstReferenceTimestampMeta,
and GstAudioMeta.

Sponsored-by: Netflix Inc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5355>
2023-12-17 16:13:26 +00:00
Xavier Claessens 9501d64ccd structure: Add GST_SERIALIZE_FLAG_STRICT
It makes serialization succeed only if all values have a type that can
be deserialized.

Sponsored-by: Netflix Inc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5355>
2023-12-17 16:13:26 +00:00
Xavier Claessens 899d08722a buffer: Remove trailing space
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5355>
2023-12-17 16:13:26 +00:00
Philippe Normand 84d9e5b6e7 avviddec: Calculate latency only for fixed framerate
The framerate was checked correctly in _negotiate, but not in _set_format.

Also fix loss of precision in _negotiate when calculating the framerate.

Fixes #3093

Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5600>
2023-12-17 12:48:44 +00:00
Sebastian Dröge c4789e6de5 audio: Consider the expected timestamp for discont-wait handling
Otherwise if there is a huge gap it will only be considered a
discontinuity after another discont-time amount of buffers has passed.

Like this it will be immediately a discontinuity if the gap between the
expected and received time becomes bigger than the discont-time.

The last part of the test was actually testing for this behaviour and
expected the previous behaviour. Most other tests also had to be
adjusted because discont will now happen at slightly different times
than before.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5759>
2023-12-17 12:01:27 +00:00
He Junyan 35390de50d vacompositor: consider the DMA kind input for sink pad
Co-authored-by: Víctor Jáquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5160>
2023-12-16 10:56:09 +00:00
He Junyan 0bbaa00c3f vacompositor: Override the update_caps() of video aggregator class
The input of the vacompositor may be DMA buffers. And in this case, the input
caps has the format=DMA_DRM, which can not be recognized by base video
aggregator class' find_best_format() function. So we need to override the
update_caps() virtual function.

Also we consider the DMA kind caps in negotiated_src_caps() for output.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5160>
2023-12-16 10:56:09 +00:00
He Junyan e68724c8e0 vacompositor: add helper function to get formats from caps
Co-authored-by: Víctor Jáquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5160>
2023-12-16 10:56:09 +00:00
He Junyan c76999fe7b vacompositor: add helper function to choose format
The function is based on the most supported formats by Intel/Mesa VA drivers.

Co-authored-by: Víctor Jáquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5160>
2023-12-16 10:56:09 +00:00
He Junyan eb4d2dd204 vacompositor: record the input caps for each input pad
The caps of each input sink pad wil decide the final output format and
caps of the src pad.

Co-authored-by: Víctor Jáquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5160>
2023-12-16 10:56:09 +00:00
Arun Raghavan ee903a5afd rtp: Fix incorrect RTP channel order lookup by name
The g_ascii_strcasecmp() logic is inverted, since it returns 0 on equality.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5815>
2023-12-15 15:21:20 -05:00
Seungha Yang 800a83b435 d3d12decoder: Implement threaded decoding
To achieve maximum throughput, waiting on command commit thread
is not ideal. And render-delay will introduce unwanted latency.
Best is to split thread and wait finished decoding job in a dedicated
output thread

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812>
2023-12-15 22:56:33 +09:00
Seungha Yang 7471db9a30 d3d12decoder: Disable d3d11 interop
It does not seem to work with some AMD iGPU

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812>
2023-12-15 20:40:21 +09:00
Seungha Yang 7afa914054 d3d12fence: Reset fence after waiting done
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812>
2023-12-15 19:48:40 +09:00
Seungha Yang a24a155279 d3d12: Enable debug layer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812>
2023-12-15 19:48:40 +09:00
Seungha Yang 7443cc00b5 d3d12: Requires ID3D12Device4 interface
ID3D12Device4::CreateCommandList1() method is required

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812>
2023-12-15 19:48:39 +09:00
Seungha Yang 818c95e8c3 d3d12: Update allocation params signalling
Sync up with d3d11 implementation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812>
2023-12-15 19:48:36 +09:00
Eva Pace e5194d4c45 examples: webrtc: update sendrecv dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5809>
2023-12-14 21:14:48 +00:00
Eva Pace c43c550c06 examples: webrtc: update multiparty-sendrecv dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5809>
2023-12-14 21:14:48 +00:00
Eva Pace 009e286375 examples: webrtc: ignore rust target folders
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5809>
2023-12-14 21:14:48 +00:00
Eva Pace 914d46c02f examples: webrtc: update janus dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5809>
2023-12-14 21:14:48 +00:00
Xavier Claessens d2fb30a188 devenv: Whitelist all plugins to be able to run tests
Meson devenv already overrides GST_PLUGIN_PATH and
GST_PLUGIN_SYSTEM_PATH so only built plugins can be found. That means
unit tests are allowed to use every plugins.

This makes easier to run some unit tests under devenv instead of through
"meson test".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5748>
2023-12-14 15:09:35 +00:00
Víctor Manuel Jáquez Leal 8210784dab vabasedec: clean up decide_allocation() vmethod
When creating a new VA pool set config size to zero because it's not used.

Also, given the potential different sizes from software buffer pools and VA
buffer pools, this patch handle that potential different values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5805>
2023-12-14 12:50:32 +00:00
Víctor Manuel Jáquez Leal 4fab6bb45a vabasetransform: clean up decide_allocation() vmethod
When creating a new VA pool set config size to zero because it's not used.

Also, given the potential different sizes from software buffer pools and VA
buffer pools, this patch handle that potential different values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5805>
2023-12-14 12:50:32 +00:00
Víctor Manuel Jáquez Leal 33e49023ff vacompositor: clean up decide_allocation() vmethod
When creating a new VA pool set config size to zero because it's not used.

Also, given the potential different sizes from software buffer pools and VA
buffer pools, this patch handle that potential different values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5805>
2023-12-14 12:50:32 +00:00
Víctor Manuel Jáquez Leal 1c7ce208bd vapluginsutils: add helper gst_va_create_other_pool()
This helper function creates a software-based buffer pool, where if size is
zero, its value is retrieved from the canonical size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5805>
2023-12-14 12:50:32 +00:00
Víctor Manuel Jáquez Leal 4a22cc8fb3 va: no need to provide a buffer size for VA pool
VA drivers allocate surfaces given their properties, so there's no need to
provide a buffer size to the VA pool.

Though, the buffer size is provided by the driver, or the canonical size
is used for single planed surfaces.

This patch removes the need to provide a size for the function
gst_va_pool_new_with_config() and adds a helper method to retrieve the surface
size, gst_va_pool_get_buffer_size(). Also change the callers accordingly.

Changes for custom VA pool creation will be addressed in the following commits.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5805>
2023-12-14 12:50:32 +00:00
Seungha Yang fab1c5f953 d3d12: Use d3dx12.h helper library
... and remove manually implemented helper methods

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5807>
2023-12-14 18:08:00 +09:00
Seungha Yang 38c04a5f34 d3d12: Use DirectX-Headers and drop MinGW build support
There are some conflicts between MinGW toolchan and DirectX-Headers.
And due to ABI differences, more fixes are required.
We will support only MSVC build for now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5807>
2023-12-14 18:08:00 +09:00
Seungha Yang 92c3a22188 subprojects: Add DirectX-Headers wrap
For new features, we need newer SDK header than system installed one

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5807>
2023-12-14 18:08:00 +09:00
Mengkejiergeli Ba 41f13f4373 msdk: Remove dead code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5796>
2023-12-14 00:47:28 +00:00
Vivia Nikolaidou e451908a27 multiqueue: Don't stop dropping when an internal queue is empty
It is racy and may cause us to accidentally keep forwarding data past
the EOS. The only reason to stop dropping would be when we encounter a
stream-start, segment, or segment-done event, either in push_one
(already queued) or in the sink pad's event function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5766>
2023-12-13 20:36:47 +00:00
Jan Schmidt 37ba866d52 multiqueue: Ignore queue fullness for most events
Use gst_data_queue_push_force() for most events so they
are immediately enqueued. Only gap events and actual buffer
data will now block when the queue is full.

This fixes a problem with non-flushing seek handling
where events following a segment-done event would block
if they precede the SEGMENT event, since only SEGMENT
events would clear the 'eos' state of the multiqueue
queue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5801>
2023-12-13 15:31:45 +00:00
Jordan Petridis 5534527f5a pango: update wrap to 1.51.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5411>
2023-12-13 11:51:53 +00:00
Tim-Philipp Müller 2767993435 cairo: update wrap to 1.18.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5411>
2023-12-13 11:51:53 +00:00
Víctor Manuel Jáquez Leal f413714b37 vaallocator: use gst_va_display_check_version()
Instead of the local method to parse the vendor string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5800>
2023-12-13 09:12:28 +00:00
Víctor Manuel Jáquez Leal 8574bb8914 vadisplay: add gst_va_display_check_version()
This function compares the driver version with the user provided one to check if
driver's is equal or bigger.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5800>
2023-12-13 09:12:28 +00:00
Alexander Slobodeniuk 97e748466e aggregator: fix use-after-free in queries processing
Test included.
The problem appears when aggregator drops the query while
it's being proccessed by the klass->sink_query handler.
This can happen on FLUSH_START event. If the query is still
in the queue, it can be safely dropped, but if it's already
in the klass->sink_query() handler, then sink pad has no
choice and has to wait for the proccessing to complete.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5765>
2023-12-13 00:06:38 +01:00
Víctor Manuel Jáquez Leal 94e6a6e3de vaallocator: clean up use derived feature
Remove allocator member variable for use derived feature which doesn't need to be kept,
it's just for configuration purposes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5799>
2023-12-12 18:39:49 +01:00
He Junyan 5ae7bbf5fb va: h265dec: Add support for more -still and -intra profiles
They are actually compitable with the main and main-10 profiles.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5797>
2023-12-12 21:30:16 +08:00
He Junyan 5345652896 va: Add decoder compatible caps string field into profiles' map
Some profiles such as main or main-10 in HEVC can support more
compatible profiles such as main-still-picture or main-10-intra.
We should add them into decoder's sink caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5797>
2023-12-12 21:30:08 +08:00
He Junyan 354aceb9cd va: Add the entrypoint parameter to gst_va_profile_caps()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5797>
2023-12-12 20:41:54 +08:00
Mengkejiergeli Ba 484a636841 msdkvpp: Add fix_format for src caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Mengkejiergeli Ba 5536f742e9 msdk: Add a help func to fix the map
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Mengkejiergeli Ba 8081a665f8 msdk: Remove func to export dmabuf to va surface
Since we use va allocator and va dma allocator to create surface, the
surface is already exported in the case of dma allocator. So remove
redundant export function in msdk allocator.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Yinhang Liu 61282ebd34 msdkenc: Add modifier support
Co-authored-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Yinhang Liu 9ccdfae545 msdkvpp: Add modifier support
Co-authored-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Yinhang Liu 63c0fdd29a msdkdec: Add modifier support
Co-authored-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Mengkejiergeli Ba e65e954e2b msdk: Config pool with max/min number of buffers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Yinhang Liu e668cf9305 msdk: Add help functions to handle drm caps
Co-authored-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:03 +08:00
Yinhang Liu bf4703e9a0 msdk: Add modifier when creating dynamic caps
Add modifier in gst-inspect for dma features.

Co-authored-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 11:30:07 +08:00
Yinhang Liu 8100b04ea0 msdk: Add a helper function to get supported modifiers
The modifiers will be used when creating caps for dma feature.

co-authored-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 10:22:11 +08:00
Stefan Brüns ea6d602cca ladspa: Make RDF parsing truely optional
If the ladspa plugin is enabled explicitly or via auto-features, the
liblrdf dependency can not be disabled.

As the RDF parsing currently provides hardly any features, the possibility
to disable it fairly useful.

Fixes: #3168
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5794>
2023-12-11 14:49:42 +00:00
Kalev Lember 1dadccd48c openh264: Drop runtime version checks
With the way the runtime checks are currently set up, every single
openh264 release, no matter how minor, is considered an ABI break and
requires gst-plugins-bad recompilation. This is unnecessarily strict
because it doesn't allow downstream distributions to ship any openh264
bug fix version updates without breaking gstreamer's openh264 support.

Years ago, at the time when gstreamer's openh264 support was merged,
openh264 releases were done without a versioned soname (the library was
just libopenh264.so, unversioned). Since then, starting with version
1.3.0, openh264 has started using versioned sonames and the intent has
been to bump the soname every time there's a new release with an ABI
change.

This patch drops the strict version check. meson.build already has a
minimum requirement on openh264 version 1.3.0 where soname versioning
was added, which should be good enough to ensure that the library is
using soname versioning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5780>
2023-12-11 13:53:09 +00:00
Víctor Manuel Jáquez Leal 4f27b50c2e gtkglsink: template caps to only 2D & rectangle texture targets
Apparently external-oes is not supported by the plugin as texture target,
while DMABuf uploading prefers it because it's zero copy.

This patch enables DMABuf uploading and rendering by using either 2D or
rectangle texture targets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5795>
2023-12-11 13:17:48 +01:00
He Junyan fac9fb2174 codecs: correct the print log for h265 picture getting by poc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5789>
2023-12-11 10:24:34 +00:00
Jordan Petridis 30c968f0ee build/mse: Add the enum sources to the test gstmse_private_test_dep
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5763>
2023-12-11 06:39:29 +00:00
Olivier Crête e8d7604a6a adaptivedemux2: Parse cookies in downloadhelper
We need to parse any cookie headers, otherwise we end up
sending back attributes likes "Secure" and "httponly" which break
some servers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5776>
2023-12-09 18:30:30 +00:00
Doug Nazar 155224de96 audioringbuffer: Don't try to map MONO channel
Avoids critical message:

gstaudioringbuffer.c: line 2155 (gst_audio_ring_buffer_set_channel_positions):
should not be reached

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5721>
2023-12-09 17:01:41 +00:00
Sebastian Dröge 14b94ea00b rtpvp9pay: Don't include unused dboolhuff.h header
It's only used by the VP8 payloader.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5784>
2023-12-09 11:17:15 +00:00
Xavier Claessens b80f4a1fa4 v4l2src: Consider framerate during caps selection
This simplifies the way it picks the closest caps to preference and take into
consideration the framerate to avoid picking high resolution at 5fps or so.
Simply calculate a "distance" of caps A and B from the preference and put
closest first, sorting by framerate first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5777>
2023-12-08 21:05:46 +00:00
Alessandro Bono 81169fca8e gstdtlscertificate: Define _WINSOCKAPI_ before including windows.h
This avoid a build failure when compiling against OpenSSL 3.2.0. The
problem is when windows.h is included before WinSock2.h. Because
windows.h includes winsock.h[1]. Defining _WINSOCKAPI_ stops windows.h
including winsock.h.

Error:
```
[748/1041] Compiling C object ext/dtls/gstdtls.dll.p/gstdtlscertificate.c.obj
FAILED: ext/dtls/gstdtls.dll.p/gstdtlscertificate.c.obj
[...]
Windows Kits\10\include\10.0.17763.0\shared\ws2def.h(235): error C2011: 'sockaddr': 'struct' type redefinition
Windows Kits\10\include\10.0.17763.0\um\winsock.h(482): note: see declaration of 'sockaddr'
```

[1] https://stackoverflow.com/a/1372836

Closes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5770>
2023-12-08 08:13:40 +00:00
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