Commit graph

7327 commits

Author SHA1 Message Date
jadarve
fd25409a70 doc: fix Since marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:22 +00:00
jadarve
3323245606 mpegts: Added missing function prototype
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
5c3f3d8f16 doc: fix docstrings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
14c4d62915 doc: fix single line Since comments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
7f35a4f7c3 doc: fix Since marker for gst_mpegts_descriptor_from_metadata_pointer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
fad36407bb doc: update docstrings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
c12a861fb7 doc: update plugin cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
728c83f74d mpegtsmux: mux meta/x-id3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
0a57f361ce mpegts: use GstMpegtsMetadataApplicationFormat in metadata descriptor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
992a35b8f9 mpegts: added metadata pointer descriptor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
669a351c78 mpegts: moved metadata descriptors to gstmpegtsdescriptor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:20 +00:00
Tim-Philipp Müller
154b84649f info: remove unused valgrind header include
Follow-up to commit a2cbf75523.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7126>
2024-07-03 03:46:19 +00:00
Tim-Philipp Müller
6cc25bd630 subparse: remove regex optimized flag explicitly
That way the other flags in jit_flags are not touched and
flags changes in future only need to be done in one place.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7126>
2024-07-03 03:46:19 +00:00
Tim-Philipp Müller
084f6b3fbe gst-plugins-base: put valgrind header availability define into config.h for subparse
Make the valgrind header avaibility accessible to any code in
gst-plugins-base, currently it was only signalled to unit tests.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7126>
2024-07-03 03:46:19 +00:00
Alicia Boya García
506af5b8e4 gst-validate: Don't treat FALSE when sending flushes as an error
gst_element_send_event(FLUSH_START / FLUSH_STOP) returns FALSE in cases
where any of the most downstream elements have unlinked pads, even if
the pipeline is successfully flushed.

Currently this is considered expected behavior in GStreamer. This patch
updates gst-validate to treat it as such and therefore not fail the test
for a "failing" flush.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7064>
2024-07-02 19:06:02 +00:00
Chris Spoelstra
0f7bb97e81 srtsrc: fix case fallthrough of authentication param
Add missing breaks to two case statements.
Also adds a missing lock of srtobject->element when getting the value
of PROP_AUTHENTICATION.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4367>
2024-07-02 16:49:32 +02:00
Matthew Waters
5bbeccbb65 qml/glsink: also support GLES2 needing shader 'precision' directives
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3616
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7024>
2024-07-02 12:54:59 +00:00
Edward Hervey
01b397601f subparse: Don't use jitted regex when used with valgrind
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7117>
2024-07-02 09:44:25 +02:00
Vivia Nikolaidou
331b37ac9a ptpclock: Fix typo in comments
s/continous/continuous/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7121>
2024-07-02 00:08:28 +00:00
Edward Hervey
b2edab940a gstreamer/gst-tester: Don't leak thread
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115>
2024-07-01 23:19:40 +00:00
Edward Hervey
61a8d4d43d gst-inspect: Fix leak of plugin/feature
Reordering changes the initial list head

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115>
2024-07-01 23:19:39 +00:00
Edward Hervey
2c1c1ec575 encoding-target: Chain up to parent class
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115>
2024-07-01 23:19:39 +00:00
Edward Hervey
651568d543 encoding-profile: Chain up to parent class finalize
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115>
2024-07-01 23:19:39 +00:00
Seungha Yang
c0a02affa4 d3d12: Add support for resource copy between d3d11 and d3d12
If driver can support cross-api resource sharing, use device-to-device
resource copy in d3d12upload/download elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7119>
2024-07-01 20:18:42 +00:00
Seungha Yang
6cac053549 d3d12bufferpool: Use shared heap by default
... to make cross-api resource sharing possible

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7119>
2024-07-01 20:18:42 +00:00
Shengqi Yu
1875c178cd v4l2object: use v4l2 reported width for padded_width when complex video formats
Stride means bytes per line, and padded_width means pixels. Here,
padded_width shoule be pix width reported by v4l2 instead of stride.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7076>
2024-07-01 18:53:04 +00:00
Sebastian Dröge
1159d7144a ges-uri-asset: Annotate async/sync/finish functions correctly
Due to bad naming, gobject-introspection can't figure these out itself and
prints a warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7118>
2024-07-01 13:10:27 +00:00
Edward Hervey
43bf898f2d nlecomposition: Don't leak atomic rc box
* gst_structure_get => increases ref
* query_ancestors_position: There are two refs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7116>
2024-07-01 12:25:41 +00:00
Edward Hervey
8addeae87b nlecomposition: Don't leak message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7116>
2024-07-01 12:25:41 +00:00
Edward Hervey
734ca44805 ges-layer: Don't use invalid layers
There's a possibility that there are no layers at that priority

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7116>
2024-07-01 12:25:41 +00:00
Edward Hervey
5d7a35ca59 ges-discoverer-manager: Properly initialize/free GRecMutex
Fixes small leak of mutex internals

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7116>
2024-07-01 12:25:41 +00:00
Sebastian Dröge
f8fb72b0d7 ajasrc: Drop some frames after signal recovery
After signal recovery the capture times for the next frames are simply
wrong. Experimentally this affected 2-3 frames and seemed to be related
to the buffer fill level after signal recovery, so drop at least 5
frames and up to fill level + 1 frames in this situation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7106>
2024-07-01 11:37:08 +00:00
Sebastian Dröge
63dec7c704 ajasrc: Reset clock after signal loss or signal change
Otherwise timestamps would continue as if there was no gap, and the next
frames until the clock has compensated would be all too late.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7106>
2024-07-01 11:37:08 +00:00
Thibault Saunier
5f50b93f0a meson: Remove duplicated library definitions for gstmse and gstanalytics
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7109>
2024-06-30 15:43:27 +00:00
Seungha Yang
c2531853fc d3d12commandallocatorpool: Remove unused methods
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7108>
2024-06-29 20:47:39 +09:00
Seungha Yang
c013e88295 d3d12decoder: Use sub-allocated bitstream buffer
Since a buffer resource will occupy at least 64KB,
allocating upload resource per decoding command might not be
an optimal approach. Instead, use sub-region of a upload resource
for multiple decoding command if sub-regions are not overlapped
each other.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7108>
2024-06-29 20:47:39 +09:00
Jordan Petridis
60454336c8 validate: Remove G_REGEX_OPTIMIZE usage
It's not needed and causes issues with valgrind (which doesn't support jit)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7112>
2024-06-28 14:13:31 +00:00
Tim-Philipp Müller
b4ebf52f06 subprojects: update liblc3 wrap to 1.1.1
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6407#note_2472538

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7111>
2024-06-28 13:38:36 +01:00
Guillaume Desmottes
037d36f28d rtmp2: guard against calling gst_amf_node_get_type() with NULL
gst_amf_node_get_type() raises a CRITICAL if called with a NULL node.
All callers were checking for this except those.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7103>
2024-06-28 07:18:29 +00:00
Xavier Claessens
84b3a0950d build: Add missing common options that are yielding in subprojects
- Align `glib_debug`, `glib_assert` and `glib_checks` options with GLib,
  otherwise glib subproject won't inherit their value. Previous names
  and values are preserved using Meson's deprecation mechanism.
- Add `extra-checks` and `benchmarks` options in the main project so it
  can be inherited in GStreamer subprojects.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1165>
2024-06-27 15:53:46 +00:00
He Junyan
77f779e86a vaav1enc: Move repeat header data to a dedicated buffer
When enable parallel encoding, it is possible that the unshown frame
is not output but it is already be marked as a repeated frame header.
So we need to use a dedicated buffer to hold the repeat frame header,
don't mix it with the orignal frame data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6867>
2024-06-27 12:48:37 +00:00
Seungha Yang
fca7e5aa23 video: convertframe: Add support for d3d12 conversion
Use d3d12convert in case of d3d12 memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7095>
2024-06-26 17:56:41 +00:00
Seungha Yang
76fd732d42 qsv: Check d3d shared resource tier using D3D11 API
We can check the tier using d3d11 API. Thus, don't need to
create d3d12 device

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7099>
2024-06-26 16:25:06 +00:00
Jan Schmidt
73480e60d0 adaptivedemux: Fix handling closed caption streams
Fix a typo "CLOSED_CAPTION" -> "CLOSED-CAPTION" and
a broken if statement that always bailed out for
closed captions

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6985>
2024-06-26 13:44:27 +00:00
Jan Schmidt
2bd682d326 webrtcdsp: Enable multi_channel processing
Enable multi_channel processing in webrtc-audio-processing when the
input or output has multiple channels.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3220
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7100>
2024-06-25 22:29:21 +10:00
Piotr Brzeziński
32d4e5f73c vtenc: Fix redistribute latency spam
Just a quick fix to only report the maximum noticed delay (measured by frames inside the encoder) instead of changing
the reported latency every time the number there changes, which is way too often.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7094>
2024-06-24 16:08:37 +02:00
Seungha Yang
e71ffe978a d3d12converter: Make sure data upload before executing compute shader
Use read d3d12 map, so that upload can happen if needed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7093>
2024-06-24 20:49:19 +09:00
Seungha Yang
245e15eab0 d3d12: Add ARGB64_LE format support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7093>
2024-06-24 20:11:21 +09:00
Seungha Yang
8c538c8122 d3d12: Add AV12 format support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7093>
2024-06-24 20:11:13 +09:00
Seungha Yang
2703f41da6 d3d12: Add NV16, NV61, and NV24 format support
Can reuse NV12 shader for the formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7093>
2024-06-24 20:10:50 +09:00
Seungha Yang
bb0f95a67f d3d12: Add A420, A422 and A444 format support
Adding A420/A422/A444 and its 10/12/16 bits format support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7093>
2024-06-24 20:10:50 +09:00
Seungha Yang
52bc28c93d d3d12: Add YUV 4:1:0 and 4:1:1 format support
Adding Y41B, YUV9, and YVU9 format support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7093>
2024-06-24 20:10:50 +09:00
Seungha Yang
69ea20b739 d3d12videosink: Present on GstVideoOverlay::expose()
... so that updated backbuffer can be swapped and presented

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7079>
2024-06-24 08:46:24 +00:00
Seungha Yang
25514c8fc1 d3d12: Add v216, v210, r210, v308, IYU2, RGB, BGR format support
Reuse the compute shader implemented for d3d11

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7092>
2024-06-23 22:30:40 +09:00
Seungha Yang
c1498851b3 d3d12: Add support for UYVY, VYUY, and YVYU
Use already implemented compute shaders

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7092>
2024-06-23 22:30:40 +09:00
Seungha Yang
6fcb5f6ae7 d3d12: Add RGB{16,15} and BGR{16,15} format support
d3d12 device can support B5G6R5_UNORM and B5G5R5A1_UNORM formats
in pixel shader. If the format is not supported by device,
U16_UINT format with compute shader will be used, like d3d11converter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7092>
2024-06-23 22:30:40 +09:00
Seungha Yang
94bb9fec58 d3d12: Add BGRA64 and BGR10A2 format support
Map BGRA64 and BGR10A2 to Y416 and Y410, respectively,
since it's possible RGB space decoder output

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7092>
2024-06-23 22:30:30 +09:00
Seungha Yang
66cc3ff84e d3d12: Add support for DXGI native packed YUV formats
Adding YUY2, Y210, Y216, and Y416 format support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7092>
2024-06-23 22:11:32 +09:00
Seungha Yang
dd4d85272e d3d12converter: Fix Y410 conversion
Adding format conversion helper and use compute shader in case that
output format does not support RTV.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7088>
2024-06-23 10:53:18 +00:00
Seungha Yang
f432e61bdc d3d12memory: Add support for UAV descriptor cache
Cache shader invisible UAV descriptor in memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7088>
2024-06-23 10:53:18 +00:00
Seungha Yang
ec06b0445e d3d12: Format table refactoring
Hide format table from header. This is a preparation for compute
shader based format support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7088>
2024-06-23 10:53:18 +00:00
George Hazan
9e1abc0797 parsebin: fix compilation problem with Visual C++ 2017
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7089>
2024-06-22 20:56:03 +03:00
Tim-Philipp Müller
03a60c9950 subprojects: bump opus wrap to 1.5.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7085>
2024-06-22 12:26:22 +01:00
Seungha Yang
5d18d8a109 d3d12converter: Upload shader buffer resources earlier
Schedule (semi-)static resource upload at converter creation time.
And use single resource for all vertex, index, and constant
buffers, since separate resources will waste GPU memory.
Note that size and address of a committed resource are 64K aligned
even if requested buffer size is small.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7081>
2024-06-21 20:16:19 +09:00
Edward Hervey
a20569b1ba basesink: Remove field not used
It was never actually used since it was introduced as part of the commit
introducing support for instant rate

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7077>
2024-06-21 09:29:48 +02:00
Seungha Yang
c5785fbeec d3d12converter: Make gamma remap work as intended
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7073>
2024-06-20 17:54:12 +00:00
Sebastian Dröge
8117ee4fa3 queue, queue2, multiqueue: Timestamps of gap events must be valid
This is checked in gst_event_new_gap() so doesn't have to be checked again here,
but simply can be asserted with a g_return_if_fail().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7071>
2024-06-20 20:02:43 +03:00
Sebastian Dröge
909cd6d865 queue: queue2: multiqueue: Don't work with segment.position if buffers have no timestamps
If the first buffers have no timestamp then the sink position would be
initialized to 0. The source pad might output this buffer, which would then
initialize the source position to 0 too.

Afterwards two buffers with a valid but huge timestamp might arrive before any
of them are output on the source pad. The first one would set the sink position
to a huge value, the second one would notice that the difference between the
huge value and 0 is certainly larger than max-size-time and consider the queue
as full.

Instead, simply don't update the times from buffers without timestamps and
assume whatever was set before is still valid, i.e. the buffer has the same
timestamp as the previous one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7071>
2024-06-20 20:02:43 +03:00
Seungha Yang
e90880e988 d3d12device: Don't warn for out of range device index
It can happen during enumeration as well, and it's expected error

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7070>
2024-06-20 14:23:13 +00:00
Seungha Yang
2983c50a9f d3d12device: Dump device feature support
... and use CD3DX12FeatureSupport helper class in d3dx12.h

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7070>
2024-06-20 14:23:13 +00:00
Edward Hervey
11ff2b2835 decodebin3: Fix keyframe drop probe handling
We were storing the probe id in a different structure (DecodebinOutputStream)
than the pad it is targetting (which is in MultiQueueSlot).

The problem is that when re-targetting outputs (to a different slot)... we would
end up having an invalid probe id, or not have a reference to an existing one.

Instead, store the probe id in the same structure as the pad it's targetting

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7069>
2024-06-20 12:56:46 +00:00
Edward Hervey
6aa0c8442d decodebin3: Fix detection of selection done
We should not assert if there are still some old streams that are waiting to be
deactivated.

Instead wait for them to be gone before posting the selection done message

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7069>
2024-06-20 12:56:46 +00:00
Seungha Yang
bdb12db5c6 d3d12device: Prevent too many in-flight GPU commands
Even if each element is checking its own in-flight commands,
total number of commands can get larger in case of complex pipeline.
Limits total number of in-flight commands at command queue level

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7066>
2024-06-20 00:58:45 +09:00
Seungha Yang
143efa2f86 d3d12commandqueue: Detect device removed event
Early return if device removed event is detected

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7066>
2024-06-20 00:07:41 +09:00
Seungha Yang
327fb9924c d3d12basefilter: Add adapter property
Allows initial GPU adapter selection

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7066>
2024-06-20 00:03:28 +09:00
Seungha Yang
2ec7d82bd7 d3d12: Move fence setter helper method to gst-libs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:48 +00:00
Seungha Yang
fa7c4a2e39 d3d12converter: Update API signature
Always use device's main direct queue, and control gpu waiting
behavior by using boolean value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:48 +00:00
Seungha Yang
f6eb3a01c0 d3d12memory: Hide fence value from header
Instead of exposing fence value to wait in header, user setter/getter
methods.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:47 +00:00
Seungha Yang
49c4247cb3 d3d12device: Add helper method for getting fence handle
Add get_fence_handle() method so that caller can get command queue's
dedicated fence handle from device

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:47 +00:00
Seungha Yang
289bc1d440 d3d12: Remove notify_com and notify_mini_object helper methods
Use private macros instead of exposing multiple APIs for the same thing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:47 +00:00
Seungha Yang
6942868bda d3d12commandqueue: Update API name and arguments
Accepts multiple fences since single command list may have
multiple dependent resources which are associated with
different GPU engines

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:47 +00:00
Seungha Yang
713ea313f8 d3d12device: Use HRESULT return code if possible
Make function signature consistent with that of command queue

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:47 +00:00
Stéphane Cerveau
a4c976dd20 vkdecoder: support layered and non dedicated DPB
As NVIDIA Amperium. In this case the each output buffer is also a DPB,
but using a different view layer.

Still pending a validation layer issue:

VUID-VkVideoBeginCodingInfoKHR-flags-07244

Co-authored-by: Victor Jaquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6954>
2024-06-19 10:37:32 +00:00
Tim-Philipp Müller
8d845d4a02 rtpdtmfsrc: minor logging clean-up
Only serialise event structure for debug logging purposes
if logging is actually enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7060>
2024-06-19 07:32:49 +00:00
Tim-Philipp Müller
62047a9f8d rtpdtmfsrc: fix leak when shutting down mid-event
.. and update rtpdtmfdepay unit test to trigger
the potential leak more reliably (without the fix).

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3633

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7060>
2024-06-19 07:32:49 +00:00
Thibault Saunier
c8dfb7c8f0 validate: tool: Use gst_macos_main
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7056>
2024-06-18 22:31:40 +00:00
Tim-Philipp Müller
e35c08c067 testsuites: remove prores reverse playback test from known issues list
Looks like it may have been fixed since (either in ffmpeg and/or gstreamer).

See https://gitlab.freedesktop.org/gstreamer/gst-libav/-/issues/45

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7042>
2024-06-18 20:27:15 +00:00
Daniel Morin
55b12a80d6 analytics: Add validation on classification analytics-meta
- Add valiation on parameters passed to gst_analytics_cls_add_cls_mtd.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7046>
2024-06-18 19:13:10 +00:00
Sebastian Dröge
9da1268656 video-info: Don't crash in gst_video_info_is_equal() if one videoinfo is zero-initialized
Instead handle it like gst_audio_info_is_equal() and consider both different.
And also add a shortcut for the pointers to both infos being equal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7055>
2024-06-18 17:47:14 +00:00
Edward Hervey
a4a21feb87 tsdemux: Fix maximum PCR/DTS values
* PTS/DTS are stored as 33 bit
* PCR is 33bit multiplied by 300

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7050>
2024-06-18 15:56:09 +00:00
Seungha Yang
339c81bac8 d3d12: Promote decoder and videosink rank to primary
It's proven that d3d12 performs better than d3d11 while
consumes less resources in various cases.
Assign primary+ rank to decoder and videosink in case of Windows10/11,
so that it can be tested widely

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7045>
2024-06-18 14:40:37 +00:00
Stéphane Cerveau
f40d947c4a vkoperation: support for query_result_status
query_result_status can be optional so we should not create
the query pool if the queue does not support it,
ie, AMD does not support VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR

In other use case such as VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, the
query pool must be created.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7043>
2024-06-18 12:13:41 +00:00
Stéphane Cerveau
71ebb20267 vkphysicaldevice: rename query to query_result_status
As only queryResultStatusSupport can be optional,
the variable name should be more specific.

queryResultStatusSupport reports VK_TRUE if query type
VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR and use of
VK_QUERY_RESULT_WITH_STATUS_BIT_KHR are supported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7043>
2024-06-18 12:13:41 +00:00
He Junyan
7589647c13 av1parse: Do not return error when expectedFrameId mismatch
According to the SPEC:
  The frame id numbers (represented in display_frame_id, current_frame_id,
  and RefFrameId[ i ]) are not needed by the decoding process, but allow
  decoders to spot when frames have been missed and take an appropriate action.

So we should just print out warning and should not return error in parser when
mismatching. The decoder itself is already robust to handle the reference missing.

Fixes #3622

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7047>
2024-06-18 09:03:41 +00:00
Tim-Philipp Müller
7d05af9680 rtpdtmfdepay: add unit test for caps fixation issue with downstream audioconvert
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7036>
2024-06-18 00:11:28 +01:00
Tim-Philipp Müller
ab61233f30 rtpdtmfdepay: fix caps negotiation with audioconvert
Specify "layout" field in src template to make sure it's
set and gets fixated properly if the downstream element
supports both interleaved and non-interleaved caps.

Fixes

  gst_pad_set_caps: assertion 'caps != NULL && gst_caps_is_fixed (caps)' failed

critical with e.g.

  gst-launch-1.0 rtpdtmfsrc ! rtpdtmfdepay ! audioconvert ! fakesink

Not that the layout really matters in our case since we always
output mono anyway, but non-interleaved requires adding AudioMeta,
so this is the easiest fix.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7036>
2024-06-18 00:11:28 +01:00
Seungha Yang
e5d2dd8e8d d3d12videosink: Add direct-swapchain property
Because DXGI flip mode swapchain will disallow GDI operation
to a HWND once swapchain is configured, videosink has been creating
child window of application's window. However, since window creation
would take a few milliseconds, it can cause performance issue such as
UI freezing. Adding a property so that videosink can attach
DXGI swapchain diretly to application's window in order to improve
performance.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7013>
2024-06-17 16:05:00 +00:00
Seungha Yang
dd1d2f5ff7 d3d12videosink: Add external-window-only property
Adding a new property in order to avoid unintended interanl window
creation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7013>
2024-06-17 16:05:00 +00:00
Seungha Yang
37e1847464 d3d12videosink: Add support for window handle update
A large refactoring commit for adding features and improve performance

* Reuse internal converter and overlay compositor:
  Converter can be reused as long as input and display formats are not
  changed. Also overlay compositor reconstruction is required only if
  display format is changed

* Don't wait for full GPU flush on resize or close:
  D3D12 swapchain requires GPU idle in order to resize backbuffer.
  Thus CPU side waiting is required for swapchain related commands
  to be finished. However, don't need to wait for full GPU flushing.

* Support multiple sink on a single external window
  Keep installed subclass window procedure even if there's no associated
  our internal HWND. This will make window procedure hooking less racy.
  Then parent HWND's message will be transferred to our internal HWNDs
  if needed.

* Adding support for window handle update
  Application can change target HWND even when videosink is playing or
  paused state. So, users can call gst_video_overlay_set_window_handle()
  against d3d12videosink anytime. The videosink will be able to update
  internal state and setup resource upon requested.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7013>
2024-06-17 16:05:00 +00:00
Seungha Yang
c00c36e33b d3d12overlaycompositor: Remove unused parameter
Don't need to check fence value of overlay buffer since
window uses global direct command queue

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7013>
2024-06-17 16:05:00 +00:00
Seungha Yang
f91be03550 d3d12videosink: Calculate display resolution only per caps change
Don't need to calculate it per window property update

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7013>
2024-06-17 16:05:00 +00:00
Seungha Yang
db47f46ad7 d3d12commandqueue: Fix deadlock on drain()
Don't take lock if the drain() is called from the GC thread

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7013>
2024-06-17 16:05:00 +00:00
Seungha Yang
a2df44da7d d3d12: Workaround for Intel iGPU decoder crash
Observed Intel GPU driver crash when multiple decoders are
configured in a process. It might be because of frequent
command queue alloc/free or too many in-flight decoding commands.
In order to make command queue persistent and limit the number of
in-flight command lists, holds global decoding command queue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7019>
2024-06-17 15:15:07 +00:00
Piotr Brzeziński
e5b5d223b4 vtdec: Use GST_VIDEO_DECODER_ERROR instead of aborting when frame has an ERROR flag
This was already being used in handle_frame() for errors that happen when queueing a frame for decoding,
let's do the same when a frame is flagged with an error in the output callback.
From quick testing, this makes seeking more reliable (previously, it would sometimes cause a decoding error
and shut the whole decoder down due to GST_FLOW_ERROR).

Also manually sets the max error count to actually stop processing if too many errors occur.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6446>
2024-06-17 12:42:53 +00:00
Piotr Brzeziński
a5c437c643 vtdec: Handle some errors without stopping the decoder
ReferenceMissingErr is not critical and the simplest solution is to just ignore it. The frame has
the FrameDropped flag set when it occurs, so we can just drop it as usual.
BadDataErr is also not immediately critical, but in its case let's set the ERROR flag,
so the output loop can use GST_VIDEO_DECODER_ERROR to count and error out if it happens too many times.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6446>
2024-06-17 12:42:53 +00:00
Alicia Boya García
223b63b1d2 decodebin3: Add missing INPUT_LOCK() before ensure_input_parsebin()
ensure_input_parsebin() has a top comment saying it must be called with
INPUT_LOCK taken, but 2 out of 3 usages of the function call it without
taking that mutex.

This patch adds locking in these two remaining usages.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5279>
2024-06-17 10:15:28 +00:00
Sebastian Dröge
522704d308 av1dec: Don't treat decoding errors as fatal and print more error details
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7040>
2024-06-17 08:18:55 +00:00
Seungha Yang
6449bc3171 d3d12: Add support for DXGI debug layer
Will be enabled if GST_ENABLE_D3D12_DXGI_DEBUG env is set
and dxgidebug.dll is available.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7016>
2024-06-15 13:24:24 +00:00
Zach van Rijn
4729d24bb6 pcapparse: Avoid unaligned memory access
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3602
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7030>
2024-06-14 10:32:54 -05:00
Mathieu Duponchelle
a20ef245a0 rtspsrc: fix invalid seqnum assertions
Upon fatal errors the loop function will first post an error message
then push out an EOS event.

An application may react immediately to the error message by setting the
state of the pipeline to NULL, meaning by the time we push out the EOS
event PAUSED_TO_READY may have reset the seek seqnum to -1.

While this is harmless, the assertion when setting an invalid seqnum
isn't tidy, fix this by simply not resetting to INVALID as it serves no
practical purpose and the next READY_TO_PAUSED will select a new seqnum
anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7032>
2024-06-14 11:28:06 +02:00
Seungha Yang
0ed9c39835 nvcomp: Add nvCOMP library based GPU lossless compression plugin
Adding NVIDIA nvCOMP library based plugin for lossless raw video
compression/decompression. To build this plugin, user should
install nvCOMP SDK first and specify the SDK path via
"nvcomp-sdk-path" build option or NVCOMP_SDK_PATH env.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6912>
2024-06-13 18:19:08 +00:00
Seungha Yang
cee01d7fbd cuda: Load 1D memcpy method symbols
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6912>
2024-06-13 18:19:08 +00:00
Mathieu Duponchelle
deed29732b codectimestamper: never set DTS to NONE
If we want to avoid the DTS going backward, then we can set DTS to
last_dts as a last resort.

Log a warning in this case

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6977>
2024-06-13 16:25:57 +00:00
Seungha Yang
27662d5fb8 bufferpool: Clarify GstBufferPoolClass::start() usage
Make it clear that chaining up to the default implementation
is optional if subclasses do not want preallocation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6328>
2024-06-13 10:59:56 +00:00
Seungmin Kim
69d0501e8f meson: Fix libva.wrap meson build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7025>
2024-06-13 04:48:56 +00:00
Khem Raj
9a3c707fd4 uvcgadget: Use g_path_get_basename instead of libc basename
Musl does not implement GNU basename and have fixed a bug where the
prototype was leaked into string.h [1], which resullts in compile errors
with GCC-14 and Clang-17+

| sys/uvcgadget/configfs.c:262:21: error: call to undeclared function 'basename'
ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
|   262 |     const char *v = basename (globbuf.gl_pathv[i]);
|       |                     ^

Use glib function instead makes it portable across musl and glibc on
linux

[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7a

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7006>
2024-06-12 12:20:45 -07:00
Jakub Vaněk
0b65f667af v4l2src: Interpret V4L2 report of sync loss as video signal loss
Certain V4L2 drivers can report that a video receiver is seeing
some signal, but that it is unable to synchronize to it. IOW: the driver
can sometimes report V4L2_IN_ST_NO_SYNC and not report V4L2_IN_ST_NO_SIGNAL.

In particular, I've seen the tc358743 (HDMI-to-CSI2 converter) driver
sometimes report this when deployed to a fleet of embedded Raspberry Pis.
The relevant kernel code is in [1]. The video output is not practically
usable when V4L2_IN_ST_NO_SYNC is reported (only visually corrupted frames,
sometimes with random "snow", are received). I assume that this happens when
either the HDMI cable is poorly plugged in or damaged or when a CSI2 FFC
cable is used and is damaged.

The change in this commit is useful for detecting this working-but-not-really
condition in application code. Applications already listening for the "Signal lost"
message will gain the ability to handle this condition.

There seem to be more V4L2 error flags like this, see [2]. However, I do not
have practical experience with them and adding only V4L2_IN_ST_NO_SYNC seems
like a safer option.

[1]: https://github.com/raspberrypi/linux/blob/be8498ee21aa/drivers/media/i2c/tc358743.c#L1534
[2]: https://www.kernel.org/doc/html/v6.6/userspace-api/media/v4l/vidioc-enuminput.html

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7021>
2024-06-12 17:26:48 +00:00
Matthew Waters
050c622b7f vulkan/swapper: expose choose_queue() in docs
It was missing a doc trigraph.

Also mark input queue argument as nullable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7023>
2024-06-12 23:37:58 +10:00
Sebastian Dröge
53f8621e00 av1enc: Handle force-keyunit events properly by requesting keyframes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7008>
2024-06-12 10:41:55 +00:00
Edward Hervey
98e4d90519 adaptivedemux2: Don't send FLUSH_{START|STOP} when losing sync
The initial goal was to support the case where we are paused watching a live
stream, and when we resume we can no longer resume from the previously
downloaded position. In that case we internally do a flushing seek back to the
"current live head position". This was also extended since to be able to
handle (utterly broken) servers when we can't really figure out where we are
anymore and therefore trigger that lost sync so we can try to get back on our
feet.

This does fix the issue... but results in spurious FLUSH_{START|STOP} events
being sent downstream. While that's fine for regular playback scenarios, it's a
bit of a wild scenario since a lot of pipelines/applications don't expect such
events when it wasn't triggered by downstream/application.

Fixes #3605

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7005>
2024-06-12 06:05:24 +00:00
Edward Hervey
c5a39f2dfa uridecodebin3: Don't hold PLAY_ITEMS lock when activating them
Once the item is configured it can be activated without holding that lock

Fixes #3610

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7015>
2024-06-11 16:42:27 +00:00
Edward Hervey
74dbbe0091 decodebin3: Always ensure we end up with parsebin or identity
This fixes a regression introduced by 6c4f52ea20

There are cases where the input stream will be push-based, time-segment and not
have a collection nor caps. This means the event-based checks are not sufficient
to decide when/where to plug in a identity or parsebin to process the input.

For those corner cases we setup a buffer probe to ensure we always end up with
at least a parsebin

Fixes #3609

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7010>
2024-06-11 14:57:34 +00:00
Seungha Yang
00536ea232 wasapi2: Adjust log level in device enumeration path
Audio device at requested index might not be available, but that's
expected case when enumerating devices.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6996>
2024-06-11 11:11:30 +00:00
Mengkejiergeli Ba
248556d823 msdkvpp: Add a huge value to inbuf pts and set mfx surface timestamp
It can be seen as a WA in the case of multi-channel transcoding (like
decoder output to two channels, one for encoder and one for vpp).
Normally, encoder sets min pts of a huge value to avoid negative dts,
while vpp set pts without this addtional huge value, which are likely to
cause input surface pts does not fit with encoder (since both encoder
and vpp accept the same buffer from decoder, means they modify the timestamp
of one mfx surface). So we add this huge value to vpp to ensure enc and
vpp set the same value to input mfx surface meanwhile does not break
encoder's setting min pts for dts protection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6971>
2024-06-11 05:21:42 +00:00
Seungha Yang
20852ba028 d3d12videosink: Disconnect window signal handler on dispose as intended
Fixing typo

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7012>
2024-06-10 23:33:26 +09:00
Seungha Yang
20db3369d3 d3d12videosink: Add error-on-closed property
Adding a property to control error reporting behavior when output
window is closed in playing or paused state. This can be useful
for apps where an app wants to close window even if it's playing
a stream, and the closed window is expected.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6939>
2024-06-09 16:48:41 +00:00
Guillaume Desmottes
81de6b7738 subparse: fix typefind with small srt files
The typefind code was rejecting content smaller than 128 bytes making it
impossible to play files with very small srt files.
But those can actually be properly detected so fix typefind to allow
smaller content and try its best with it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6937>
2024-06-07 11:28:49 +02:00
Guillaume Desmottes
f7c8f4bb26 subparse: add typefind tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6937>
2024-06-07 10:00:56 +02:00
Guillaume Desmottes
e2b1730398 typefindhelper: implement get_length on GstTypeFindBufHelper
Some typefind code may rely on gst_type_find_get_length() which was not
working when using the helper.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6937>
2024-06-07 10:00:56 +02:00
Guillaume Desmottes
9e3b1cfc49 subparse: properly group caps
No semantic change, but the way caps and macros were grouped was
confusing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6937>
2024-06-07 10:00:56 +02:00
Stéphane Cerveau
fe737fc274 vulkan: fix macos build
The VulkanSDK can be downloaded from LunarG website and can
be installed properly in /usr/local following:

https://vulkan.lunarg.com/doc/view/latest/mac/getting_started.html

Fixes partly #2372

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6669>
2024-06-07 03:16:26 +00:00
Matthew Waters
b6d03432b4 vulkan/fullscreenquad: add check for unset video info
So we don't crash when set_info() is not called.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7000>
2024-06-07 01:44:32 +00:00
Matthew Waters
e925f22f33 vulkan/fullscreenquad: allow setting NULL input/output buffer to unset
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7000>
2024-06-07 01:44:32 +00:00
Nirbheek Chauhan
a1463637e0 pango: Add a property to compensate for display response time
When measuring video latency, one mechanism involves taking a photo
with a camera of two screens showing the test video overlayed with
timeoverlay or clockoverlay. In these cases, if the display's pixel
response time is crappy, you will see ghosting due to which it can be
quite difficult to discern what the current timestamp being shown is.

This commit adds a property that *also* shows the timestamp in
a different (sequentially predictable) location every frame, which
makes it easy to tell what the latest rendered timestamp is.

For bonus points, you can also use the fade-time of the previous frame
to measure with sub-framerate accuracy when the photo was taken, not
just clamped to the framerate, giving you a higher precision latency
value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6935>
2024-06-06 14:03:04 +00:00
Seungha Yang
afb62e98c7 cuda: Enable x86 NVMM support again
It was broken since memory copy helper function was moved to gst-libs.
Also, adding "cuda-nvmm" and "cuda-nvmm-include-path" build options
to en/disable NVMM support in gstcuda library

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6978>
2024-06-06 12:16:50 +00:00
Seungha Yang
6fb0c7b928 examples: cuda: Add CUDA memory synchronization example
Add an example code for external CUDA context sharing and
gst_cuda_memory_sync()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6864>
2024-06-06 11:27:26 +00:00
Stéphane Cerveau
a17957a7c8 vulkan: remove remaining GST_VULKAN_HAVE_VIDEO_ENCODERS
Some define use have been forgotten in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6992

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7001>
2024-06-06 10:32:51 +00:00
Sebastian Dröge
441e71d1ff flvmux: Use GDateTime instead of gmtime()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6872>
2024-06-06 08:33:51 +00:00
Sebastian Dröge
a6a1fd03cc rtspconnection: Use GDateTime instead of gmtime()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6872>
2024-06-06 08:33:51 +00:00
Sebastian Dröge
400c379c3d mxf: Use GDateTime instead of gmtime()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6872>
2024-06-06 08:33:51 +00:00
Sebastian Dröge
542fa9be89 examples: rust: Update various dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6999>
2024-06-06 09:44:59 +03:00
Edward Hervey
4f94749665 gstpromise: Don't use g_return_* for internal checks
If assertion/checks are disabled bad things will happen and the function won't
return as expected

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6993>
2024-06-05 18:47:05 +00:00
Stéphane Cerveau
df33ae2da6 gst-plugins-bad: tests: rename vkvideoencode tests
Rename vulkan encode tests to be able to use the namespace
libs_vkvideoencode*.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6992>
2024-06-05 17:50:27 +00:00
Stéphane Cerveau
21ee264d65 vulkan: remove GST_VULKAN_HAVE_VIDEO_ENCODERS
Use 2.3.275 as first supported SDK version

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6992>
2024-06-05 17:50:27 +00:00
Stéphane Cerveau
b9633cb766 vkqueue: remove useless decoder include
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6992>
2024-06-05 17:50:26 +00:00
Corentin Damman
bdeabcc4a6 gstqsg6material: fix RGB format support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6991>
2024-06-05 16:49:06 +00:00
Thibault Saunier
11f96ce4dd autoconvert: Fix race condition when creating sub elements
There was a case where the element would get destroyed while being
added to the hash table of elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6989>
2024-06-05 12:53:45 +00:00
Sebastian Dröge
c14a2d7d6d video: Document UL_LR / UR_LL video orientation methods correctly
They're not flipping along the diagonal axis but a flip and rotation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6936>
2024-06-05 11:37:13 +00:00
Chun-wei Fan
d024ee4303 GTK plugin: Support OpenGL/WGL on Windows
This attempts to implement the gtkglsink element on Windows using WGL,
as there were some more gotchas that are along the way, since we need to
juggle with libepoxy along the way, meaning that we need a recent
GTK+-3.24.x for this to work properly, i.e. the upcoming GTK+-3.24.43.

Since we are essentially using an overlay compositor only during
rendering, move its initialization and destruction into the
gtk_gst_gl_widget_render() function, so that things are safer as we are
doing things across threads between gstreamer (gst-gl) and GTK, as GL
operations, as above, have more gotchas on Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4289>
2024-06-05 08:53:19 +00:00
Sebastian Dröge
cfb59df83e dtlssrtpenc: Don't crash if no pad name is provided when requesting a new pad
It is mandatory to provide a valid pad name for dtlssrtpenc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6984>
2024-06-05 07:30:36 +00:00
Edward Hervey
6c4f52ea20 decodebin3: Avoid usage of parsebin even more
When dealing with push-based inputs, we are now delaying the creation of
parsebin/identity until we get all pre-buffer events.

We therefore can simplify the handling of new pads being linked and only have to
check if upstream can handle pull-based or not.

Avoids creating parsebin for parsed upstream data altogether

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6953>
2024-06-04 14:44:14 +00:00
Matthew Waters
013026b06a vulkan/videofilter: add getters for queue/device/instance
Allows bindings to not pke at structs for this information.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6987>
2024-06-03 00:06:18 +10:00
Matthew Waters
a7a70ca7b6 vulkan/fullscreenquad: add get_queue()
Allows bindings to not poke at the instance struct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6987>
2024-06-03 00:06:18 +10:00
Matthew Waters
5e182c911c vulkan/fullscreenquad: mark set_info GstVideoInfo as const
It's not modified by the function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6987>
2024-06-03 00:06:18 +10:00
Piotr Brzeziński
9ca8f16a3b macos: Listen for audio devices being added/removed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6981>
2024-06-01 13:21:59 +00:00
Matthew Waters
5b471311c5 vulkan: also support glslang as a shader compiler
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6980>
2024-06-01 12:41:49 +00:00
Matthew Waters
346df4cb3f vulkan: support not having glslc available for building vulkan plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6980>
2024-06-01 12:41:49 +00:00
Sebastian Dröge
9b60b32cf8 rtspsrc: Only update from the Content-Base header in the initial OPTION / DESCRIBE response
Some servers send a new content base in the SETUP response, which is
just the non-aggregate control URL of the individual streams.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3563

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6926>
2024-06-01 11:30:44 +00:00
Sebastian Dröge
e65344afac rtspsrc: Handle the case of * as session-wide control URL from the SDP
Just like the comment above says this is supposed to indicate that the
same URL should be used as for the connection so far. If encountering
this case simply do nothing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6926>
2024-06-01 11:30:44 +00:00
Sebastian Dröge
e73e34fd6f rtspsrc: Also handle rtsps:// and similar URLs as absolute in other places
Previously a direct comparison with `rtsp://` was performed, which
didn't catch cases like `rtsps://`.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3563

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6926>
2024-06-01 11:30:44 +00:00
Sebastian Dröge
966c39b92e rtspsrc: Don't try the SETUP workaround for broken servers with absolute control URIs
Previously only control URIs that started with "rtsp://" were ignored
but it makes more sense to ignore all absolute URIs.

gst_uri_is_valid() conveniently checks for exactly that.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3563

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6926>
2024-06-01 11:30:43 +00:00
Jakub Adam
c56a87b73d gldownload: use gst_gl_sync_meta_wait_cpu()
Simple gst_gl_sync_meta_wait() is not sufficient to ensure GL commands
are executed before dma-buf devices get to see the buffer.

This is the first step that should make the code behave correctly for
everybody, although there may be performance penalty. In the future we
should introduce a more general sync meta that would allow to move the
waiting from gldownload (the producer) to the sink elements (the
consumers).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6968>
2024-06-01 08:09:34 +00:00
Martin Nordholts
5d2421b8c8 gst_debug: Add missing gst_debug_log_id_literal() dummy with gst_debug=false
E.g. gst_debug_log_literal() already has a dummy variant.
gst_debug_log_id_literal() is simply missing, which can
cause link errors for project using gstreamer with
gst_debug=false.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6972>
2024-06-01 07:30:34 +00:00
Stéphane Cerveau
7bbf5fd801 vkutils: do not forget to clear context in case of error
The context is leaking in case of a failing instance open.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6975>
2024-05-31 14:44:09 +00:00
Stéphane Cerveau
c3f3fd7351 vkerror: free the error string after usage
g_set_error already used the var string, can clear it now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6975>
2024-05-31 14:44:09 +00:00
Edward Hervey
cb95ba72cf decodebin3: Include the stream-id in ERROR/WARNING/INFO messages
Allows application and other users to know to which stream the
error/warning/info message originated from.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6964>
2024-05-31 11:58:21 +00:00
Seungha Yang
fd21d97060 qtdemux: Handle keyunit trick mode in case of push mode too
Skip non-keyframe video frames if trickmode-keyunit flag is set

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5900>
2024-05-31 11:21:55 +00:00
Samuel Thibault
31047b878f ptp-helper: Add GNU/Hurd support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6970>
2024-05-30 16:14:29 +00:00
Seungha Yang
e9cefde479 d3d12memory: Fix staging buffer alignment
Not all GPUs can support arbitrary offset of
D3D12_PLACED_SUBRESOURCE_FOOTPRINT when copying GPU memory between
texture and buffer. Instead of calculating size/offset per plane,
calculate the entire size and offsets at once.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6967>
2024-05-30 10:40:44 +00:00
Edward Hervey
686d980955 uridecodebin3: Specify URI for INFO/WARNING/ERROR messages
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6929>
2024-05-29 22:24:07 +00:00
Edward Hervey
1f4c1c18ca gstmessage: Allow retrieving and setting details on messages
This was only available on warning/error/info messages creator/parsers. These
new functions make it more generic and also add a writable variant for users who
want to add/extend the details

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6929>
2024-05-29 22:24:07 +00:00
Nirbheek Chauhan
fe1a7edda2 gl: Fix libdrm dependency detection and usage
drm_fourcc.h should be picked up via the pkgconfig dep, not the system
includedir directly. All this allows it to be picked up consistently
(via the subproject, for example).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6932>
2024-05-29 15:49:45 +00:00
Nirbheek Chauhan
907aca399f msdk: Fix libdrm dependency detection and usage
drm_fourcc.h should be picked up via the pkgconfig include, not the
system includedir directly.

Also consolidate the libdrm usage in va and msdk.

All this allows it to be picked up consistently (via the subproject,
for example).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6932>
2024-05-29 15:49:45 +00:00
Nirbheek Chauhan
82b7850c2f libdrm.wrap: Bump to latest 2.4.120
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6932>
2024-05-29 15:49:45 +00:00
Nirbheek Chauhan
73cb87de4e libva.wrap: Bump to latest release 2.21.0, move to wrap-file
Since we no longer require a pre-release git commit, we an use
a tarball which is faster and easier to update/cache.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6932>
2024-05-29 15:49:45 +00:00
Nirbheek Chauhan
e3f086c648 meson: Don't use fallback: kwarg for libva deps
This will cause a fallback even when the `va` option is `auto`, not
giving the user a chance to provide the dependency via the system, and
likely building this feature unnecessarily.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6932>
2024-05-29 15:49:45 +00:00
Nirbheek Chauhan
deaa0aef79 va: Fix libdrm include
The libdrm/ prefix should not be used, it will be provided by the
pkgconfig file. Also HAVE_LIBDRM is necessary.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6932>
2024-05-29 15:49:45 +00:00
Víctor Manuel Jáquez Leal
236d6714ec msdkcaps: fix ill-format string
This patch fixes this critical warning when registering MSDK:

_dma_fmt_to_dma_drm_fmts: assertion 'fmt != GST_VIDEO_FORMAT_UNKNOWN' failed

It was because the HEVC string with possible output formats has an extra space
that could not be parsed correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6853>
2024-05-29 13:08:55 +00:00
Edward Hervey
94646c642d decodebin3: Specify stream-id for missing decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6886>
2024-05-29 11:44:06 +00:00
Edward Hervey
c987eaa427 pbutils: Missing plugin messages can contain the stream-id
In order to help users and applications, allow setting the stream-id for which
there is a missing plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6886>
2024-05-29 11:44:05 +00:00
Seungha Yang
96cf3d7063 d3d12encoder: Do not print error log for not-supported feature
gst_d3d12_result() will print message with ERROR level if failed.
Use FAILED/SUCCEEDED macros instead, since not-supported feature
is not a critical error

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6955>
2024-05-29 10:45:13 +00:00
Seungha Yang
ec11bb8253 d3d12memory: Allow null allocator in alloc()
Update code as documented

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6940>
2024-05-29 09:45:26 +00:00
Jakub Adam
859b1c8b63 glcolorconvert: update existing sync meta if outbuf has one
Instead of always adding a new one, which means the buffer could end up
with multiple sync meta instances.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6942>
2024-05-29 07:29:43 +00:00
Sebastian Dröge
529f2472b3 gstreamer: parse: Don't assume that child proxy child objects are GstObjects
The name is already passed via the signal parameters so it doesn't have
to be retrieved again via GstObject API, which would crash on other
GObjects. Child proxy child objects can be any kind of GObject and the
code here otherwise handles this correctly already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6938>
2024-05-29 05:33:03 +00:00
Nicolas Dufresne
79312357a6 av1parse: Properly transfer TU timestamp
When transforming from unknown alignment to frame or obu, the TU timestamp
was not properly transferred. Fix this by saving the TU DTS as the first
DTS seen within the the TU data, and the PTS as the last PTS seen in that
TU data. Finally, reset the TU timestamp after each TU have completed.

Fixes #1496

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6895>
2024-05-28 23:59:36 +00:00
Nicolas Dufresne
5b1bc0f19f av1parse: Only place a marker on the last frame of a TU
Markers are meant to indicate the buffer that ends a frame, which imply
something can be displayed. The dependent decode only frames should not
have markers. This should also fix last subframe detection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6895>
2024-05-28 23:59:36 +00:00
Francisco Javier Velázquez-García
5fe7803128 docs: Correct pipeline examples in rawaudioparse
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6933>
2024-05-28 22:20:08 +00:00
Sebastian Dröge
bb6d737a1e typefind: Fix handling of ID_ODD_SIZE in WavPack typefinder
Chunks are always starting on an even position and this flag only
specifies that the last byte of the chunk is not valid.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3569

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6941>
2024-05-28 19:18:37 +00:00
Seungha Yang
a4dfca3ae4 webview2: Add user-data-folder property
Adding a propery to specify location of WebView2's user data folder
location.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6921>
2024-05-28 16:56:09 +00:00
Seungha Yang
05f9eadcaf qtmux: Handle time information value > UINT32_MAX
If any duration in timescale is larger than UINT32_MAX, use version 1
atom, otherwise file header will be constructed with truncated values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6843>
2024-05-28 16:09:58 +00:00
Seungha Yang
c1b1c849f2 d3d12: Add support for Device Removed Extended Data (DRED)
Enable DRED if "d3d12dred > GST_LEVEL_ERROR", and print
DRED debug information on device removed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6718>
2024-05-28 15:09:21 +00:00
Edward Hervey
c924e4cc1e hlsdemux2: Minor refactoring of starting segment check
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6610>
2024-05-28 14:00:57 +00:00
Edward Hervey
5bc9883d68 hlsdemux2: Be more tolerant when matching segments with PDT
Some servers might not provide 100% matching PDT when doing updates, or accross
variants. This would cause the code matching segments using PDT to fail if the
segment PDT was 1 microsecond (or whatever small value) before the candidate
segment. And would pick the (wrong) following segment as the matching one.

In order to be more tolerant when matching, we instead check whether the
candidate segment is within the first segment of the segment we are trying to
match.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6610>
2024-05-28 14:00:57 +00:00
Edward Hervey
81fd460c90 hlsdemux2: Fix failure to find a replacement segment on resync
If we end up with a segment with an internal time that varies from the supposed
one, this could be for two reasons:
* We guess-timated the wrong segment to go to when advancing or switching
  variants. In that case we try to find the actual segment to go to (just before
  this change).
* There was a complete playlist change (for whatever reason) and we can't find a
  replacement. In that case we want to carry on playback from this position but
  need to remember that we moved (by setting the stream to DISCONT, and
  resetting the new mapping).

Fixes playback on several broken stream

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6610>
2024-05-28 14:00:57 +00:00
Edward Hervey
3e810a6721 hlsdemux2: Refactor update of GstHLSTimeMap values
This was also missing transferring the PDT if present

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6610>
2024-05-28 14:00:57 +00:00
Edward Hervey
9a7f455aea hlsdemux2: Fix parsing of EXT-X-DISCONTINUITY-SEQUENCE:0
Since the default value of `m3u8->discont_sequence` (before parsing of the
playlist data) was 0 .. we would never properly detect the presence of that
field if it was present with a value of 0.

This would later on cause havoc in playlist synchronization where we would
assume it didn't have a discontinuity sequence specified (whereas it did, and it
was 0).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6610>
2024-05-28 14:00:57 +00:00
Edward Hervey
d2b3262b71 hlsdemux2: Increase tolerance for discontinuity detection
A lot of streams will do a poor job of estimating proper duration of fragments
in the playlist, but over several fragments have it correct.

Instead of constantly trying to realign the estimated stream time, allow for a
more realistic tolerance of 3-4 video frames

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6610>
2024-05-28 14:00:57 +00:00
Edward Hervey
8b6e7a018c hlsdemux2: Ensure a discont will be set when resetting for lost sync
This is to ensures we inform the demuxer/parsers that what follows is not contiguous

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6610>
2024-05-28 14:00:57 +00:00
Edward Hervey
836bca461a hlsdemux2: Fix handling of variant switching and playlist updates
When updating playlists, we want to know whether the updated playlist is
continuous with the previous one. That is : if we advance, will the next
fragment need to have the DISCONT buffer set on it or not.

If that happens (because we switched variants, or the playlist all of a sudden
changed) we remember that there is a pending discont for the next fragment. That
will be used and resetted the next time we get the fragment information.

Previously this was only partially done. And it was racy because it was set
directly on `GstAdaptiveDemux2Stream->discont` when a playlist was updated,
instead of when the next fragment was prepared.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6610>
2024-05-28 14:00:57 +00:00
Edward Hervey
7d49b1cc51 adaptivedemux2: Only set DISCONT on beginning of fragments
This avoids accidentally setting it in the middle of a fragment, which could
cause havoc in demuxer/parsers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6610>
2024-05-28 14:00:57 +00:00
Edward Hervey
81c42ee14b hlsdemux2: Fix getting starting segment on live playlists
When dealing with live streams, the function was assuming that all segments of
the playlist had valid stream_time. But that isn't TRUE, for example in the case
of failing to synchronize playlists.

Fixes losing sync due to not being able to match playlist on updates

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6610>
2024-05-28 14:00:57 +00:00
Sebastian Dröge
9156b373e6 rtpbin: Regularly emit the sync signal
Even if no new synchronization information is available.

This is necessary because the timestamp offset logic in rtpbin depends
on the base RTP time that is determined by the jitterbuffer, but this
changes all the time (especially in mode=slave) and the timestamp
offsets have to be updated accordingly. Doing so is especially important
if they're only determined by the RTP-Info, which never changes from the
very beginning.

The interval can be configured via the new min-sync-interval property.
Synchronization happens at least that often, but at most as often as the
old sync-interval property allows.
Both intervals are now based on the monotonic system clock.

Additionally, clean up synchronization code a bit, only emit either
inband NTP or RTCP SR synchronization at the same time, based on which
one has the more recent time information, and only emit RTP-Info
synchronization if it wasn't provided previously at the same time as the
NTP-based synchronization information.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6543>
2024-05-28 11:52:31 +00:00
Sebastian Dröge
df8c29e340 rtpjitterbuffer: Set max-rtcp-rtp-sync-time to -1 (disabled)
There is generally no requirement to ignore RTCP SR if the RTP time of
the SR differs a lot from the last received RTP packet. The mapping
between RTP and NTP time stays valid until there was a stream reset, in
which case we wouldn't use that information anyway.

When using rtcp-sync-send-time=false the default of 1s difference can
easily be exceeded, e.g. if encoding of the stream after capture adds
more than 1s of latency.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6543>
2024-05-28 11:52:30 +00:00
Sebastian Dröge
95a0649945 rtpbin: Allow synchronizing against RTP-Info without having received any RTCP
Previously the information was provided from rtpjitterbuffer to rtpbin
only once the first RTCP SR was received, which is not necessary at all
as all required information is available from the caps already.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1162

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6543>
2024-05-28 11:52:30 +00:00
Sebastian Dröge
8bfba72ea4 rtpbin: Add new never/ntp RTCP sync modes
Never is useful for some RTSP servers that report plain garbage both via
RTCP SR and RTP-Info, for example.

NTP is useful if synchronization should only ever happen based on RTCP
SR or NTP-64 RTP header extension.

Also slightly change the behaviour of always/initial to take RTP-Info
based synchronization into account too. It's supposed to give the same
values as the RTCP SR and is available earlier, so will generally cause
fewer synchronization glitches if it's made use of.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6543>
2024-05-28 11:52:30 +00:00
Sebastian Dröge
158f12b5da rtpbin: Handle switches between RTP-Info and NTP-based stream association better
Instead of switching on the very first stream, require that all streams
have switched before switching to the different synchronization
mechanism.

Without this there will be a noticeable gap during the switch. E.g. when
going from RTP-Info to NTP-based association, first the first stream
only would get an offset, then the first two, ... then all of them.
Depending on the order of streams this will cause a lot of changes in
ts-offset during the transition.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6543>
2024-05-28 11:52:30 +00:00
Sebastian Dröge
b30671a8ee rtpbin: Pass NPT start from rtpjitterbuffer to rtpbin
And use it to detect synchronization changes (e.g. seeks) more reliably
when doing RTP-Info based synchronization.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6543>
2024-05-28 11:52:30 +00:00
Sebastian Dröge
3eb22af88b rtpbin: Clean up stream association state
Use fewer magic numbers and keep track of the different synchronization
mechanisms separately. Also keep track of more state to detect more
situations when resynchronization should happen.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6543>
2024-05-28 11:52:30 +00:00
Sebastian Dröge
d8dabf142f rtpbin: Constify function parameters and use correct types
Previously these parameters were randomly changed in the body of the
function to avoid having to declare a new variable, which made the code
very hard to follow. By marking them as const this won't be possible
anymore in the future.

Also the RTP clock-base (RTP time from RTSP RTP-Info) is an unsigned
64 bit integer as it's an extended RTP timestamp.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6543>
2024-05-28 11:52:30 +00:00
Sebastian Dröge
155c3fb3b2 rtpbin: Untangle NTP-based and RTP-Info based stream association
Both were entangled previously and very hard to follow what happens
under which conditions. Now as a very first step the code decides which
of the two cases it is going to apply, and then proceeds accordingly.
This also avoids calculating completely invalid values along the way and
even printing them int the debug output.

Also improve debug output in various places.

This shouldn't cause any behaviour changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6543>
2024-05-28 11:52:30 +00:00
Sebastian Dröge
7d0c7144ba rtpbin: Remove unused variable / function parameter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6543>
2024-05-28 11:52:30 +00:00
Sebastian Dröge
4421c3de75 rtpbin: Handle ntp-sync=true before everything else
This simplifies the code as it's a much simpler case than the normal
inter-stream synchronization, and interleaving it with that only
reduces readability of the code.

Also improve some debug output in this code path.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6543>
2024-05-28 11:52:30 +00:00
Sebastian Dröge
4b0e75a094 rtpbin: Add some documentation to gst_rtp_bin_associate()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6543>
2024-05-28 11:52:30 +00:00
Sebastian Dröge
70a435c0c4 rtpbin: Don't do any timestamp offsetting in rfc7273-sync=true mode
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1160

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6543>
2024-05-28 11:52:30 +00:00
Piotr Brzeziński
4612a6795a vtenc: Enable HEVC with alpha encoding
Adds a separate vtenc_h265a element (with a _hw variant as usual) for the HEVCWithAlpha codec type.
Decided to go with a separate element to not break existing uses of the normal HEVC encoder.
The preserve_alpha property is still only used for ProRes, no need for it here because we explicitly say we want alpha
when using the new element.

For now, the HEVCWithAlpha has an issue where it does not throttle the amount of input frames queued internally.
I added a quick workaround where encode_frame() will block until enqueue_frame() callback notifies it that some space
has been freed up in the internal queue. The limit was set to 5, which should be enough I guess? Hopefully this is not
too prone to race conditions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6664>
2024-05-28 10:53:25 +00:00
Piotr Brzeziński
2aa1f465e2 vtenc: Add missing vtenc_h265 docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6664>
2024-05-28 10:53:25 +00:00
Edward Hervey
39f62862d8 decodebin3: Ensure we get a collection for parsed inputs
When we are dealing with parsed inputs (i.e. using identity), we need to ensure
that we have a valid stream collection (and therefore DBCollection) before
anything flows dowsntream.

In those cases, we hold onto those events until we get such a collection.

Fixes #3356

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
daa022b9ee decodebin3: New mechanism for handling collection and selections
This commit separates collection and selections into a new separate structure:
DecodebinCollection.

This provides a much cleaner/saner way of dealing with collections being
updated, gapless playback, etc...

There is now a list of DecodebinCollection in flight, of which two are special:
* input_collection, the currently inputted/merged collection
* output_collection, the currently active collection on the output of multiqueue

Handling GST_EVENT_SELECT_STREAMS is split, by looking for the collection to
which it applies. And the requested streams are stored in it. IIF that
collection is output_collection we can do the switch, else it will be updated
when it becomes active.

Detecting which collection/selection is active is done by looking at the
GST_EVENT_STREAM_START on the output of the multiqueue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
c4b625a3fe decodebin3: minor refactoring to identify selected stream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
bfb64f7f44 decodebin3: Debug line cleanups
Use identifiable items in log lines instead of random pointers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
39f2d96105 decodebin: Remove unused includes
* config.h is not used, plugin/element is registered in another file
* play-enum.h is not used

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
48cbb1c96f decodebin3: Remove un-needed variable
We don't do anything with the unknown streams. Detecting that a list of
requested streams don't apply to a given collection should be handled
before-hand

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
3acb219b76 decodebin3: Remove un-needed variable
pending_select_streams was only set just before releasing/taking the selection
lock in a single place. That temporary lock release is not needed and therefore
the variable isn't needed either

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
1ab0936196 decodebin3: Remove active_selection list
It's a duplicate of the list of slots which have an output. Use that instead.

Also when we fail to (re)configure an output, remove it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
ec468e9524 decodebin3: Cache slot stream_id and rename more variables
* Move the handling of GST_EVENT_STREAM_START on a slot to a separate function

* There was a lot of usage of `gst_stream_get_stream_id()` for the slot
active_stream. Cache that instead of constantly querying it.

* Rename the variables in `handle_stream_switch()` to be clearer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
49cd8213bf decodebin3: Refactor slot/output (re)configuration
* Re-use existing function where possible
* Only set/reset keyframe probe at unique places

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
faaedd2bb9 decodebin3: Refactor linking input to slot
The same sequence of calls was done when doing that

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
a96c761ed7 decodebin3: input_unblock_streams: Clarify variable
It's a list of pads, not slots

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
ceeea8afd6 decodebin3: Rename multiqueue related functions
To make clear on what they apply

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
fc96e29606 decodebin3: Refactor/rename slot/output
* Centralize associating an output to a slot in one function, including properly
  resetting those fields
* Rename functions to be more explicit
* Move code to "reset" an output stream into a dedicated function (will be used
later)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
1185a560c2 decodebin3: Refactor removal of slot/output from streaming thread
The code was identical in several places

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
b825b3547c decodebin3: rename/clarify eos and draining usage around multiqueue
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
f7207c24ff decodebin3: Document/refactor DecodebinInput handling
* Rename the function names to be clearer, with prefixes
* Pass the input (or stream) directly where appropriate
* Document usage, inputs, ownership
* Rename variables for clarity where applicable
* Avoid double lock/unlock if callee can handle it directly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
8fd4502ebc decodebin3: Move gstdecodebin3-parse.c into gstdecodebin3.c
Makes it easier to work with LSP

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
aeea856f4e decodebin3: Refactor incoming collection handling
Simplify its usage by having it directly create the message if the collection
changed. This is what caller were always doing and avoids releasing selection
locks yet-another-time

Also use it in more places to avoid code repetition

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
17e385a6ff decodebin3: Rename variable for clarity
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
c0c62388a3 decodebin3: Refactor GST_EVENT_SELECT_STREAMS handling
* The same code is used for the event, regardless of whether it's coming from
via a pad or directly on the element
* The pending_select_streams list content was never used, switch it to a boolean

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
dadaa33749 decodebin3: Don't forward select streams if we are handling it
Since the introduction of the "SELECTABLE" query, the usage of selection was
clarified. We don't need to forward the GST_EVENT_SELECT_STREAMS at this point.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:15 +00:00
Sebastian Dröge
2a58e6de8f gstreamer: ptp-helper: Use u64 instead of c_ulong for ifa_flags on Solaris/Illumos
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3553#note_2429400

Patch by Marcel Telka <marcel@telka.sk>.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6934>
2024-05-28 09:06:57 +03:00
Sergey Krivohatskiy
1c5e1798b6 flacparse: fix buffer overflow in gst_flac_parse_frame_is_valid
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6835>
2024-05-27 23:31:44 +00:00
Elliot Chen
7b547e044c autovideoconvert: should not forward the allocation query if no element is selected
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6927>
2024-05-27 22:46:31 +00:00
Francisco Javier Velázquez-García
b792b558ce meson: Correct typo in 'xptv formatter' description
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6931>
2024-05-27 19:28:20 +00:00
Sebastian Dröge
a7908b05da info: Make gst_debug_print_object() and gst_debug_print_segment() public
It can be useful in custom logging code to easily get string
representations of all kinds of objects or a segment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6820>
2024-05-27 17:08:03 +00:00
Philippe Normand
299a000917 webrtcbin: Allow session level setup attribute in SDP
An SDP answer can declare its setup attribute at the session level or at the
media level. Until this patch we were validating only the latter case and an
assert was raised in the former case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6930>
2024-05-27 14:21:15 +00:00
Guillaume Desmottes
0b17b17a8a basetextoverlay: use GST_DEBUG_OBJECT instead of GST_DEBUG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6918>
2024-05-27 08:36:17 +02:00
Sebastian Dröge
1c88b06912 gstreamer: ptp-helper: Use if_nametoindex and setsockopt on Solaris / Illumos too
Patch by Marcel Telka <marcel@telka.sk>.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3552

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6925>
2024-05-26 12:34:26 +03:00
Sebastian Dröge
354623a246 gstreamer: ptp-helper: Don't import Context trait multiple times unnecessarily
This only affected the Solaris / Illumos code path.

Patch by Marcel Telka <marcel@telka.sk>.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3551

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6925>
2024-05-26 12:34:21 +03:00
Sebastian Dröge
8bff6b4988 gstreamer: ptp-helper: Use c_ulong for ifa_flags on Solaris/Illumos
Based on a patch by Marcel Telka <marcel@telka.sk>.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3553

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6925>
2024-05-26 12:34:13 +03:00
Sebastian Dröge
1f12493787 gstreamer: Solaris/Illumos require linking to libnsl / libsocket for various socket APIs
Patch by Tim Mooney <Tim.Mooney@ndsu.edu> from OpenIndiana/oi-userland

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6925>
2024-05-26 12:33:50 +03:00
Víctor Manuel Jáquez Leal
ecf852d529 vulkanh264dec: code style fix
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6901>
2024-05-24 17:40:04 +00:00