Commit graph

7475 commits

Author SHA1 Message Date
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
Tim-Philipp Müller
94ba97ab80 mpegts: fix stray gtk-doc chunk
Trips up g-ir-scanner it seems:
gstmpegtsdescriptor.h:614: Error: GstMpegts: Skipping invalid GTK-Doc comment block

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793#note_2517855

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7324>
2024-08-08 18:09:02 +00:00
Shengqi Yu
07b1841b54 baseautoconvert: correct mistake in printing log
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7323>
2024-08-08 15:19:50 +00:00
Tim-Philipp Müller
24d21cdce4 aom: av1enc: restrict allowed input width and height
Restrict allowed input resolution to something sensible
in light of libaom CVE-2024-5171.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7320>
2024-08-08 10:15:06 +01:00
Jan Schmidt
4b775228bf webrtcbin: Make basic rollbacks work
Fixes for basic rollback (from have-local-offer or have-remote-offer to
stable). Allow having no SDP attached to the webrtc session description
in that case, and avoid all the transceiver and ICE update logic
normally applied when entering the stable signalling state

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7304>
2024-08-07 21:10:43 +10:00
Olivier Crête
07205d036a python: Add unit test for analytics API
This is a way to validate that the GObject Annotations are correct

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7297>
2024-08-06 14:28:18 +00:00
Jan Schmidt
c0c0615964 webrtc: Add missing G_BEGIN/END_DECLS in header
Fix using webrtc.h from C++ by adding the GLib begin/end
decls markers around the header contents in webrtc_fwd.h

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7312>
2024-08-06 12:54:45 +00:00
Piotr Brzeziński
724c443a65 videoencoder: Expose release_frame() and drop_frame() as public API
release_frame() can be useful for manually dropping frames without posting QoS messages like finish_frame() would.
Matches the same kind of API on the decoder side of things.

Modifies the behaviour of release_frame() to make sure events from released frames are stored as 'pending'
and pushed before the next non-dropped frame. This is needed because now release_frame() can be called outside of
finish_frame(), so we would potentially just lose events and bad things would happen.

drop_frame() was also added to match the decoder API. It functions almost identically to finish_frame() without a buffer
attached to the frame, except instead of immediately pushing the frame's events, it will store them as pending.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7190>
2024-08-06 09:31:58 +00:00
Sebastian Dröge
9bbb7accb3 bin: Don't keep the object lock while setting a GstContext when handling NEED_CONTEXT
This can potentially deadlock.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7305>
2024-08-06 07:00:29 +00:00
Max Romanov
09257b391c rtspconnection: Handle invalid argument properly
In case when conn->input_stream is NULL and glib was built with
"glib_checks" enabled, g_pollable_input_stream_read_nonblocking()
returns -1, but does not set the "err".

The call stack:
  read_bytes() ->
    fill_bytes() ->
      fill_raw_bytes()

The return value -1 passed up to read_bytes() and incorrectly
processed there after "error:" label.

This changes the return value to EINVAL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7210>
2024-08-06 03:50:34 +00:00
Matthew Waters
c541cbef92 decklink: fix win32 build error
This was not caught by the CI in the MR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7307>
2024-08-06 10:04:40 +10:00
Matthew Waters
0699dd510d decklink: add support for HDR output and input
Supports PQ and HLG static metadata.

Support for HDR is queried from the device and selectively enabled when
supported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7214>
2024-08-05 16:38:22 +00:00
Jan Schmidt
455b6a33b2 webrtc: Add reuse-source-pads property
Add a property to avoid sending EOS on source pads when the
associated transceiver becomes inactive during renegotiation.
This allows the pads to become active again in a later
renegotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7237>
2024-08-05 13:15:39 +00:00
Jan Schmidt
cafb999fb0 webrtc: Fix transceiver current-direction property
Fix a typo registering the `current-direction` property
that made it just be a proxy for `direction` instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7237>
2024-08-05 13:15:39 +00:00
Jan Schmidt
09d870a39c webrtc: Fixes for matching pads to unassociated transceivers
Fix an inverted condition when checking if sink pad caps match
the codec-preference of an unassociated transceiver, and
fix a condition check for transceiver media kind to
avoid matching sinkpad requests where caps aren't provided
against unassociated transceivers where the caps might
not match later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7237>
2024-08-05 13:15:38 +00:00
Jan Schmidt
87a7a7567f webrtcbin: tracked maximum pad serial better
If a sink pad with a specific index is requested, also
increase the maximum pad serial number if necessary, so
that mixing fixed sink_X requests with unspecific sink_%u
requests works.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7237>
2024-08-05 13:15:38 +00:00
Jesper Jensen
825f52d38b avprotocol: Return EOF when stream is out of data
According to the ffmpeg documentation[1] the read_packet function should never
return 0. ffmpegdata_peek returns 0 when the stream is EOF causing us to fail
detecting EOF and never close the pipeline, continually spinning on more data.
ffmpeg instead wants an AVERROR_EOF code for to signal EOF.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4999>
2024-08-05 10:23:32 +00:00
Carlos Bentzen
efa0a3ec6a webrtcbin: connect output stream on recv transceivers
With MR 7156, transceivers and transports are created earlier,
but for sendrecv media we could get `not-linked` errors due to
transportreceivebin not being connected to rtpbin yet when incoming
data arrives.

This condition wasn't being tested in elements_webrtcbin, but could be
reproduced in the webrtcbidirectional example. This commit now also
adds a test for this, so that this doesn't regress anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7294>
2024-08-05 08:25:04 +00:00
Carlos Bentzen
cad3e63546 webrtcbin: reverse direction from remote media
This had been overlooked from the spec. We need to reverse
the remote media direction when setting the transceiver direction.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7294>
2024-08-05 08:25:04 +00:00
He Junyan
f3d14d33a8 vah264enc: Fix intra only stream bug
When we set "ref-frames=0" to generate an intra only stream, the current
encoder just generates an assert and exit with error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6577>
2024-08-03 10:18:40 +00:00
He Junyan
d177eb1a67 vah264enc: Improve B pyramid mode in H264
If the reference frame number is bigger than 2, we can enable the
pyramid B mode. We do not need to assign a reference frame to each
pyramid level.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6577>
2024-08-03 10:18:40 +00:00
He Junyan
2c833bd40e va: h264enc: Make the level table aligned
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6577>
2024-08-03 10:18:40 +00:00
Seungha Yang
c95873bbd5 d3d12screencapturesrc: Always release acquired frame
AcquireNextFrame() call should be paired with ReleaseFrame().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7293>
2024-08-02 15:36:14 +00:00
Seungha Yang
9b6a3170ae d3d12screencapturesrc: Do not recreate d3d11 device on capture error
Already opened d3d11 device including shader pipeline can be reused

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7293>
2024-08-02 15:36:14 +00:00
Seungha Yang
f5cd00fbd2 d3d12screencapturesrc: Fix deadlock on error
Don't try to wait for non-signalled fence

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7293>
2024-08-02 15:36:14 +00:00
Michael Scherle
f77189a7bf msdkvpp: add interpolation method
For description of interpolation modes, see:
<https://intel.github.io/libvpl/latest/API_ref/VPL_enums.html#interpolationmode>.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7278>
2024-08-02 14:39:47 +00:00
Jordan Yelloz
317c70651f h265parse: Reject FD received before SPS
A previous fix, a275e1e029, is correct but was too
permissive since it treats all un-matched NAL units the same as AU delimiters
even though some other NAL unit types can be encountered in the processing loop.

The problem this can cause is that some hardware decoders experience bad
performance when handling FD units that precede the SPS.

This change restores the original behavior for FDs so that they're ignored until
the SPS is received and it preserves the codec conformance test gains that the
fix has achieved.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7166>
2024-08-02 13:51:43 +00:00
Nicolas Dufresne
7bd5c5073f glframebuffer: Improve error tracing
glCheckFrameStatus() can fail by returning 0, and otherwise return a
status. Fix the trace to make it clear when we get an unkown status
compare to having an error, in which case we also trace the error code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7291>
2024-08-02 13:03:51 +00:00
Nicolas Dufresne
d321afcd1b qt6glwindow: Only use GL_READ_FRAMEBUFFER when we do blits
This fbo target is not always supported, and should only be used
along with the frame buffer blit extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7291>
2024-08-02 13:03:51 +00:00
Jan Schmidt
c1a1584dde splitmuxsrc: Don't create part reader elements initially
Only create the part reader elements internally the first time
the part is activated. Saves some startup time when preloading
a large number of fragments

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
8a1fab9594 splitmuxsrc: Drop lock when unpreparing parts
Parts may emit bus messages that want to take the splitmuxsrc
lock and prevent the downward state change. Avoid a deadlock
after a part sends an error message by taking a ref and
dropping the lock around the unprepare call

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
ec1c6c5b60 splitmuxsrc: Make sure to re-take lock
In the error path when activating a part fails, make
sure to re-take the splitmuxsrc lock before returning
to the caller.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
44005ab9fb splitmuxsink: Fix race in unit tests. Add fragment-id to messages
Publish fragment-id in the messages that splitmuxsink and splitmuxsrc
send, so when they are received out of order (due to async finalization,
for example), they can still be identified / ordered correctly.

Fix a race in the splitmuxsink unit test where messages might be
received out of order

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
356710f6fa splitmuxsrc: Document new properties and signals
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
64fd2b265f splitmuxsrc: Add num-lookahead property
Add a `num-lookahead` property that will 'prepare' a number of
fragments in advance of the playhead if they have been deactivated
or closed by a limited number of `num-open-fragments`. It can help
to avoid any play stalls reading the indexes or headers of the next
file from high-latency media or on resource limited machines.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
93c04e7473 splitmuxsrc: Rename some internal terminology
A part reader can be 'loaded' (prepared, but not currently outputting anything)
or 'playing' (actively being used to output data)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
3121eeeb08 splitmuxsrc: Allow adding fragments during playback
Trigger measurement / inclusion of new fragments into
the playback timeline if they are added after the
element is already running.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
ed03e8f8ab splitmuxsink: Add fragment offset and duration to message
Publish the playback offset for and duration into the
splitmuxsink-fragment-closed bus message as each fragment
finishes.

These can be passed to splitmuxsrc via the 'add-fragment'
signal to avoid splitmuxsrc measuring all files on startup

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:05 +10:00
Jan Schmidt
b0df6ee408 splitmuxsink: Fix a race in fragment switching with async handling
Only do output/muxer operations at the output side of splitmuxsink
to avoid races if fragments are small, by moving the RUNNING_TIME
qdata setting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:05 +10:00
Jan Schmidt
eca97e7940 splitmuxsink: Refactor command queue buffer
Make the command struct a bit clearer by giving it an explicit
enum cmd_type instead of just a boolean to differentiate a
finish-fragment command from a release-gop command

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:05 +10:00
Jan Schmidt
bfdaae81f4 splitmuxsrc: Default to only keeping 100 files open
Add a reasonably large default for the number of simulataneous
files to open, that won't affect users that split recordings into
a few large files, but will help prevent fd exhaustion for users
that make recordings with lots of small fragments

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:04 +10:00
Jan Schmidt
1294264ab9 splitmuxsrc: Keep streams aligned during adjustments
When calculating the timestamp offset to apply to
media streams in a fragment, ensure that all fragments
are offset "together" to preserve alignment in cases
where there might gaps in a recording at a fragment boundary.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:04 +10:00
Jan Schmidt
682db96a41 splitmuxsrc: Add add-fragment signal and examples
Add a signal that allows adding fragments with a specific offset
and duration directly to splitmuxsrc's list. By providing the
fragment's offset on the playback timeline and duration directly,
splitmuxsrc doesn't need to measure the fragment making for faster
startup times.

Add a bus message that's published when fragments are measured,
reporting the offset and duration, so they can be cached by an
application and used on future invocations.

Add examples for handling the bus message and using the 'add-fragment'
signal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:04 +10:00
Jan Schmidt
1821b52dd5 splitmuxsrc: Add num-open-fragments property
Add a property to limit the number of parts splitmux will open
simultaneously. Modify the part handling to support deactivating
and reactivating the demuxing for each part.

The default is '0', to preserve the existing behaviour of opening
all parts at the beginning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:04 +10:00
Jan Schmidt
eeb5a42b5d splitmuxsrc: Report minimum timestamp for each media stream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:04 +10:00
Matthew Waters
8dac91537d cuda/nvcodec: Add support for importing and producing embedded NVMM memory
As produced on the Nvidia Jetson series of devices.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7274>
2024-08-02 01:59:07 +00:00
Nicolas Dufresne
adcc6c8d38 xv: imagepool: Improve error logging
The shm creation function can return a GError, use this to improve the error
reporting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7285>
2024-08-01 16:42:35 +00:00
Nicolas Dufresne
ab70aa60e2 xvimagesink: Fix crash in pool on error
The set_config() virtual function is not support to free the config. As a side
effect, when there is protocol error of some sort, we endup with a crash.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7285>
2024-08-01 16:42:35 +00:00
Nicolas Dufresne
5df658cfdd qt6: glwindow: Don't leak previously rendered buffer
If the consumer reads the buffers too slowily, simply unref the
previously rendered buffer instead of leaking it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7286>
2024-08-01 12:44:06 +00:00
Víctor Manuel Jáquez Leal
28e16f897e vkimagebufferpool: fix documentation grammar
Original-patch-by: Matthew Waters <matthew@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7288>
2024-08-01 10:09:34 +00:00
Carlos Bentzen
48ae40f477 webrtcbin: create and associate transceivers earlier in negotation
According to https://w3c.github.io/webrtc-pc/#set-the-session-description
(steps in 4.6.10.), we should be creating and associating transceivers when
setting session descriptions.

Before this commit, webrtcbin deviated from the spec:
1. Transceivers from sink pads where created when the sink pad was
   requested, but not associated after setting local description, only
   when signaling is STABLE.
2. Transceivers from remote offers were not created after applying the
   the remote description, only when the answer is created, and were then
   only associated once signaling is STABLE.

This commit makes webrtcbin follow the spec more closely with regards to
timing of transceivers creation and association.

A unit test is added, checking that the transceivers are created and
associated after every session description is set.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7156>
2024-08-01 07:38:46 +00:00
Víctor Manuel Jáquez Leal
ef9875640e vulkanupload: honor downstream pool allocation parameters
If a downstream buffer pool is offered, vulkanupload checks its allocation
parameters to honor them. Only adds to usage the TRANSFER bits, which are
required to upload buffers.

Also, fail if the buffer pool cannot be configured with the current parameters.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7219>
2024-07-31 12:15:43 +00:00
Víctor Manuel Jáquez Leal
baac191d13 vkimagebufferpool: expose config_get_allocation_params()
Also enhanced the documentation and added a config parameter check for
gst_vulkan_image_buffer_pool_config_set_allocation_params()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7219>
2024-07-31 12:15:43 +00:00
Shengqi Yu
7576d14762 v4l2object: append non colorimetry structure to probed caps
If the stream has a special colorimetry that is not in the colorimetry
list, it will cause negotiation to fail. We should allow passing any
colorimetry, so add an extra structure without the colorimetry field.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7029>
2024-07-31 09:28:18 +00:00
Hou Qi
5dffbd492c v4l2: Fix colorimetry mismatch for encoded format with RGB color-matrix
video-info supports encoded format to have RGB color-matrix, while
v4l2object just leave the v4l2 matrix to default when mapping
GST_VIDEO_COLOR_MATRIX_RGB. It causes gst matrix changed to be
GST_VIDEO_COLOR_MATRIX_BT601 when mapping v4l2 colorimetry.

So add support for encoded format with RGB color-matrix in v4l2object.
Note that for M2M encoders, we should in theory assume that that we can
transfer this value from OUTPUT to CAPTURE queues, though its only true
if the drivers does not do CSC. For now, we don't support any RGB
codecs, but leaving a note for the future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3952>
2024-07-30 20:26:06 +00:00
Nicolas Dufresne
1ddb8797b5 v4l2object: SRGB colorspace is documented limited-range
Split JPEG and SRGB so that we can follow the specified difference. The
SRGB definition in V4L2 does not follow the standard, and is document
so. This is also why JPEG colorspace exists.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3952>
2024-07-30 20:26:06 +00:00
Nicolas Dufresne
20eb14b85b v4l2object: Fix size of plane_size array calculation
Due to missing parenthesys, only the first element of the array was
being cleared. As it is a staticly sized array in the object, this
code could also be simplified.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3952>
2024-07-30 20:26:06 +00:00
Nicolas Dufresne
152df21644 v4l2object: Fix translation of quantization
The V4L2_MAP_QUANTIZATION macro has been fixed to something a lot saner,
fix our replica accordingly. The new macro now simply set the quantization
to full range is the pixel formats is RGB based, or if the JPEG
colorspace is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3952>
2024-07-30 20:26:06 +00:00
Guillaume Desmottes
beb1cef3d4 rsvgoverlay: add debug category
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7246>
2024-07-30 17:51:51 +00:00
David Rosca
6fe5d9013d vaapi: Fix sps_max_dec_pic_buffering_minus1 value in h265 decoder
Fixes decoding SLPPLP_A_VIDYO_2 sample.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7242>
2024-07-30 17:31:07 +00:00
Daniel Morin
4ff98d66bb onnx: fix formating
Code alignement was not alway consistent

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7205>
2024-07-30 16:50:15 +00:00
Víctor Manuel Jáquez Leal
43edff4e29 vaapi: tests: fix uninitialized variable compiler warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7279>
2024-07-30 15:06:25 +00:00
Edward Hervey
b7828d237b nlecomposition: Don't leak QoS events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7276>
2024-07-30 14:22:54 +00:00
Edward Hervey
a38e244794 vulkan: Add missing since markers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7277>
2024-07-30 13:46:42 +00:00
Edward Hervey
30c2f67e49 bad: Add missing plugin since
These predate current stable release. Was never spotted since they weren't built
on the CI

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7277>
2024-07-30 13:46:42 +00:00
Nirbheek Chauhan
fa25dd4de5 vtenc: Do not set the CRF/Quality parameter with ProRes
It's not supported with ProRes, setting the property will fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
cbadb0b4ae vtenc: Log warnings when setting a property fails
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
f8711239e4 vtenc: Add max-frame-delay property
This controls the number of frames allowed in the compression window.
Not all encoders and implementations support it; I've only managed to
successfully use it with ProRes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
30d2b8895a vtenc: Support emulating CBR mode with data rate limits
CBR is only supported on Apple Silicon, and this "emulation" works
surprisingly well. We set the window size to a single frame, and don't
set ABR at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
d327105228 vtenc: Add new property for setting data rate limits
This proxies kVTCompressionPropertyKey_DataRateLimits, except it
only supports a single limit for now.
https://developer.apple.com/documentation/videotoolbox/kvtcompressionpropertykey_dataratelimits

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
4207b4e281 vtenc: Add support for constant bitrate encoding
Only supported on macOS 13.0+ and iOS 16.0+ on Apple Silicon.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
2e39aefe22 vtenc: Eliminate some needless complex code
We do not need a helper that takes a lock to fetch the values of these
properties. There is no race being prevented.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
3621b82c63 vtenc: Fix setting of quality property
gst_vtenc_set_quality() will never actually set the VT compression
property, because it tries to set it on self->session which is not
initialized at this point.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Edward Hervey
c623f2db21 validate: reporter: Don't pollute logs
There was a stray g_printerr introduced by 2a4b9c8dc1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7275>
2024-07-30 11:39:02 +02:00
Jan Schmidt
0faec707a0 adaptivedemux: Fail cleanly if parsebin is not installed
Detect a failure to construct a parsebin and error out
cleanly instead of trying to operate on a null pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
2024-07-30 00:06:50 +00:00
Jan Schmidt
213726ca41 adaptivedemux2: Post a bus error when failing to start download
If a download completely fails to start, due to malformed URI or so,
post a bus error instead of just stalling out with no indication
why.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
2024-07-30 00:06:50 +00:00
Jan Schmidt
f2a18ab277 adaptivedemux2: Implement file:// URI handling
Add the ability to play HLS and DASH from local files

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
2024-07-30 00:06:50 +00:00
Jan Schmidt
9dc1d68e2f codec-utils: Recognise mjpg mime type
Add mjpg to gst_codec_utils_caps_from_mime_codec_single()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
2024-07-30 00:06:50 +00:00
Jan Schmidt
ef0e822559 hlsng: Check caps are not null after parsing HLS CODECS tag
If the mime codec wasn't recognised, caps will be NULL and cause
a critical

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
2024-07-30 00:06:50 +00:00
Jan Schmidt
7bd51afd04 gsturi: Ensure file:// URIs retain //
Add the // back after the scheme for file URIs so 'file:///path/to/file'
doesn't become 'file:/path/to/file' in gst_uri_to_string()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
2024-07-30 00:06:50 +00:00
Víctor Manuel Jáquez Leal
bff24e5ab7 vulkanupload: comment zero value usage with VK_ACCESS_NONE
Zero is used only for Vulkan version prior to 1.3, because it wasn't defined
before.

Just for readability.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7247>
2024-07-29 17:10:15 +02:00
Víctor Manuel Jáquez Leal
fad06c9b6f vkimagebufferpool: refactor how image usage is set
Now that driver version is expected to be equal or superior to 1.3.275 the bug
in NVIDIA and RADV regarding usage is solved, we can revert commit b7ded81f7b.

Also this patch sets the internal usage variable after all the validation are
run, thus the state don't keep an invalid usage.

Finally, the now unused supported_usage variable is dropped.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7247>
2024-07-29 17:10:15 +02:00
Víctor Manuel Jáquez Leal
bb9eb6f477 vkimagebufferpool: add encoding usage as video usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7247>
2024-07-29 17:10:15 +02:00
Víctor Manuel Jáquez Leal
541e2e93ca vkimagebufferpool: reset the number of profiles at set_config()
Virtual method set_config() can be called several times, and if the number of
profiles counter isn't reset the pool will reach an error state.

The purpose of number of profiles is to check the number of valid vulkan video
profiles (two in the case of transcoding use-case, for example) so it's local to
set_config() virtual method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7247>
2024-07-29 17:10:14 +02:00
Víctor Manuel Jáquez Leal
d8e384085a vulkan: encoder and decoder runtime check for driver version 1.3.275
Which is the one checked in meson. See commit 21ee264d65

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7247>
2024-07-29 17:10:14 +02:00
Philippe Normand
bd64374174 parsebin: accept-caps handling for elements with unusual pad names
In case the last element of the parse chain doesn´t have a sink pad named
"sink", send the accept-caps query to the first sink pad of the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7255>
2024-07-29 12:41:33 +00:00
Víctor Manuel Jáquez Leal
8faefccfd5 va: refactor dmabuf handle close
Moved the close loop into a function guarded for non-win32 platforms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7254>
2024-07-29 10:34:56 +02:00
Seungha Yang
080a838fca qsv: Fix critical warnings
Fixing warnings
GStreamer-CRITICAL **: 01:21:25.862: gst_value_set_int_range_step:
assertion 'start < end' failed

Although when QSV runtime reports a codec is supported, resolution query
fails sometimes, espeically VP9 encoder case on Windows.
Don't try to register an element if resolution query returned an error

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7250>
2024-07-27 19:33:52 +00:00
Nirbheek Chauhan
0bb336f34c svtav1enc: Fix segfault when flushing
gst_video_encoder_get_oldest_frame() is nullable, and will signal that
all frames are handled by returning NULL.

Fixes #3650

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7249>
2024-07-27 19:21:37 +01:00
Seungha Yang
f04f6f43c3 d3d12frame: Fix frame copy method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7243>
2024-07-27 04:18:47 +09:00
Seungha Yang
28a7adf4dd d3d12memory: Check heap flag before trying to create NT handle
CreateSharedHandle() will fail eventually if the resource was created
with non-shared heap. Instead of trying to create handle blindly,
validate resource first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7243>
2024-07-27 04:17:03 +09:00
Seungha Yang
1c8c5ed457 dwrite: Prefer d3d12 resource allocated with shared heap
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7243>
2024-07-27 03:39:22 +09:00
Seungha Yang
4a6daad517 d3d12: Suppress fence data object leak report
We don't release GstD3D12Device intentionally, thus
a GstD3D12FenceDataPool owned by a device will not be released
but that's expected leak.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7243>
2024-07-27 03:23:22 +09:00
Seungha Yang
9a8d7db5de d3d12: Fix debug category name
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7243>
2024-07-27 03:23:22 +09:00
Seungha Yang
88efaa35a8 d3d12download: Do not overwrite fence of non-writable memory
A fence configured in GstD3D12Memory should be used only for
write access to be completed. And because d3d12 -> d3d11 copy path
is read access to d3d12 resource, we should not set fence to
memory. Otherwise another read access to the d3d12 resource
will wait for d3d11 device context's copy operation although
simultaneous read access is allowed.

Use background thread to keep d3d12 resource and wait for d3d11 device's
copy operation instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7243>
2024-07-27 03:23:22 +09:00