Commit graph

7725 commits

Author SHA1 Message Date
L. E. Segovia
572f2d10f5 meson: amfcodec: fix build with MinGW GCC 14
>  ../sys/amfcodec/include/core/PropertyStorage.h:87:50: error: 'virtual void
>   amf::AMFPropertyStorage::RemoveObserver(amf::AMFPropertyStorageObserver*)' was hidden [-Werror=overloaded-virtual=]

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7658>
2024-10-12 19:05:23 -03:00
L. E. Segovia
4af2121189 meson: d3d12: fix build with MinGW GCC 14
Also apply the d3d11 fix since both use the same header.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7658>
2024-10-12 19:01:46 -03:00
L. E. Segovia
f8d6b3d568 meson: d3d11: fix build with MinGW GCC 14
In my tests with the new GCC 14 compiler for Cerbero, I got the
following error:

> In file included from include/directxmath/DirectXMath.h:2275,
> from ../gst-libs/gst/d3d11/gstd3d11converter.cpp:46:
> include/directxmath/DirectXMathMatrix.inl: In function 'bool
>   DirectX::XMMatrixDecompose(XMVECTOR*, XMVECTOR*, XMVECTOR*, FXMMATRIX)':
> include/directxmath/DirectXMathMatrix.inl:1161:16:
>  error: variable 'aa' set but not used [-Werror=unused-but-set-variable]

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7658>
2024-10-12 19:01:13 -03:00
Jan Schmidt
6b94f22bd6 webrtcbin: Retrieve RR stats from internal sources
Check and generate remote reception statistics from the info stored on
internal sources, as they are stored there  when running against newer rtpbin
since MR !7424

This fixes cases where statistics are incomplete when
peers send RR reports from a single remote ssrc, which GStreamer does
when bundling is enabled and other RTP stacks may too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7425>
2024-10-12 04:12:22 +00:00
Nirbheek Chauhan
80bb69ba66 vtdec: Set input formats when we get incomplete caps
In some cases, decodebin3 will send us incomplete caps (not containing
codec_data), and then a GAP event, which will force a negotiation.
This segfaults due to a null pointer deref because self->input_state
is NULL.

The only possible fix is to avoid negotiating when we get incomplete
caps (to avoid re-negotiationg immediately afterwards, which isn't
supported by some muxers), but also set as much input state as
possible so that a renegotiation triggered by a GAP event can complete
successfully.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7634>
2024-10-12 01:31:52 +00:00
Nirbheek Chauhan
3fadf4807c lame: Disable tools when using the fallback subproject
This saves time when building, since we don't use the tools.

Particularly on macOS, due to a macOS bug, Meson picks up an invalid
ncurses-config binary and incorrectly detects the presence of ncurses,
causing a build failure. This is fixed in the latest meson:
https://github.com/mesonbuild/meson/pull/13715

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7611>
2024-10-11 21:20:59 +00:00
Jan Schmidt
885f16b3ac rtpsession: Fix a typo in docstring comment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7424>
2024-10-11 05:20:22 +00:00
Jan Schmidt
ef8dfd7873 rtpmanager: save the report block statistics in each RTPSource
Move RB info from receiver reports into the internal source that the RR
are about, and deprecate (but retain) the old mapping where each
external source has only a single RB entry in the rtp statistics.

The old method is broken if a remote peer uses a single ssrc to send
receiver reports for more than one of our internal sources, other
as multiple RB in a single packet, or alternate RB in different reports.
In each case only the most recent entry was kept, overwriting data for
other internal sources.

In multicast scenarios each internal source may receive multiple
receiver reports from different peers. To support that, all received
RR's are now stored into a hash table indexed by the sender's SSRC,
and all RRs are placed into an array when generating statistics, so
that the information from all peers is retrievable.

The current deficient behaviour (adding RB info into non-internal RTPSources) is
deprecated but kept in order to be backward compatible, and retained
that way in the generated statistics structure.

Refs
[1] https://tools.ietf.org/html/rfc3550#section-6.4.1

Based on a patch by Fede Claramonte <fclaramonte@twilio.com>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7424>
2024-10-11 05:20:22 +00:00
Xavier Claessens
b4ccd940d4 qroverlay: Change pixel-size to percent of width or height
The size is now expressed in percent of the smallest dimention. 100
means the biggest square that fits the render area.

Fixes: #3695
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7638>
2024-10-11 04:07:26 +00:00
Víctor Manuel Jáquez Leal
809ab829d0 tests: va: fix vapostproc test for DMABuf
Now it picks the first format in the template srcpad list and do
the convertion. Also the format size is reduced because not all
drives support 4K as DMABuf (radeonsi).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7636>
2024-10-10 16:34:04 -04:00
Seungha Yang
7c06001705 d3d12: Shorten various names
Update names of various objects and method to be shorter, for instance
GstD3D12CommandAllocator is changed to GstD3D12CmdAlloc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7642>
2024-10-10 10:35:36 -04:00
Seungha Yang
024f450204 d3d12: Fix typo in docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7642>
2024-10-10 09:21:54 -04:00
Seungha Yang
ef55b31f46 d3d12: Early error out on Signal() fail
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7642>
2024-10-10 09:21:54 -04:00
valadaptive
b923a3ed61 qtdemux: Add support for Lagarith fourcc tag
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6831>
2024-10-10 03:55:04 +00:00
valadaptive
6198c7fba2 riff: Add support for Lagarith fourcc tag
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6831>
2024-10-10 03:55:04 +00:00
Jordan Petridis
ab54e45f67 tests/lc3: Allocate the same size for the buffer and the data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7631>
2024-10-09 22:16:13 +00:00
Vivia Nikolaidou
384cb299ec mxftypes: Add support for a few additional fields
According to SMPTE ST 377-1:2019

Currently still unused.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7626>
2024-10-09 21:34:06 +00:00
Vivia Nikolaidou
1b81c9ca87 mxftypes: Check for the existence of all required fields
According to SMPTE ST 377-1:2019

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7626>
2024-10-09 21:34:06 +00:00
Vivia Nikolaidou
7cc16b64b7 mxfdemux: Keep tracking the offsets even when an index table was found
Some files may contain a partial index table, leading into a crash when
you try seeking in them

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7626>
2024-10-09 21:34:06 +00:00
Piotr Brzeziński
9a232f7983 vtenc: Don't call drop_frame() when flushing
Slipped through with earlier changes to use drop/release_frame() explicitly.
We should only drop when something goes wrong in the encoder, and just release otherwise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7475>
2024-10-09 20:29:52 +00:00
François Laignel
067fe7b9bc gst: structure: add more GstIdStr methods
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7613>
2024-10-04 11:19:46 +02:00
François Laignel
86776dc62e gst: structure: fix some GstIdStr documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7613>
2024-10-03 19:56:06 +02:00
Corentin Damman
16da96653a macos: Fix race conditions
This commit fixes two issues:
- The event must be posted *after* calling stop, otherwise a race condition can occur and the app never stops
- isFinishedLaunching and applicationDidFinishLaunching are not always synchronized, causing sometimes
  a deadlock on the g_cond_wait never catching the g_cond_signal

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7593>
2024-10-03 11:47:45 +02:00
Théo Maillart
aaf9b46e2f decodebin3: do not attempt to remove a null stream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7586>
2024-10-03 07:08:37 +00:00
Théo Maillart
4065ac5dcb decodebin3: protect internal reset with SELECTION_LOCK
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7586>
2024-10-03 07:08:37 +00:00
Théo Maillart
ed264d64b0 decodebin3: remove output event probe on remove input stream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7586>
2024-10-03 07:08:37 +00:00
Edward Hervey
b21ffc6b9f urisourcebin: Ensure all stream-start are handled
In order to ensure all initial events (stream-start, caps, ..) are present on
pads that we expose, those various sticky events are propagated (from parsebin
to multiqueue output, from multiqueue output to exposed pads).

The problem was that the "hack" in `urisourcebin` to inform downstream elements
that the stream is parsed data and a collection will be present was only done in
one place : a probe on the output of parsebin ... but the stream-start could
potentially have already been propagated to the output pads before that.

In order to fix that, we make sure any pending sticky stream-start event is
updated before being propagated.

Fixes #3788

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7598>
2024-10-02 21:29:00 +00:00
Olivier Crête
78775079c6 pbutils: Add LCEVC information to H.264 description
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7330>
2024-10-02 20:33:13 +00:00
Julian Bouzas
35354d4229 lcevcencoder: Add README.md
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7330>
2024-10-02 20:33:13 +00:00
Julian Bouzas
e99b42d924 lcevcdecoder: Add README.md
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7330>
2024-10-02 20:33:13 +00:00
Julian Bouzas
4c82416798 lcevcencoder: Add new LCEVC Encoder plugin
This new LCEVC encoder plugin is meant to implement all LCEVC encoder elements.
For now, it only implements the LCEVC H264 encoder (lcevch264enc) element. This
element essentially encodes raw video frames using a specific EIL plugin, and
outputs H264 frames with LCEVC data. Depending on the encoder properties, the
LCEVC data can be either part of the video stream as SEI NAL Units, or attached
to buffers as GstMeta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7330>
2024-10-02 20:33:13 +00:00
Julian Bouzas
cfc6b09693 lcevcdecoder: Add new lcevch264decodebin element
This new element wraps both the base H264 decoder and lcevcdec elements into a
bin so that LCEVC decoding works with auto-plugging elements such as decodebin.
By default, the H264 decoder element with higher rank is used as base decoder,
but any particular H264 decoder can be used by manually setting the base-decoder
property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7330>
2024-10-02 20:33:13 +00:00
Julian Bouzas
636690f2aa lcevcdecoder: Add new LCEVC Decoder plugin
This new LCEVC decoder plugin is meant to implement all LCEVC decoder elements.
For now, it only implements the LCEVC enhancement decoder (lcevcdec) element.
This element essentially enhances raw video frames using the LCEVC metadata
attached to input buffers into a higher resolution frame. The element is only
meant to be used after any base decoder (eg avdec_h264).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7330>
2024-10-02 20:33:13 +00:00
Julian Bouzas
9accf21e53 h264parse: Wait for SEI before exposing src caps
This makes sure 'lcevc=false' src caps are not set before parsing SEI. It is
needed for decodebin2 to work properly with the LCEVC decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7330>
2024-10-02 20:33:13 +00:00
Olivier Crête
8055b0386f h264parse: Don't fake IDR without at least an i-slice
There was an override to fake an IDR as soon as a SPS/PPS
is encountered, but that's not valid, at least an i-slice is needed.

Amend the visl result, as the output is slightly more correct, not
duplicating frame_num.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7330>
2024-10-02 20:33:13 +00:00
Julian Bouzas
2c514ac2f1 h264parse: attach LCEVC meta to buffers if it is present in SEI
This improves the h264parse element to attach LCEVC enhancement data to buffers
using the new GstLcevcMeta API. This metadata will eventually be used downstream
by LCEVC decoders to enhance the RAW video frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7330>
2024-10-02 20:33:13 +00:00
Julian Bouzas
fea8578ee9 codecparsers: Add LCEVC metadata API
This new metadata API allows elements to attach LCEVC enhancement data to video
buffers. Usually, the video parser elements are charged to parse the LCEVC
enhancement data from SEI Nal units (Supplemental enhancement Information).
However, other elements such as demuxers can also use this API if the LCEVC
enhancement data of the video is stored in a separate stream in the container.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7330>
2024-10-02 20:33:13 +00:00
Edward Hervey
32bf29d64d urisourcebin: Allow more cases for posting stream-collection
Previously urisourcebin only allows stream-collections messages from adaptive
demuxers or sources to be posted.

This commit also allows the case where they come from a single parsebin. We
still want to prevent it in the case where they are multiple parsebins, since
that would require some form of aggregation to show a single/unified collection.

In order to avoid a regression with uridecodebin3 behavior, we also implement
support for GST_QUERY_SELECTABLE, so that uridecodebin3 can figure out whether
it should let GST_MESSAGE_STREAM_COLLECTION flow upwards (because app/user could
react on it) or whether it drops it in order for decodebin3 to do the collection
aggregation and posting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7597>
2024-10-02 19:40:48 +00:00
Edward Hervey
9a59fc7168 decodebin3: Make update/posting of collection messages atomic
The presence (or not) of a collection on an input will determine whether events
will be throttled so that there are only forwarded when that input gets a valid
collection.

Therefore the input lock should be used.

In addition to that, we want to ensure that the application/user has a chance to
reliably (i.e. synchronously) specify what streams it is interested in by
sending a GST_EVENT_SELECT_STREAMS.

But we cannot allow anything to go forward until that message posting has come
back, otherwise we run in various races.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7594>
2024-10-02 18:50:06 +00:00
Elliot Chen
6c830c5bd3 decodebin3: check and send selected stream message even if no decoder is selected
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7579>
2024-10-02 10:21:56 +00:00
Daniel Morin
50a27da3ad test: Add more nested caps-in-caps (and likes)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7572>
2024-10-01 22:17:51 +00:00
Daniel Morin
a40ed16a0e value: Fix nested caps intersection
Without this change intersection operand containing caps-in-caps need
to be equal for the intersection to work.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7572>
2024-10-01 22:17:51 +00:00
Seungha Yang
d9114db5d0 nvdecoder: Add support for D3D12 output
Enable D3D12 output if device can support D3D12 interop

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7529>
2024-10-02 02:02:08 +09:00
Seungha Yang
16e94b7fc3 nvcodec: Add support CUDA to D3D12 memory copy
Adding CUDA -> D3D12 memory copy method to GstCudaD3D12Interop

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7529>
2024-10-02 02:02:08 +09:00
Sebastian Dröge
12b434ae9d matroskamux: Add support for latency timeouts in live pipelines
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7510>
2024-10-01 13:20:18 +00:00
Sebastian Dröge
945a7bdfc4 matroskamux: Port to GstAggregator
Co-authored-by: Tim-Philipp Müller <tim@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7510>
2024-10-01 13:20:18 +00:00
Seungha Yang
a8f8bbef99 structure,capsfeatures: Fix MSVC build warnings
Fixing warning "warning C4068: unknown pragma 'GCC'"

Use portable GLib macro instead

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7589>
2024-09-30 21:56:28 +00:00
Nicolas Dufresne
fd5e62a317 allocators: drmdump: Add NV15 supports
This is a packed version of P010, names NV14_10LE40 in GStreamer. This
format is used on all Rockchip SoC variants.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7580>
2024-09-30 16:11:09 +00:00
Nicolas Dufresne
f42ce6ef35 allocators: drmdumb: Fix bpp value for P010
P010 uses 16 bits per pixel, with least significant being padding. This
code worked with Intel display driver since they roundup that value, but
does not work with the generic DRM helpers which also support NV15,
which does not have any padding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7580>
2024-09-30 16:11:09 +00:00
Sebastian Dröge
90728a1166 avviddec: Unlock video decoder stream lock temporarily while finishing frames
Temporarily release the video decoder stream lock so that other
threads can continue decoding (e.g. call get_frame()) while data
is being pushed downstream.

At this point it is locked twice, we release one, and then the base class
releases the last one just before pushing the data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7576>
2024-09-29 12:55:10 +00:00
Sebastian Dröge
bbd3d6f4f6 qtdemux: Check fourcc of a second CEA608 atom instead of assuming it's cdt2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7575>
2024-09-29 06:18:56 +00:00
Mengkejiergeli Ba
5bf85229e5 msdkenc: Guard the read of thiz->initialized with the modification of this value
This is to avoid wrongly read/write thiz->initialized when multi-thread
invoking encoder init function, it is possible when user apps deploy
multi-thread to dynamically change encoder's settings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7578>
2024-09-29 01:07:39 +00:00
Sebastian Dröge
be6eba3e9e ntv2: Update to AJA NTV2 SDK 17.1.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7568>
2024-09-27 16:43:37 +00:00
Sebastian Dröge
275134c883 base: audio: video: Use more efficient caps/structure API in various places
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:26:18 +03:00
Sebastian Dröge
21af7061eb gst: caps: Add API for creating caps / setting caps fields from static strings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:26:18 +03:00
Sebastian Dröge
ba552fb76f gst: Remove gstquark.c / gstquark.h
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:26:18 +03:00
Sebastian Dröge
b7b24573ce common: Use more efficient versions of GstCapsFeatures API where possible
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:26:18 +03:00
Sebastian Dröge
3b9f050600 common: Stop using GQuark-based GstCapsFeatures API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +03:00
Sebastian Dröge
eed7c9c66a gst: capsfeatures: Use GstIdStr for caps features
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +03:00
Sebastian Dröge
6233eb0ff3 common: Stop using GQuark-based GstStructure field name API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +03:00
Sebastian Dröge
2df9c4739e gst: structure: Use GstIdStr for structure field names
And add corresponding API with GstIdStr parameters, static string parameters and
deprecate the old GQuark based API.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +03:00
Sebastian Dröge
0c1611d31d common: Stop using GQuark-based GstStructure name API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +03:00
Sebastian Dröge
8cbc76b180 gst: structure: Use GstIdStr for structure names
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +03:00
Sebastian Dröge
0ee18781f9 gst: Add GstIdStr for holding structure names and field names
This is an efficient string storage for short strings without heap allocations,
and falling back to the heap for bigger allocations. Almost all structure fields
and structure names in use nowadays are short enough to not require a heap
allocation.

As structure names and fields are sometimes dynamically created, storing them in
a GQuark can create a memory leak and potentially a DoS attack by continously
triggering creating of new quarks.

Thanks to Tim for coming up with the name!

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +03:00
Sebastian Dröge
0823c639cc gst: structure: Stop using private structure name quark field
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +03:00
Seungha Yang
2d91521dfc d3d12: Fix resource allocation on old Windows version
D3D12_HEAP_FLAG_CREATE_NOT_ZEROED flag was introduced as of
Windows 10 May 2020 Update, and older versions don't understand
the heap flag. Checks the feature support and enables the
D3D12_HEAP_FLAG_CREATE_NOT_ZEROED only if it's supported by OS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7573>
2024-09-26 12:48:55 +00:00
Weijian Pan
df23724b96 avfdeviceprovider: Fix caps leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6966>
2024-09-26 11:48:19 +00:00
Guillaume Desmottes
7e3f9df9a5 wpe: initialize threading.ready before reading it
Fix Valgrind warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7377>
2024-09-25 11:12:28 +02:00
Michael Grzeschik
4670e1c809 uvcsink: make gst_v4l2uvc_fourcc_to_bare_struct work with more raw formats
The uvcsink was limited to only transfer YUY2 and MJPEG. For the
uncompressed formats there is no technical reason not to support them.

Since gst_video_format_to_string is already supporting more fourcc than
only YUY2 we use the default path in gst_v4l2uvc_fourcc_to_bare_struct
to create structures for more formats and bail out if the returned
format is not from the uncompressed type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6037>
2024-09-24 20:07:40 +00:00
Hugues Fruchet
5801e17160 kmsallocator: fix stride with planar formats
This fixes a regression introduced by the merge request
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801

The extrapolated stride was computed but not used, resulting in the same
stride being applied to all planes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7566>
2024-09-24 12:57:16 -04:00
Seungha Yang
86af5a5f20 d3d12: Add colorconvert and scale elements
In addition to existing d3d12convert element which supports
color conversion and rescale at once, adding
separate color-conversion-only and scale-only elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7560>
2024-09-24 20:58:47 +09:00
Sebastian Dröge
d4bab55077 qtdemux: Skip zero-sized boxes instead of stopping to look at further boxes
A zero-sized box is not really a problem and can be skipped to look at any
possibly following ones.

BMD ATEM devices specifically write a zero-sized bmdc box in the sample
description, followed by the avcC box in case of h264. Previously the avcC box
would simply not be read at all and the file would be unplayable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7564>
2024-09-24 11:21:19 +03:00
Nicolas Dufresne
66f1c9fd13 doc: good: Update documentation cache
video4linux2 plugin now maps RGB15 which his didn't before.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 16:50:43 -04:00
Nicolas Dufresne
09e23e325c v4l2object: Fix a gvalue leak on error
In case we failed enumerating the supported interlacing mode, we leaked the
gvalue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
a6959f3738 v4l2: dec/enc: Flag leaked caps
We never free class held template caps, so flag the one that wasn't already
flagged.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
d35f348af3 v4l2: object: Fix condition check to emit error
The check was reversed, so we could only emit a pipeline error
if there was no element associated with the object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
86dddfa61c v4l2object: Always tell capture queue that we want to set the CSC
Not all drivers supports it, but in general we want to try and match the
negotiated caps, so lets always try to set the CSC.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
2fe83fa2de v4l2: object: Fix support for format:Interlaced in caps probe
This notably follow the way we order the template and keeps the
format:Interlaced caps at the end. This change also fixes
an early skip check, that would skip if a driver only supports
alternate interlacing for a specific format. It also fixes
a bug where only the last resolution of a discrete frame size
was allowed to use format:Interlaced. Finally, similar to template
caps code, simplify the caps for earch featurs, making the debug output
manageable and (marginally) improve negotiation speed.

This change will make it easier to introduce memory:DMABuf.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
e97a954008 v4l2: Move M2M template caps probe into v4l2object
This allow reusing the code that produces output and capture devices
templates. This fixes the lack of Interlaced caps feature for M2M
devices such as decoder, encoder or converters.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
7fb16f0b11 v4l2: object: Remove over indentation
This is a style fix, no functional changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
746977b6d3 v4l2: object: Map GST/V4L2 formats in a C array
This makes it easier to add new format in the future without
forgetting to update one of the numerous switch case. This
will also help mapping DRM formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:51 +00:00
Nicolas Dufresne
b7d4e576ea v4l2object: Expose convertion from v4l2 fourcc to GstVideoFormat
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:51 +00:00
Nicolas Dufresne
87398e1f8b v4l2object: Change dimensions format desc field to flag
The boolean naming wasn't obvious, and having this as a flag makes
the structure a little more compact.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:51 +00:00
Nicolas Dufresne
03cf7f6445 qml6glsrc: Reduce capture delay
In qml6glsrc, we capture the application by copying the back buffer into
our own FBO. The afterRendering() signal is too soon as from the apitrace, the
application has been rendered into a QT internal buffer, to be used as a cache
for refresh.

Use afterFrameEnd() signal instead. This works with no delay on GLES. With GL
it seems to reduce from 2 to 1 frame delay (this may be platform specific). A
different recording technique would need to be used to completely remove this
delay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7351>
2024-09-23 18:53:33 +00:00
Arun Raghavan
90e58aec3c gstreamer: parse: Use child proxy for deferred property setting
We use that mechanism for the non-deferred path, and this makes sure we are
consistent for deferred set too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7519>
2024-09-23 17:47:20 +00:00
Arun Raghavan
92d8da92dc gstreamer: parse: Minor whitespace fixups
Mostly replacing some tabs with spaces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7519>
2024-09-23 17:47:20 +00:00
Arun Raghavan
ba69987114 gstreamer: parse: Make sure children are bins before recursing in
A deferred set of the form parentbin::childelement::pad works in the
non-deferred property setting path, but the deferred path assumes that all
non-root non-leaf children specify bins. We already have a bin check on the
root, so let's add one for other non-leaves to avoid a critical.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3806
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7519>
2024-09-23 17:47:19 +00:00
Sebastian Dröge
389302eb96 dynamictypefactory: Fix name of the class cast macro
And deprecate the old name.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7541>
2024-09-23 15:04:31 +00:00
Seungha Yang
cef201734c d3d12: Add d3d12mipmapping element
Adding a new element for texture conversion from single mip level
texture to mipmapping enabled RGBA texture

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7555>
2024-09-23 13:52:37 +00:00
Seungha Yang
51e1834e81 d3d12: Use D3D12_FILTER_MIN_MAG_MIP_LINEAR filter by default
... instead of D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT, since we supports
mipmap texture now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7555>
2024-09-23 13:52:37 +00:00
Seungha Yang
8550ed5888 d3d12: Add support for mipmap texture
Consider D3D12_RESOURCE_DESC.MipLevels > 1 or zero case

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7555>
2024-09-23 13:52:37 +00:00
Jan Alexander Steffens (heftig)
f1aedd65f4 ges: Fix name of GESFrameCompositionMeta API type
g-ir-scanner 1.82.0 failed with a fatal error due to the wrong
namespace.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3800
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7554>
2024-09-21 00:42:36 +02:00
Seungha Yang
eb6d083ebe d3d12converter: Fix crash on pso update
Allocates D3D12_INPUT_ELEMENT_DESC memory on heap instead of using
stack memory for later reuse

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
71d26ee4f8 d3d12swapchainsink: Add auto-resize mode
Automatically resize swapchain backbuffer to be identical to
stream resolution if user calls resize() signal with zero resolution

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
9dee102867 d3d12swapchainsink: Add support for MSAA
Adding "msaa" property and enable MSAA if supported by device

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
ce5321be68 d3d12videosink: Use converter config for initial MSAA setup
Avoid redundant pso creation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
7cf27c456b d3d12converter: Add support initial pso DXGI_SAMPLE_DESC setting
Add more options for pso, in order to avoid redundant pso
creation when MSAA is used

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
965d898deb d3d12swapchainsink: Add sampling-method property
Allow setting sampler filter method to use

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
62caa76155 d3d12convert: Use new sampler filter update method
... instead of creating new converter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
a1029d5b87 d3d12converter: Add support for sampler filter update
Creates new root signature and pipeline state object
if sampler filter method is updated

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
c75e6d01c5 d3d12converter: Use generated sampler
... instead of static ones, in order to support sampler state update

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
He Junyan
05353e69ca va: decoder: Delete all the internal locks
In fact, the va decoder is just a internal helper class and its access
is under the control of all dec elements. So far, there is no parallel
operation on it now.
At the other side, some code scan tools report race condition issues.
For example, the "context" field is just protected with lock at _open()
but is not protected at _add_param_buffer().
So we just delete all its lock usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7547>
2024-09-20 14:36:17 +00:00
He Junyan
2652467d7c h264bitwriter: Add check for data size to avoid overflow
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7547>
2024-09-20 14:36:17 +00:00
He Junyan
b427f33818 h265bitwriter: Add check for data size to avoid overflow
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7547>
2024-09-20 14:36:17 +00:00
He Junyan
6bb294343b va: jpegenc: Fix a memory leak when filter sink caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7547>
2024-09-20 14:36:17 +00:00
He Junyan
dfccbd52f4 va: vpp: Use gst_caps_replace to operate the filter_caps
No need to use lock when we assign value to priv->filter_caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7547>
2024-09-20 14:36:17 +00:00
Alan Coopersmith
9c0fbfd2eb gstreamer: netclock-replay: use gst_c_args when building
Need HAVE_CONFIG_H to avoid build failure on Solaris 11.4 with gcc 14.1:

../subprojects/gstreamer/tests/misc/../../libs/gst/net/gstnetutils.c:71:7:
 error: implicit declaration of function ‘setsockopt’
 [-Wimplicit-function-declaration]
   71 |   if (setsockopt (fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0) {
      |       ^~~~~~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7553>
2024-09-20 06:20:15 +00:00
Piotr Brzeziński
a6fa53b7b1 rtppassthroughpay: Fix reading clock-rate and payload type from caps
They were using wrong types - while uint is correct technically, for compatibility reasons caps have them as signed int.
Values are now correctly read + added simple guards just to be sure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7526>
2024-09-19 16:46:20 +00:00
Piotr Brzeziński
363154d855 rtppassthroughpay: Add ability to regenerate RTP timestamps
Timestamps are untouched by default, but the new mode can now be enabled to replace RTP timestamps
with ones generated from the buffer PTS. Making it an enum in case different modes are needed in the future.
That allows for a rtpjitterbuffer to do proper drift compensation, so that the stream coming out of gst-rtsp-server
is not drifting compared to the pipeline clock and also not compared to the RTCP NTP times.

Most of the code is borrowed from rtpbasepayload, as it's exactly its behaviour which I wanted to bring here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7526>
2024-09-19 16:46:20 +00:00
Sebastian Dröge
252378f1ae flvmux: Use gst_aggregator_update_segment() instead of randomly pushing a segment event
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7542>
2024-09-19 17:08:45 +03:00
Sebastian Dröge
cff7e3986e mxfmux: Use gst_aggregator_update_segment() instead of randomly pushing a segment event
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7542>
2024-09-19 17:08:45 +03:00
Sebastian Dröge
1bd6aabf96 mpegtsmux: Use gst_aggregator_push_src_event() for pushing downstream events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7542>
2024-09-19 17:08:45 +03:00
Sebastian Dröge
37ef85f268 aggregator: Add gst_aggregator_push_src_event()
This ensures that any pending events are pushed before pushing the new event.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7542>
2024-09-19 17:08:45 +03:00
Sebastian Dröge
075a81b44f aggregator: Remove unused tag handling code
If this becomes API it would now have to be implemented differently because
various elements are implementing tag handling themselves now and this would
conflict.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7542>
2024-09-19 16:12:14 +03:00
Tim Blechmann
de2a8bd4ad v4l2: silence valgrind warning
Valgrind complains about uninitialized memory used in an ioctl

    Syscall param ioctl(VKI_V4L2_G_TUNER).reserved points to uninitialised byte(s)
       at 0x719294F: ioctl (ioctl.c:36)
       by 0x3126A817: gst_v4l2_fill_lists (v4l2_calls.c:185)
       by 0x3126A817: gst_v4l2_open (v4l2_calls.c:589)
       by 0x3123F1C2: gst_v4l2_device_provider_probe_device (gstv4l2deviceprovider.c:122)
       by 0x3123F648: gst_v4l2_device_provider_device_from_udev (gstv4l2deviceprovider.c:301)
       by 0x3123F998: provider_thread (gstv4l2deviceprovider.c:395)
       by 0x796FA50: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4)
       by 0x710CAC2: start_thread (pthread_create.c:442)
       by 0x719DA03: clone (clone.S:100)
     Address 0x44008a34 is on thread 11's stack
     in frame #1, created by gst_v4l2_open (v4l2_calls.c:524)
     Uninitialised value was created by a stack allocation
       at 0x3126A024: gst_v4l2_open (v4l2_calls.c:524)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6144>
2024-09-18 23:25:18 +00:00
Benjamin Gaignard
0d0097b0b2 v4l2codecs: h265: Minimize memory allocation
Be smarter when allocating sink and source memory pools to reduce the
memory footprint. Use gst_v4l2_decoder_get_render_delay() to know the
need number of buffers for downstream element.

Handle errors in case of memory allocation failures.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7544>
2024-09-18 22:34:34 +00:00
Tim Blechmann
edf64dc277 mdns: fix thread names
Linux thread names are limited to 15 chars. providing long thread names
causes the thread name not to be applied at all

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6094>
2024-09-18 20:37:10 +00:00
Tim Blechmann
95db9d64c0 v4l: fix thread name
Linux thread names are limited to 15 chars. providing long thread names
causes the thread name not to be applied at all

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6094>
2024-09-18 20:37:10 +00:00
Michael Tretter
fd165528d2 v4l2videoenc: demote per frame message to LOG
The "Handling frame" message with the frame number is printed on every buffer.
Therefore, it should have log level LOG instead of DEBUG.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7543>
2024-09-18 15:34:30 -04:00
Michael Tretter
5d310062e8 v4l2videoenc: remove unnecessary processing variable and dead code
"processing" is only set to FALSE and never set to TRUE. Therefore, the code
that depends on processing to be TRUE is never executed.

Remove the dead code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7543>
2024-09-18 15:34:24 -04:00
Nicolas Dufresne
ee925c506c v4l2: encoder: Add dynamic framerate support
This is not trully supported in V4L2, but we can emulate this similar to
what other elements do. In this patch we ensure that 0/1 is supported by
encoders (caps query),and uses a default of 30fps whenever we need to
set a framerate into the driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7352>
2024-09-18 13:20:42 -04:00
Seungha Yang
5182cac9be d3d12decoder: Disable sub-allocated bitstream buffer
This sub-allocation causes decoding artifacts for some reason
on Intel platform

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7535>
2024-09-18 10:23:26 +00:00
Sebastian Dröge
9f7148025f mpegtsmux: Fix refcounting issue when selecting the best pad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7538>
2024-09-17 23:49:35 +00:00
Edward Hervey
15e7928c8a mpegts: Add support for SMPTE ST-2038 ANC
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7461>
2024-09-17 19:58:48 +01:00
Xavier Claessens
a791648600 aja: there is no need to take object lock
Both _sink_event() and _aggregate() vfunc are called from the source pad
streaming thread. There is thus no need to protect caps fields.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7536>
2024-09-17 15:59:47 +00:00
Edward Hervey
2e8afcf51a mpegts: Add support for JPEG-XS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7172>
2024-09-16 18:31:01 +01:00
Edward Hervey
838ad5c7e4 tsmux: Split off j2k descriptor code in separate function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7172>
2024-09-16 18:31:01 +01:00
Edward Hervey
6ce1910c5b mpegts: Handle ISO 13818 / ITU H.222.0 base extension descriptor
Previously this was hardcoded to the DVB extension descriptors (0x7f), but it
should also be applied for the base specification extension descriptors (0x3f)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7172>
2024-09-16 18:31:01 +01:00
Peter Kjellerstedt
0db32b3b3a meta: Add missing include of gststructure.h
This avoids the following error when only including gstmeta.h:

  /usr/include/gstreamer-1.0/gst/gstmeta.h:146:3: error: unknown type
  name 'GstStructure'
    146 |   GstStructure *structure;
        |   ^~~~~~~~~~~~

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7520>
2024-09-16 06:58:08 +00:00
Tim-Philipp Müller
d7e8f0e1ca svtjpegxs: add to documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7430>
2024-09-14 18:30:58 +00:00
Tim-Philipp Müller
cdea025b5b svtjpegxsenc: put "codestream-length" into caps
So consumers can calculate the maximum bitrate (brat)
from that for various descriptors, in combination with
the framerate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7430>
2024-09-14 18:30:58 +00:00
Tim-Philipp Müller
ae1cd3d528 svtjpegxs: add SVT JPEG XS decoder
Based on: https://github.com/OpenVisualCloud/SVT-JPEG-XS/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7430>
2024-09-14 18:30:58 +00:00
Tim-Philipp Müller
a6f18726c1 svtjpegxs: add SVT JPEG XS encoder
Based on: https://github.com/OpenVisualCloud/SVT-JPEG-XS/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7430>
2024-09-14 18:30:58 +00:00
Seungha Yang
f5ce4d10b1 nvencoder: Add support for d3d12 memory
Use d3d12 -> cuda memory copy helper object in cuda mode encoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7480>
2024-09-14 15:33:44 +00:00
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
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