Commit graph

120293 commits

Author SHA1 Message Date
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
Nirbheek Chauhan
9cc363311d meson: Add an option to disable gst-full
Not all static-library build configurations need to use this, and the
CPU time and RAM needed by gst-full targets is quite significant.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7315>
2024-08-13 01:01:28 +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