Commit graph

120851 commits

Author SHA1 Message Date
Seungha Yang
6d28f3b2c6 nvcodec: Add a helper object for d3d12 interop
Adding new helper object for d3d12 -> cuda memory copy

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7480>
2024-09-14 15:33:44 +00:00
Seungha Yang
e962af3064 d3d12: Add gst_d3d12_get_copyable_footprints() method
This helper method will calculate buffer resource size and layout
required for (mutiple) texture resources to be stored in a single
buffer resource

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7480>
2024-09-14 15:33:44 +00:00
Seungha Yang
f3589b57d2 d3d12device: Hold compute queue
Compute queue will be used for async compute task or device-to-device
memory copy

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7480>
2024-09-14 15:33:44 +00:00
Seungha Yang
6f92807759 cuda: Load external resource interop symbols
Required for d3d12 interop

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7480>
2024-09-14 15:33:44 +00:00
Nirbheek Chauhan
577df3a02f meson: Re-added required: lines accidentally removed
Broke in e3f086c648

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7512>
2024-09-13 21:54:54 +00:00
Sebastian Dröge
762a281b0c matroskamux: Include end padding in the block duration for Opus streams
It has to be included in the block duration but in GStreamer we're not
including it in the buffer duration, so it has to be added again here.

Not including it in the block duration can lead to fatal errors when playing
back with Firefox if there are more padding samples than actual samples, e.g.

> D/MediaDemuxer WebMDemuxer[7f6a0808b900] ::GetNextPacket: Padding frames larger
> than packet size, flagging the packet for error (padding: {13500000,1000000000},
> duration: {6000,1000000}, already processed: false)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7502>
2024-09-13 20:38:51 +00:00
Sebastian Dröge
396ef0cbcf video: Don't overshoot QoS earliest time by a factor of 2
By setting the earliest time to timestamp + 2 * diff there would be a difference
of 1 * diff between the current clock time and the earliest time the element
would let through in the future. If e.g. a frame is arriving 30s late at the
sink, then not just all frames up to that point would be dropped but also 30s of
frames after the current clock time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7459>
2024-09-13 19:52:52 +00:00
Sebastian Dröge
cd5d03811d mpegtsmux: Wait for data on all pads before deciding on a best pad unless timing out
This makes sure that if upstream has different latencies that we're still
outputting buffers with increasining timestamps across the different streams
unless buffers are arriving after the latency deadline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7500>
2024-09-13 18:15:05 +00:00
Sebastian Dröge
256a941d3a splitmuxsink: Override LATENCY query to pretend to downstream that we're not live
splitmuxsink can't possibly know how much latency it will introduce as it always
keeps one GOP around before outputting something. This breaks the latency
configuration of the pipeline and we're better off just pretending that
everything downstream of the sinkpads is not live.

Especially muxers that are based on aggregator and time out on the latency
deadline can easily misbehave otherwise as the deadline will be exceeded usually.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7499>
2024-09-13 14:47:23 +00:00
Sebastian Dröge
e59056526a video-converter: Add fast path conversions between v210 <-> I420_10 / I422_10
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7504>
2024-09-13 13:11:31 +00:00
Sebastian Dröge
03d2b28559 aggregator: Immediately return NONE from simple_get_next_time() on non-TIME segments
Otherwise this gives critical warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7511>
2024-09-13 12:23:52 +03:00
Arun Raghavan
f30321538b pad: Check data NULL-ness when probes are stopped
We were correctly handling this for buffers, but not events and queries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7493>
2024-09-12 05:47:16 +00:00
Seungha Yang
e4220fa9a8 cuda: Update gir
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7427>
2024-09-11 17:15:14 +00:00
Seungha Yang
25f696c7c0 examples: Add application CUDA memory pool example
An example to show application managed CUDA memory pool usage

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7427>
2024-09-11 17:15:14 +00:00
Seungha Yang
ad02fae416 cuda: Add support for application cuda memory pool
Adding gst_cuda_register_allocator_need_pool_callback() method
to support memory allocation from application's CUmemoryPool

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7427>
2024-09-11 17:15:14 +00:00
Seungha Yang
3c3b8e79c2 cuda: Add CUDA memory pool object
Adding a wrapper object for CUmemoryPool handle to use the native
handle in a refcounted way

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7427>
2024-09-11 17:15:14 +00:00
Seungha Yang
cdaa798ac7 cuda: Add methods to enable stream ordered allocation
Adding prefer-stream-ordered-alloc property to GstCudaContext.
If stream ordered allocation buffer pool option is not configured
and this property is enabled, buffer pool will enable the stream
ordered allocation. Otherwise it will follow default behavior.

If GST_CUDA_ENABLE_STREAM_ORDERED_ALLOC env is set,
default behavior is enabling the stream ordered allocation.
Otherwise sync alloc/free method will be used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7427>
2024-09-11 17:15:14 +00:00
Seungha Yang
d5d17d804e nvencoder: Disable stream ordered allocation
Stream ordered allocation is not supported by encoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7427>
2024-09-11 17:15:14 +00:00
Seungha Yang
f72a775d03 cudaipcsink: Disable stream ordered allocation
Legacy CUDA IPC does not support default CUDA memory pool

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7427>
2024-09-11 17:15:14 +00:00
Seungha Yang
b266aa5e65 cuda: Add support for stream ordered allocation
Default CUDA memory allocation will cause implicit global
synchronization. This stream ordered allocation can avoid it
since memory allocation and free operations are asynchronous
and executed in the associated cuda stream context

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7427>
2024-09-11 17:15:14 +00:00
Seungha Yang
174c9bfaa5 cuda: Load stream ordered allocation related symbols
Required to support async memory allocation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7427>
2024-09-11 17:15:14 +00:00
Carlos Bentzen
b9207beef6 meson: gst-play: link to libm
gst-play.c depends on libm due to using `round`.
Passing by, correct identation of `gst_tools` definition.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7492>
2024-09-10 23:15:05 +00:00
Nicolas Dufresne
9f5fd625a1 wayland: Set a debug category for the shm allocator
None was set, which meant the debug was associated with default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7482>
2024-09-10 21:35:18 +00:00
Nicolas Dufresne
a3bd3d676d wayland: Fix ABI break in WL context type name
While transforming the internals of waylandsink into a library, the
context type name was accidentally changed, causing an ABI break. Change
it back to its original (as used by the libgstgl), and add support for
the misnamed version as a backward compatibility measure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7482>
2024-09-10 21:35:18 +00:00
Thibault Saunier
9f898f839c validate: pad-monitor: Fix remaining pad functions data handling
That case was missed in a571753089

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7477>
2024-09-10 15:50:52 +00:00
Nirbheek Chauhan
f4af1f6e62 meson: Update openjpeg wrap to 2.5.2, fixes a warning
The version was incorrectly encoded in the opj_config.h header with
the earlier version, which caused a compilation warning.

```
../subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpegenc.c:943:5: warning: ‘bpp’ is deprecated:
Use prec instead [-Wdeprecated-declarations]
  943 |     comps[i].bpp = GST_VIDEO_FRAME_COMP_DEPTH (frame, i);
      |     ^~~~~
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7481>
2024-09-10 14:59:36 +00:00
Nirbheek Chauhan
e402ed86df vulkan: Fix some doc strings and also some g-i warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7481>
2024-09-10 14:59:36 +00:00
Thibault Saunier
0d24821167 validate: launcher: Add support for lldb
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7452>
2024-09-10 11:23:02 +00:00
Wim Taymans
1b5a093b96 jackaudiosrc: actually use the queried ports from JACK
When no ports are given, gst_jack_get_ports() is called to get all the
(physical) output ports but then the result is ignored, triggering the
"No physical output ports found..." error.

Instead, move the queried ports to the variable we're going to use
later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7474>
2024-09-10 06:20:06 +00:00
Thibault Saunier
a12a5f6a25 avvidec: Fix typo in error string
It was missing a space.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7483>
2024-09-09 18:19:46 -03:00
Randy Li (ayaka)
6f5bbd0276 v4l2bufferpool: actually queue back the empty buffer flagged LAST
The buffer would fail at gst_v4l2_is_buffer_valid() before,
since it has a reference on it, it is not writable.

Fixes: 105d232fde ("v4l2bufferpool: queue back the buffer flagged LAST but empty")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7479>
2024-09-09 20:20:07 +00:00
Diego Nieto
dcfc66a1ac fakevideodec: fix minimum allocation pool size
Before it was setting the minimum between 2 and the minimum gst_query_parse_nth_allocation_pool(). So, always
giving 2 or less.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7465>
2024-09-09 19:37:45 +00:00
Michael Tretter
76d753f1c5 uvcsink: set cur_caps to upstream selected caps
If the UVC gadget announces multiple formats in the descriptors the uvcsink
doesn't select the actual format but let's the UVC hosts select the format.

If the GStreamer pipeline is started before a UVC host selected the format,
upstream decides on a format until the UVC host has decided. In this case, the
current format needs to be set based on the caps from the caps event to be able
to detect if the format selection by the UVC host requires a format change on
the GStreamer pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7473>
2024-09-09 18:57:35 +00:00
Michael Tretter
f82a716009 uvcsink: skip comparison with prev_caps if they are not set
The uvcsink may be put into the READY state to start listening for UVC requests.
Therefore, the UVC host may set a streaming format before the GStreamer pipeline
is started and the uvcsink received a caps event. In this case, prev_caps will
be NULL.

If the EVENT_CAPS has not been received, skip the check if the format needs to
be changed, since the sink will be started with the format selected by the UVC
host, anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7473>
2024-09-09 18:57:35 +00:00
Kevin Wang
ab0a985c46 ffmpeg: Add valid values of AVDiscard
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7364>
2024-09-09 13:42:57 -04:00
Edward Hervey
2024287a39 mpegtsmux: Cleanup TsMuxStream fields
Instead of using plenty of case-specific booleans:
* Store type as GstStreamType
* Store unique stream type

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7476>
2024-09-09 14:51:13 +00:00
Jordan Petridis
595983df9f ci: Set SUBPROJECTS_CACHE_DIR variable
It's used in the build script and it fails if it's undefined.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7428>
2024-09-09 13:51:15 +00:00
Hou Qi
b1fd616514 v4l2videoenc: unref buffer pool after usage properly
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7435>
2024-09-09 12:46:18 +00:00
Tim-Philipp Müller
6394113b26 subprojects: update openh264 to 2.4.1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7468>
2024-09-08 15:31:27 +00:00
Edward Hervey
2f2d1c3160 gstplay: Name the different bus
Makes it clearer when reading logs which one is which

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7462>
2024-09-08 12:56:14 +00:00
Thibault Saunier
a571753089 validate: pad-monitor: Fix pad function data properly
Until now we were overriding pad functions forgetting about the function
data (that are set using the _full variant of the functions setters), meaning
that the data was lost and any user of that feature would get empty data when
the wrapped function were called.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7466>
2024-09-08 12:02:25 +00:00
Sebastian Dröge
e5133033fa clock: Use external / internal as term for the two clock bases everywhere
It was confusing that some functions were using master for the external time and
slave for the internal time. This is not consistently using external / internal
when talking about concrete clock times.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7456>
2024-09-08 11:42:38 +01:00
Sebastian Dröge
f463d4c3c1 clock: Use nullable / optional annotations instead of ambiguous allow-none
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7456>
2024-09-08 09:54:56 +00:00
Thibault Saunier
97e5749bfc ges: discoverer-manager: Fix race leading to assertion when stopping
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3757

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7421>
2024-09-07 16:55:56 +00:00
Sebastian Dröge
2d989058a7 ci: Update to cargo-c 0.10.4
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7458>
2024-09-05 20:05:38 +00:00
Sebastian Dröge
0f5e894931 ci: Update to Rust 1.81
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7458>
2024-09-05 20:05:38 +00:00
Thibault Saunier
9f410a8714 validate: scenario: Handle the fact that structs field names don't have a static lifetime anymore
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7453>
2024-09-05 18:58:24 +00:00
Sebastian Dröge
ec11c337c3 validate: Properly use errors = 'replace' for handling invalid utf8 characters
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7453>
2024-09-05 18:58:24 +00:00
Seungha Yang
63dc54906b nvencoder: Prefer byte-stream format over packetized
Since old encoder implementation supported only byte-stream,
prefers byte-stream format for backward compatibility.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3787
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7457>
2024-09-06 01:10:14 +09:00
Michael Scherle
b1cda4439b va: restrict interpolation & scaling property to iHD driver
interpolation & scaling is supported for all hardware on
iHD driver. But not supported in mesa driver. see:

<https://github.com/intel/media-driver/issues/1843>
<https://gitlab.freedesktop.org/mesa/mesa/-/issues/11803>

improvment of:
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7301>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7443>
2024-09-05 13:11:37 +00:00