Commit graph

7372 commits

Author SHA1 Message Date
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