Commit graph

7769 commits

Author SHA1 Message Date
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
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
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
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
He Junyan
2d10692b34 va: videoformat: Correct NV21's BPP
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6022>
2024-09-05 09:56:02 +00:00
Víctor Manuel Jáquez Leal
85341d6dad vajpegenc: set interlace-mode, colorspace and sampling in output caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6022>
2024-09-05 09:56:02 +00:00
Víctor Manuel Jáquez Leal
8fd9b9b237 vasurfaceimage: log surface status string
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6022>
2024-09-05 09:56:02 +00:00
He Junyan
4550671b6f va: Implement the vajpegenc plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6022>
2024-09-05 09:56:02 +00:00
He Junyan
f7e434028d va: baseenc: Check the bitrate property before get its value
Not all the encoders have the bitrate property, such as the jpeg enc.
We need to check that property before getting its value, or the glib
will print warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6022>
2024-09-05 09:56:02 +00:00
He Junyan
9327458cfb tests: Add the jpeg bit code writer test case
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6022>
2024-09-05 09:56:02 +00:00
He Junyan
281679a54a codecparsers: Implement the jpeg bit code writer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6022>
2024-09-05 09:56:02 +00:00
Edward Hervey
81e7bde67c check: Disable failing test
Test hasn't been properly fixed for several years with modern libsoup, and it
only for the legacy adaptive demuxer.

Fixes #3783

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7454>
2024-09-05 10:09:58 +02:00
Xavier Claessens
ecb685e2ca meson: do not invoke pkgconfig directly in gst-python
That bypass env setup by Meson and is dead code anyway because
pluginsdirs is later overriden by the proper gst_dep.get_variable()
solution.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7445>
2024-09-05 03:00:28 +00:00
Matthew Waters
0df80a1bec webrtcbin: enable forward-unknown-ssrc on rtpfunnel
See also: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7405

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7409>
2024-09-04 23:15:39 +00:00
Seungha Yang
9363a0af42 dwrite: Allow unlimited number of in-flight d3d12 commands
... so that it can be controlled by global direct command queue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7444>
2024-09-04 12:56:43 +00:00
Seungha Yang
d0505fba55 d3d12: Add async-depth property
Adding a property to control the number of in-flight GPU commands
(default is unlimited). Note that actual maximum number is defined
in d3d12device's direct command queue object which is 32 now,
thus total number of scheduled GPU commands cannot exceed 32.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7444>
2024-09-04 12:56:43 +00:00
Thibault Saunier
3506f5fb07 osxaudio: Avoid dangling pointer on shutdown
When tearing down the elements we were still referring to the ringbuffer unique_id
as our property while it was already freed, leading to potential segfaults when
accessing the property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7426>
2024-09-04 10:37:37 +00:00
Matthew Waters
4802ad8eb6 rtpfunnel: also fallback to pad default handling for unknown ssrcs
If two (or more) rtpfunnel elements are cascaded, then only one will
realistically have information on the particular ssrc that is in use for a
particular input stream.  As such, any key unit requests may never reach the
corresponding encoder.

This has been discovered by combining simulcast and BUNDLE with webrtcbin.
simulcast uses one rtpfunnel, and BUNDLE uses another rtpfunnel.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7405>
2024-09-04 08:15:38 +00:00
Piotr Brzeziński
e9ab880e66 vtenc: Use new release_frame/drop_frame encoder API
Replaces usage of gst_video_codec_frame_unref everywhere.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7173>
2024-09-04 06:46:07 +00:00
Piotr Brzeziński
00eb9ad62e vtenc: Restart encoding session when certain errors are detected
Sometimes under certain loads, VT can error out with kVTVideoEncoderMalfunctionErr or kVTVideoEncoderNotAvailableNowErr.
These have been reported to happen more often than usual if CopyProperty/SetProperty() is used close to the encode call.
Both can be worked around by restarting the encoding session.

These errors can be returned either directly from VTCompressionSessionEncodeFrame() or later in the encoding callback.
This patch handles both scenarios the same way - a session restart is be attempted on the next encode_frame() call.

If the error is returned immediately by the encode call, it's possible that some correct frames will still be given to
the output callback, but for simplicity (+ because I wasn't able to verify this scenario) let's just discard those.

In addition, this commit also simplifies the beach/drop logic in enqueue_buffer.

Related bug reports in other projects:
http://www.openradar.me/45889262
https://github.com/aws/amazon-chime-sdk-ios/issues/170#issuecomment-741908622

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7173>
2024-09-04 06:46:07 +00:00
Chao Guo
c35687fcbf glimagesink: resize viewport when video size changed in caps
When re-negotiation happends and caps is changed, resize the
viewport to the corresponding video size in changed caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7341>
2024-09-04 02:52:56 +00:00
Hou Qi
c3f86005de gstplay: check whether stream is seekable before seeking when state change
If state is changing from playing to paused, and rate is reset to 1
which causes seek position is valid, current code will do seek for
streams that are not seekable. So need to check whether stream is
seekable before seeking.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7441>
2024-09-03 15:42:03 +00:00
Xavier Claessens
9a87ce418b gl: Fix configure error when libdrm is a subproject
When libdrm is a subproject it cannot be used in a configure time check:
  ERROR: Dependencies must be external dependencies

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7380>
2024-09-03 13:13:04 +00:00
Tim-Philipp Müller
5e90f3eff7 gst-editing-services: use g_sort_array() instead of deprecated g_qsort_with_data()
Fixes compiler warnings with the latest GLib versions.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4127

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7384>
2024-09-02 22:31:34 +00:00
Tim-Philipp Müller
59d56bcb3f gst-plugins-bad: use g_sort_array() instead of deprecated g_qsort_with_data()
Fixes compiler warnings with the latest GLib versions.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4127

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7384>
2024-09-02 22:31:34 +00:00
Tim-Philipp Müller
ec6763b122 gst-plugins-good: use g_sort_array() instead of deprecated g_qsort_with_data()
Fixes compiler warnings with the latest GLib versions.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4127

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7384>
2024-09-02 22:31:34 +00:00
Tim-Philipp Müller
3beb06952e gst-plugins-base: use g_sort_array() instead of deprecated g_qsort_with_data()
Fixes compiler warnings with the latest GLib versions.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4127

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7384>
2024-09-02 22:31:34 +00:00
Tim-Philipp Müller
6031f9ece1 gstreamer: use g_sort_array() instead of deprecated g_qsort_with_data()
Fixes compiler warnings with the latest GLib versions.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4127

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7384>
2024-09-02 22:31:34 +00:00
Sebastian Dröge
9638692761 ges-structured-interface: Fix memory leak of invalid fields GList
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7437>
2024-09-02 16:42:55 +00:00
Oskar Fiedot
327df9766d analytics: Change pointers in getters to const
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7403>
2024-09-02 12:27:37 +00:00
Matthew Waters
6218b153fd tests/examples/qmlglveray.py: fix formatting for commit lint
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7244>
2024-09-02 11:19:34 +00:00
Matthew Waters
be1841904b tests/examples/qmloverlay.py: add license and copyright headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7244>
2024-09-02 11:19:33 +00:00
Matthew Waters
493b657ff8 tests/examples/qml-multisink: add license and copyright headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7244>
2024-09-02 11:19:33 +00:00
Matthew Waters
73624fa5c9 tests/examples/qmlglsrc: add copytright and licenses headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7244>
2024-09-02 11:19:33 +00:00
Matthew Waters
9c99dfc34d tests/examples/qmlglsink/overlay: add copyright and licenses headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7244>
2024-09-02 11:19:33 +00:00
Matthew Waters
55648d9b8d tests/examples/qml6: Add license and copyright information
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7244>
2024-09-02 11:19:33 +00:00
Sebastian Dröge
55994477a7 bus: Switch from GstAtomicQueue to GstVecDeque
All accesses to it were protected either by a mutex already, or at least
used yet another mutex for gst_poll_read_control() / gst_poll_write_control().

The usage of GstPoll has to stay for backwards compatibility as it is
used to manage the (public) fd that can be used to wait for the bus to
be ready, but this switch at least simplifies the implementation a bit
and results in fewer atomic operations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6684>
2024-09-02 09:26:23 +00:00
Sebastian Dröge
8e589eec08 bufferpool: Switch from GstAtomicQueue to GstVecDeque and a mutex/cond
While the atomic queue itself is lock-free, all its usage had to be
synchronized externally via a GstPoll and gst_poll_read_control() /
gst_poll_write_control(). Both functions were always taking a mutex
internally since cd06aea1, so the implementation was just very
complicated but not lock-free at all.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6684>
2024-09-02 09:26:23 +00:00
Sebastian Dröge
3c7ddf902a structure: Remove quadratic behaviour from gst_structure_fixate()
It was iterating over each field and after fixating its value was again
iterating over every field to find where to store the value.

Instead directly overwrite the value after validating it.

Also actually check that the structure is writable before modifying its fields
by using gst_structure_map_in_place() instead of gst_structure_fixate().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7420>
2024-09-02 07:32:16 +00:00
Philippe Normand
89f335f173 webrtcbin: Prevent crash when attempting to set answer on invalid SDP
If the pending remote description has an invalid BUNDLE group _parse_bundle()
triggers early return from _create_answer_task(), before ret has been
initialized, so it needs to be checked before attempting to call
gst_sdp_message_copy().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7423>
2024-09-02 04:00:57 +00:00
Sebastian Dröge
8b0ae3ba87 clock: Fix calculation for number of bits needed to store a 64 bit value
It was using log2(n) but what actually is needed is log2(n) + 1. Also add a
fast-path that uses __builtin_clzll() on gcc/clang.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7406>
2024-08-29 10:55:35 +00:00
Sebastian Dröge
41f3fab3d4 clock: Fix unchecked overflows in linear regression code
The initial calculation for the precision shift was wrong and would allow for
overflows during the calculations which were not detected and lead to wrong
results.

Also add a test for a case where overflows where previously not detected and
caused a completely wrong result.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7406>
2024-08-29 10:55:35 +00:00
Daniel Morin
4106ad4ae6 doc: correct delimiters documentation
- "<>" are delimiters for GST_TYPE_ARRAY and "{}" are delimiters for
  GST_TYPE_LIST.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7419>
2024-08-29 00:00:43 +00:00
Edward Hervey
087cb87d27 bad: Add suppression for libsrt issues
This is not code we control

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7415>
2024-08-28 06:54:02 +00:00
Edward Hervey
38271fc9e4 check: Fix leak in lc3 test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7415>
2024-08-28 06:54:02 +00:00
Edward Hervey
8da2ea6fa1 gstreamer: Make dlopen leak suppression more generic
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7415>
2024-08-28 06:54:02 +00:00
Carlos Bentzen
77faf0a163 webrtcbin: fix regression with missing RTP header extensions in Answer SDP
webrtcsrc first creates recvonly transceivers with codec-preferences
and expects that after applying a remote description, the
previously created transceivers are used rather than having new
transceivers created.

When pairing webrtcsink + webrtcsrc, the offer sdp from webrtcsink has a media
section with sendonly direction. In !7156, which was implemented following
RFC9429 Section 5.10, we only reuse a unassociated transceiver when applying a
remote description if the media is sendrecv or recvonly, and that caused creation
of new transceivers when applying a remote offer in webrtcsrc, thus losing
information from codec preferences like the RTP extension headers in the
previously created transceivers.

Since the change in !7156 broke existing code from webrtcsrc, relax the condition
for reusing unassociated transceivers and add a test to document this behavior which
wasn't covered by any tests before.

Fixes #3753.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7417>
2024-08-27 23:56:00 +00:00
Francis Quiers
ac868d9dc1 voamrwbenc: fix list of bitrates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7396>
2024-08-27 13:53:04 +00:00
Edward Hervey
2385a2e68d qt6: Remove unused field
```
In file included from ../subprojects/gst-plugins-good/ext/qt6/gstqsg6material.cc:31:
../subprojects/gst-plugins-good/ext/qt6/gstqsg6material.h:69:17: error: private
field 'mem_' is not used [-Werror,-Wunused-private-field]
   69 |     GstMemory * mem_;
      |                 ^
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7414>
2024-08-27 13:38:37 +02:00
Edward Hervey
864faa34cd qt6: Rename symbols to avoid conflict in static builds
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7414>
2024-08-27 13:37:41 +02:00
Daniel Pendse
e4fbf9d180 rtmp2: Add llnw auth support to rtmp client
Add support for Limelight CDN (llnw) authentication. Inspired
by the ffmpeg implementation of llnw auth.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7410>
2024-08-26 15:02:01 +00:00
Jan Alexander Steffens (heftig)
5ca52ea026 h264parse, h265parse: Fix time code calculation
We need to multiply for the nuit_field_based_flag before scaling, or
we'll lose precision and end up only adding even timecodes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7241>
2024-08-26 14:04:13 +00:00
chitao1234
1f21d4a892 docs: fix incorrect define in android jni code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7408>
2024-08-24 23:09:22 +08:00
RSWilli
b2c4f68328 webrtc: fix documentation error in GstWebRTCKind
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7407>
2024-08-24 10:08:57 +00:00
Seungha Yang
8f9a53fa85 timecodestamper: Add running-time source mode
Add a new source mode "running-time". This mode will convert buffer
running time into timecode

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7322>
2024-08-23 18:37:16 +00:00
Edward Hervey
ea59c921d6 decodebin3: Fix collection identity check
Collections can be auto-generated from upstream and yet have exactly the same
streams in it.

Therefore do a more in-depth check for equality.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7401>
2024-08-22 09:27:02 +00:00
Thibault Saunier
87c69e5174 ci: Fail tests if we forget to checkout expectation files
And add missing expectation files

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7400>
2024-08-21 17:53:38 +00:00
Jan Schmidt
3c7f9c0fab qmlglsink: Add support for external-oes textures
Support was added to qml6glsink in MR !7319

Backport similar support to the Qt5 element so it
can also support direct DMABuf import from hardware
decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7393>
2024-08-21 17:03:21 +01:00
Thibault Saunier
8fdd59f9d5 validate: flow: Allow logging upstream events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7382>
2024-08-21 13:55:15 +00:00
Jan Schmidt
6cf3d32886 gstplayer: Check GstPlayerSignalDispatcher type
Before trying to retrieve a GMainContext from a provided
GstPlayerSignalDispatcher, check that it is actually
GstPlayerGMainContextSignalDispatcher. If not, use the
default GMainContext for dispatching signals via the adapter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7392>
2024-08-21 20:25:59 +10:00
Guillaume Desmottes
389f7e0d7b wpe: fix gst-launch example
wpesrc does not have num-buffers property but wpevideosrc does.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7389>
2024-08-21 09:13:22 +00:00
Sebastian Dröge
7daa040d24 avdemux: Never return 0 from read function
Instead return AVERROR_EOF. The read function must never ever return 0 according
to the documentation, and in practice this leads to infinite loops.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7390>
2024-08-21 11:05:11 +03:00
Seungha Yang
1b5f026119 examples: Add CUDA based in-place transform element example
Adding a CUDA example element for plugin developers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7004>
2024-08-20 23:48:24 +00:00
Seungha Yang
c484de8d8b gst-rtsp-server: Make test-onvif-client example work on Windows
Use autovideosink instead of hardcoded xvimagesink,
so that platform-default videosink can be picked

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7174>
2024-08-20 19:44:42 +00:00
Mathieu Duponchelle
25f3ab2e6c audioconvert: handle new GstRequestMixMatrix custom upstream event
An example use case is the gstwebrtc-api demo, which will cause
webrtcsink to forward such events. This lets the end user define a mix
matrix without requiring any application code server side.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7363>
2024-08-20 17:05:49 +00:00
Mathieu Duponchelle
fd90d7bdee audioconvert: fix setting of mix matrix at run time
There were two main issues:

The mix matrix was not protected with the object lock

The code was mistakenly assuming that after updating the mix matrix
a reconfigure event sent upstream would be enough to cause upstream to
send caps again, and the converter was only reconstructed in ->set_caps.

That was not actually enough, as if the new matrix didn't affect the
number of input / output channels there was no reason for upstream to do
anything after getting the unchanged caps.

The fix for this was to have ->transform also recreate the converter
when needed, with the added subtlety that depending on the mix matrix
the element could be set to passthrough. This means that when setting
the mix matrix the converter also had to be recreated immediately to
check if the element had to be switched back to non-passthrough.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7363>
2024-08-20 17:05:49 +00:00
Mathieu Duponchelle
015af606b6 audio-converter: support more numerical types for mix matrix
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7363>
2024-08-20 17:05:49 +00:00
Paweł Kotiuk
c5e7ffcd1b example: Add example for streaming camera rith RTSP
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6965>
2024-08-20 12:55:06 +00:00
Jan Schmidt
96c4bd8d9f webrtc: Fix racy unit test
Don't reuse the same stats state structure across multiple
get-stats calls. Make each callback take a copy of the
non-changing fields it needs and use a local working copy
to avoid crashing.

Fixes problems with the unit test crashing sometimes for the
unit test introduced in MR !7338

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7387>
2024-08-20 12:07:02 +00:00
Jan Schmidt
055b5af99e webrtcbin: Always populate rtp-inbound stats fields
Even if there's no jitterbuffer yet for an incoming stream,
make sure to populate the mandatory statistics with 0 entries.

Fixes problems with the unit test failing sometimes for the
unit test introduced in MR !7338

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7387>
2024-08-20 12:07:02 +00:00
Michael Scherle
671281d860 va: add interpolation method for scaling
For description of interpolation methods, see:
<https://intel.github.io/libva/structVAProcPipelineParameterBuffer.html#abb95e119ed7f841f71b2afbec2104784>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7301>
2024-08-20 08:36:03 +00:00
Víctor Manuel Jáquez Leal
d301324652 va: don't use GST_ELEMENT_WARNING in set_context() vmethod
Since bins can set the context of their children elements, the set_context()
vmethod shouldn't call bus messages post methods, since it locks the parent
object, the bin, which might be already locked, leading to a deadlock.

Fixes: #3706
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7378>
2024-08-19 14:34:28 +02:00
Jan Schmidt
97845475c5 webrtcbin: Fix uint64 -> uint confusion for ice-candidate priority
ICE candidate priority is a 32-bit field and reported as such in the
webrtcbin statistics, but the documentation was incorrect, and the
unit test was looking for a uint64.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7338>
2024-08-19 21:07:52 +10:00
Jan Schmidt
7da5d03b29 webrtcbin: Fixes for bundled statistics generation
When multiple streams are bundled on the same transport,
the statistics would end up incorrectly generated,
as each pad would regenerate stats for every ssrc on the
transport, overwriting previous iterations and assigning
bogus media kind and other values to the wrong ssrc.

Fix by making sure each pad only loops and generates
statistics for the one ssrc that pad is receiving / sending.

Add a unit test that the codec kind field in RTP statistics
are now generated correctly.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2555
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7338>
2024-08-19 21:07:51 +10:00
Edward Hervey
de6de83986 urisourcebin: Actually drop EOS on old-school pad switch
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7375>
2024-08-19 09:49:12 +02:00
Seungha Yang
4bb3854772 d3d12: Add d3d12swapchainsink element
Adding a new videosink element for Windows composition API based
applications. Unlike d3d12videosink, this element will create only
DXGI swapchain by using IDXGIFactory2::CreateSwapChainForComposition()
without actual window handle, so that video scene can be composed
via Windows native composition API, such as DirectComposition.
Note that this videosink does not support GstVideoOverlay interface
because of the design.

The swapchain created by this element can be used with
* DirectComposition's IDCompositionVisual in Win32 app
* WinRT and WinUI3's UI.Composition in Win32/UWP app
* UWP and WinUI3 XAML's SwapChainPanel

See also examples in this commit which show usage of the videosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7287>
2024-08-19 11:07:17 +09:00
Nirbheek Chauhan
da00a1cabb meson: Bump gtk4 and pango wraps
Newer pango is needed to build gtk 4.14 on Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7372>
2024-08-17 15:00:11 +05:30
Edward Hervey
7546975856 urisourcebin: Don't hold lock when emitting about-to-finish
This could trigger actions that re-enter this element

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7368>
2024-08-17 05:50:26 +00:00
Víctor Manuel Jáquez Leal
2caaf252b0 vah264enc: fix typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7337>
2024-08-16 19:52:06 +02:00
Víctor Manuel Jáquez Leal
af075a225e va: replace %d for %u format for system_frame_number guint32 variable
And also fixed the format for other less frequently printed variables.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7337>
2024-08-16 19:52:06 +02:00
Víctor Manuel Jáquez Leal
17fc4374b2 vah264enc: update b_pryamid property if it changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7337>
2024-08-16 19:52:06 +02:00
Víctor Manuel Jáquez Leal
a5651f8b44 vah26xenc: use gst_h26x_slice_type_to_string()
Rather than custom function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7337>
2024-08-16 19:51:39 +02:00
Jan Schmidt
d266995323 tests/webrtcbin: Add a lock around the stats test
Prevent any race if both webrtcbin end up generating their
statistics simultaneously, however unlikely.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7365>
2024-08-16 14:18:35 +00:00
Jan Schmidt
460f5dcb33 tests/webrtcbin: Fix racy rollback test
Prevent the default webrtc test machinery from attempting to
create and set an answer when we're just testing rollback
of the offers. Add some locking / waiting to ensure the test
is complete before exiting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7365>
2024-08-16 14:18:35 +00:00
Jan Schmidt
490c21a72e tests/webrtcbin: Use fail_unless_matches_string()
Use pattern matching against expected error strings that
might include internal element names, where the names
are default assigned with incrementing integers. When running
with CK_FORK=no, there may have been previous tests that
ran in the same process and incremented the counters more
than when running in the default fork-per-test mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7365>
2024-08-16 14:18:35 +00:00
Jan Schmidt
807dbfbebf check: Add fail_unless_matches_string() and assert macros
Add string check macros for checking expected strings against
a regular expression instead of just a direct literal match
as provided by the existing fail_unless_equals_string()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7365>
2024-08-16 14:18:35 +00:00
Edward Hervey
701165227f decodebin3: Remove custom EOS handling
Initially introduced in 2017 by 4fcbcf4e48 (and
follow up commits) and ec7d81f67c

See https://bugzilla.gnome.org/show_bug.cgi?id=773341 and
https://bugzilla.gnome.org/show_bug.cgi?id=792693 for more details.

This was made to support the legacy behaviour of adaptive demuxers (regarding
streams added/removed dynamically).

Since then, a lot of things have changed in decodebin3 and related elements
regarding how dynamic streams are handled and this custom behaviour is no longer
needed.

This also removes weird behaviours like EOS being delayed until *all* streams
were EOS, which could cause deadlocks downstream.

Fixes #3666

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7194>
2024-08-16 13:26:14 +00:00
Qian Hu (胡骞)
ddd00a9e1d v4l2object: handle unsupported hlg colorimetry gracefully
This patch addresses the issue where GStreamer would throw an error when
attempting to use bt2100-hlg colorimetry with V4L2, which is not
supported by the current V4L2 kernel. When bt2100-hlg colorimetry is set
from caps, the check for transfer (GST_VIDEO_TRANSFER_ARIB_STD_B67) is
bypassed.

The main improvement is to avoid checking the transfer value in
gst_v4l2_video_colorimetry_matches when it is
GST_VIDEO_TRANSFER_ARIB_STD_B67. This is because the transfer value in
the cinfo parameter comes from gst_v4l2_object_get_colorspace, which
converts the transfer to another value, causing a mismatch.

Since the kernel does not support GST_VIDEO_TRANSFER_ARIB_STD_B67,
gst_v4l2_object_get_colorspace cannot map it correctly from V4L2 to
GStreamer. Therefore, we ignore this check to prevent errors.

changes:
- Added a condition in gst_v4l2_video_colorimetry_matches to bypass the
  transfer check when the transfer is GST_VIDEO_TRANSFER_ARIB_STD_B67.
- Ensured that the pipeline does not throw errors due to unsupported
  bt2100-hlg colorimetry in V4L2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7212>
2024-08-16 11:51:57 +00:00
Sebastian Dröge
0db6ce0f11 avdemux: Fix deadlock when serialized events are received from upstream while opening
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3657

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7362>
2024-08-16 09:55:11 +00:00
Sebastian Dröge
132ef7eb11 subprojects: gtk: Update to 4.14.4
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7342>
2024-08-16 09:24:19 +00:00
He Junyan
a924e6c8bc va: deinterlace: Do not use the backward reference
num_backward_references > 0 means we need to cache several frames
after the current frame. But the basetransform class does not
provide any _drain() kind function, so we do not have the chance
to push out our cached frames when EOS or set caps event comes.
Rather than losing the last several frames, we should just give up
the backward reference here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7348>
2024-08-15 15:26:07 +00:00
He Junyan
11a0b40b6e va: deinterlace: Push the forgotten leading frames if forward reference > 0
The current code forgets to push the first several frames if the forward
reference > 0. They are just cached in history array and will never be
deinterlaced and pushed.
For the first several frames, even the forward reference frames are not
enough, we still need to deinterlace them as normal and push them after that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7348>
2024-08-15 15:26:07 +00:00
Qian Hu (胡骞)
2447cf1077 jpegparse: fix incorrect reading of transform in app14 marker
"adobe" in app14 marker seem not a null-terminted string. so, when
we use gst_byte_reader_get_string_utf8, more bytes will be read until
null. and "gst_byte_reader_get_uint8 (&reader, &transform)" will almost fail
to read transform

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7356>
2024-08-15 13:33:47 +00:00
Víctor Manuel Jáquez Leal
2b52b07a2f vkencoder-private: remove duplicated structure definition
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7354>
2024-08-15 10:32:26 +00:00
Víctor Manuel Jáquez Leal
591eb2b527 vkencoder-private: don't override error on get_format() call
If gst_vulkan_video_encoder_get_format() fails it fills the error structure, so
it shouldn't be filled again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7354>
2024-08-15 10:32:26 +00:00
Víctor Manuel Jáquez Leal
57eb2c700b vkencoder-private: There's no need to store the aligned offset of 0
Since it's 0 too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7354>
2024-08-15 10:32:26 +00:00
Víctor Manuel Jáquez Leal
bc3317414b vkencoder-private: use g_clear_pointer to unref packed headers
And use g_ptr_arra_unref() Instead of using the unrecommended g_ptr_array_free().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7354>
2024-08-15 10:32:26 +00:00
Víctor Manuel Jáquez Leal
e5f40b65f2 vkencoder-private: don't check twice for encoder parameter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7354>
2024-08-15 10:32:26 +00:00
Víctor Manuel Jáquez Leal
d81186cbfc vkencoder-private: fix code style
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7354>
2024-08-15 10:32:26 +00:00
Jan Schmidt
eb5b064145 splitmuxsink: Update tracked running time before first fragment-opened
Before sending the first fragment-opened message on the bus, update
the output_fragment_info structure so that the sent message correctly
reports the initial running time.

Fixes #3725

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7361>
2024-08-15 09:14:52 +00:00
Víctor Manuel Jáquez Leal
c27d0842ce pbutils: descriptions: use subsampling factor to get YUV subsampling
The algorithm used to determine the YUV subsampling string uses width and height
subsampling factor, not the raw subsampling. Otherwise all 4:2:0 YUV frames will
be detected as 4:4:4

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7353>
2024-08-14 19:02:20 +00:00
Alicia Boya García
9b0e951512 streamsynchronizer: Add documentation
I didn't find the behavior and purpose of streamsynchronizer documented
or intuitive. Eventually I got Edward to explain it to me, which was
very helpful. Now I'm contributing some docs so that the next person
doesn't have to figure it out by asking around and hoping for an answer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7084>
2024-08-14 13:55:37 +00:00
Qian Hu (胡骞)
104dcc90f1 h26xparse: bypass check for length_size_minus_one
fix playback fail, when some file with length_size_minus_one == 2

According to the spec 2 cannot be a valid value, so that stream has a
bad config record. but breaking the decoding because of that, perhaps is too much.
and ffmpeg seem not check this

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7213>
2024-08-14 08:31:15 +00:00
Edward Hervey
a92ea884ef subprojects: Fix libsoup build on windows with gcc14
Same reason as https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1526

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7326>
2024-08-14 04:34:28 +00:00
Tim-Philipp Müller
3428d7f511 subprojects: bump libvpx wrap to 1.14
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7326>
2024-08-14 04:34:27 +00:00
Jordan Petridis
b6c577c70c rtmp2: reimplement librtmp's connection parameters for the connect packet
librtmp allows for attaching arbitrary AMF objects to the end of the
connect packet, and this is commonly used for authenticating with
servers.

Add a new property, extra-connect-args, that mimics librtmp's behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7054>
2024-08-13 21:50:17 +00:00
Víctor Manuel Jáquez Leal
a275694939 msdk: replace strcmp with g_strcmp0
Because strcmp doesn't handle NULL.

Fixes: #3721
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7347>
2024-08-13 11:10:07 +02:00
Chao Guo
cf30e875de glupload: Add formats supported by #GstGLMemory to raw caps when generating sink pad caps
When glupload generates sink caps based on src caps after determining upload method, src
caps may only contain RGBA format.

In this case, the raw caps on the sink pad generated by glupload will only contain the
RGBA format, which will cause caps negotiation fail, because the filter caps used for
negotiation by the upstream element may only contain other formats, such as xBGR, etc.

Add the formats supported by #GstGLMemory to raw caps to ensure that caps negotiation
succeeds.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7061>
2024-08-13 04:05:16 +00:00
Nicolas Dufresne
3f2ed552fb qt6glwindow: Fallback to GL_RGB on CopyTexImage2D error
With GLES 2.0 we are forced to use CopyTextImage2D which requires
passing an internal format. With QT6 eglfs, we need to pass GL_RGB
instead, probably because of how the texture has been created. As its
hard to guess, simply fallback to GL_RGB on failure. This fixes usage
or qml6glsrc with eglfs backend, without loosing support for
semi-transparent window on other platforms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7321>
2024-08-13 02:24:00 +00:00
Nicolas Dufresne
c9df0a5799 qmlgl6src: Fix crash when use-default-fbo is false
When that property is set to its default qmlgl6src element simply crash
as it will call gst_video_frame_unmap() twice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7290>
2024-08-13 01:45:18 +00:00
Mathieu Duponchelle
bc39c0f54b rtspsrc: expose property for forcing usage of non-compliant URLs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7133>
2024-08-12 20:10:45 +00:00
Marijn Suijten
006ac293bc vulkan: Replace open-coded precondition checks with g_return_val_if_fail
While analyzing gst_vulkan_get_or_create_image_view_with_info() it
seems obvious that this function returns NULL, and that this should be
covered in the return annotations.  However, closer inspection indicates
that this is only a precondition check when the incoming arguments are
incompatible with each other, and should not be considered as a function
that optionally returns a pointer.

Signify this by using precondition checks instead of an opencoded
if-return-NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5736>
2024-08-12 19:23:08 +00:00
Marijn Suijten
10464f352f vulkan: Annotate queue getter as nullable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5736>
2024-08-12 19:23:08 +00:00
Marijn Suijten
848256a7f5 vulkan: Mark some pointers to Vulkan info structures as const
These pointers are only used as read-only arguments, and should not be
treated as mutable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5736>
2024-08-12 19:23:08 +00:00
Marijn Suijten
adf031a222 vulkan: Add missing out annotation to decoder_out_format()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5736>
2024-08-12 19:23:08 +00:00
Marijn Suijten
e5b627857a vulkan: Fix context get/set annotations
Most notably the out annotations for gst_context_get_* were missing,
causing us to generate the wrong bindings for Rust.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5736>
2024-08-12 19:23:08 +00:00
Nirbheek Chauhan
c11eaf56f5 meson: Use required: kwarg in osxaudio to fix FIXME
This wasn't used because this feature didn't exist years ago when this
build file was written.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7340>
2024-08-12 23:46:02 +05:30
Nirbheek Chauhan
daaeb57eca osxaudio: Fix build on iOS
These device-provider functions are only valid on macOS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7340>
2024-08-12 23:46:02 +05:30
Nirbheek Chauhan
f537f22522 osxaudio: Remove unused function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7340>
2024-08-12 22:23:29 +05:30
Nirbheek Chauhan
314d67b8cc osxaudio: Implement unique-id property on elements
The actual value is stored on GstCoreAudio now, which involved a lot
of moving code around due to the strange layering in the plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5274>
2024-08-12 13:04:24 +00:00
Jan Schmidt
81e3f7b4a4 osxaudio: Add some device provider properties
Add is-default and unique-id properties to the device provider.

unique-id is particularly useful for recognising the device again
as it's stable for a device across reboots and replugs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5274>
2024-08-12 13:04:24 +00:00
Jan Schmidt
e76581fe93 core: Log pad name, not just the pointer
Change a debug statement that was just logging a pad pointer where
it could log the pad name more usefully.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6943>
2024-08-12 12:38:44 +05:30
Jan Schmidt
0f8fc27892 webrtcbin: Fix renegotiation checks
When checking for renegotiation against a local offer,
reverse the remote direction in the corresponding answer
to fix falsely not triggering on-negotiation needed when
switching (for example) from local sendrecv -> recvonly
against a peer that answered 'recvonly'.

In the other direction, when the local was the answerer,
renegotiation might trigger when it didn't need to -
whenever the local transceiver direction differs from
the intersected direction we chose. Instead what we want
is to check if the intersected direction we would now
choose differs from what was previously chosen.

This makes the behaviour in both cases match the
behaviour described in
https://www.w3.org/TR/webrtc/#dfn-check-if-negotiation-is-needed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7303>
2024-08-11 21:45:10 +00:00
Benjamin Gräf
2638d8135d decklink: Add support for all modes of Quad HDMI recorder
By extending the GstDecklinkModeEnum with the additional modes supported by the Quad HDMI recorder,
we avoid using mode = 0 in case any of these resolutions is returned by the card.

Fixes#3713

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7302>
2024-08-09 11:29:59 +00:00
Sebastian Dröge
417c5e19b7 validate: Copy action structure before retrieving strings from it
The returned strings are only valid for as long as the structure is valid.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7333>
2024-08-09 10:26:30 +00:00
Sebastian Dröge
604cc0901c validate: Fix copying of action name
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7333>
2024-08-09 10:26:30 +00:00
Michael Tretter
ac393aa657 qml6glsink: add support for texture-target external-oes
In order to use oes-external, the qml6glsink needs a fragment shader that uses
the samplerExternalOES.

The qsb tool is not able to handle shaders that contain samplerExternalOES since
this feature is not supported by all target shading languages. The qsb tool is
able to replace a shader in the qsb file to handle this use case. Use it to
generate a shader variant that uses samplerExternalOES for OpenGL ES and select
that variant if the qml6glsink negotiated texture target oes-external.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7319>
2024-08-09 00:21:42 +00:00
Michael Tretter
5f6f755f5b gstqsg6material: pass the texture-target from caps to shader
The Material has to select the correct Shader depending on the negotiated
texture target.

Pass the texture target from the caps to the shader creation as it is already
done for the pixel format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7319>
2024-08-09 00:21:42 +00:00
Michael Tretter
429042fb70 gstqsg6material: create OESExternal RhiTexture if necessary
The RhiTexture must be created with the OESExternal flag, if the gl_mem is a
OESExternal buffer. Otherwise, Qt will create a Texture 2D texture and ignore
the previously negotiated texture target.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7319>
2024-08-09 00:21:42 +00:00
Michael Tretter
c91e002b5e gstqsg6material: print loaded fragment shader to log
This is useful for checking that the qml6glsink selected the correct fragment
shader for the expected texture format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7319>
2024-08-09 00:21:42 +00:00