Commit graph

3674 commits

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

Fixes #3783

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

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

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

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

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

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

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

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

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

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

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

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7384>
2024-09-02 22:31:34 +00:00
Oskar Fiedot
327df9766d analytics: Change pointers in getters to const
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7403>
2024-09-02 12:27:37 +00:00
Philippe Normand
89f335f173 webrtcbin: Prevent crash when attempting to set answer on invalid SDP
If the pending remote description has an invalid BUNDLE group _parse_bundle()
triggers early return from _create_answer_task(), before ret has been
initialized, so it needs to be checked before attempting to call
gst_sdp_message_copy().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7423>
2024-09-02 04:00:57 +00:00
Edward Hervey
087cb87d27 bad: Add suppression for libsrt issues
This is not code we control

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

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

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

Fixes #3753.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7417>
2024-08-27 23:56:00 +00:00
Francis Quiers
ac868d9dc1 voamrwbenc: fix list of bitrates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7396>
2024-08-27 13:53:04 +00:00
Daniel Pendse
e4fbf9d180 rtmp2: Add llnw auth support to rtmp client
Add support for Limelight CDN (llnw) authentication. Inspired
by the ffmpeg implementation of llnw auth.

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

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7322>
2024-08-23 18:37:16 +00:00
Thibault Saunier
87c69e5174 ci: Fail tests if we forget to checkout expectation files
And add missing expectation files

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7400>
2024-08-21 17:53:38 +00:00
Jan Schmidt
6cf3d32886 gstplayer: Check GstPlayerSignalDispatcher type
Before trying to retrieve a GMainContext from a provided
GstPlayerSignalDispatcher, check that it is actually
GstPlayerGMainContextSignalDispatcher. If not, use the
default GMainContext for dispatching signals via the adapter

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

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7004>
2024-08-20 23:48:24 +00:00
Jan Schmidt
96c4bd8d9f webrtc: Fix racy unit test
Don't reuse the same stats state structure across multiple
get-stats calls. Make each callback take a copy of the
non-changing fields it needs and use a local working copy
to avoid crashing.

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

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

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

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

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

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

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

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

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

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2555
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7338>
2024-08-19 21:07:51 +10:00
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
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
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
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
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