Commit graph

7391 commits

Author SHA1 Message Date
Thibault Saunier
8fdd59f9d5 validate: flow: Allow logging upstream events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7382>
2024-08-21 13:55:15 +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
Sebastian Dröge
7daa040d24 avdemux: Never return 0 from read function
Instead return AVERROR_EOF. The read function must never ever return 0 according
to the documentation, and in practice this leads to infinite loops.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7390>
2024-08-21 11:05:11 +03: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
Seungha Yang
c484de8d8b gst-rtsp-server: Make test-onvif-client example work on Windows
Use autovideosink instead of hardcoded xvimagesink,
so that platform-default videosink can be picked

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7174>
2024-08-20 19:44:42 +00:00
Mathieu Duponchelle
25f3ab2e6c audioconvert: handle new GstRequestMixMatrix custom upstream event
An example use case is the gstwebrtc-api demo, which will cause
webrtcsink to forward such events. This lets the end user define a mix
matrix without requiring any application code server side.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7363>
2024-08-20 17:05:49 +00:00
Mathieu Duponchelle
fd90d7bdee audioconvert: fix setting of mix matrix at run time
There were two main issues:

The mix matrix was not protected with the object lock

The code was mistakenly assuming that after updating the mix matrix
a reconfigure event sent upstream would be enough to cause upstream to
send caps again, and the converter was only reconstructed in ->set_caps.

That was not actually enough, as if the new matrix didn't affect the
number of input / output channels there was no reason for upstream to do
anything after getting the unchanged caps.

The fix for this was to have ->transform also recreate the converter
when needed, with the added subtlety that depending on the mix matrix
the element could be set to passthrough. This means that when setting
the mix matrix the converter also had to be recreated immediately to
check if the element had to be switched back to non-passthrough.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7363>
2024-08-20 17:05:49 +00:00
Mathieu Duponchelle
015af606b6 audio-converter: support more numerical types for mix matrix
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7363>
2024-08-20 17:05:49 +00:00
Paweł Kotiuk
c5e7ffcd1b example: Add example for streaming camera rith RTSP
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6965>
2024-08-20 12:55:06 +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
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