Commit graph

3627 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
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
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
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
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
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
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
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
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
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
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
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
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