Commit graph

3266 commits

Author SHA1 Message Date
Weijian Pan
451bdb901e avfdeviceprovider: Fix caps leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7577>
2024-09-26 13:52:39 +01:00
Hugues Fruchet
9edd02d4e1 kmsallocator: fix stride with planar formats
This fixes a regression introduced by the merge request
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801

The extrapolated stride was computed but not used, resulting in the same
stride being applied to all planes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7571>
2024-09-24 23:59:51 +00:00
Tim-Philipp Müller
29b77fb2df Back to development after 1.24.8
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7549>
2024-09-19 12:12:53 +02:00
Tim-Philipp Müller
c396e7da4c Release 1.24.8 2024-09-19 12:01:21 +02:00
Benjamin Gaignard
a7b4214358 v4l2codecs: h265: Minimize memory allocation
Be smarter when allocating sink and source memory pools to reduce the
memory footprint. Use gst_v4l2_decoder_get_render_delay() to know the
need number of buffers for downstream element.

Handle errors in case of memory allocation failures.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7546>
2024-09-19 08:07:28 +00:00
Sebastian Dröge
2c145b18b7 mpegtsmux: Fix refcounting issue when selecting the best pad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7539>
2024-09-17 16:34:32 +01:00
Sebastian Dröge
7c7ac2d84f mpegtsmux: Wait for data on all pads before deciding on a best pad unless timing out
This makes sure that if upstream has different latencies that we're still
outputting buffers with increasining timestamps across the different streams
unless buffers are arriving after the latency deadline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7516>
2024-09-13 22:57:12 +00:00
Sebastian Dröge
ca23c3c762 video: Don't overshoot QoS earliest time by a factor of 2
By setting the earliest time to timestamp + 2 * diff there would be a difference
of 1 * diff between the current clock time and the earliest time the element
would let through in the future. If e.g. a frame is arriving 30s late at the
sink, then not just all frames up to that point would be dropped but also 30s of
frames after the current clock time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7518>
2024-09-13 23:04:43 +01:00
Nicolas Dufresne
4c3e5435d1 wayland: Set a debug category for the shm allocator
None was set, which meant the debug was associated with default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7494>
2024-09-10 23:48:44 +01:00
Nicolas Dufresne
1d629a1d69 wayland: Fix ABI break in WL context type name
While transforming the internals of waylandsink into a library, the
context type name was accidentally changed, causing an ABI break. Change
it back to its original (as used by the libgstgl), and add support for
the misnamed version as a backward compatibility measure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7494>
2024-09-10 23:48:44 +01:00
Michael Tretter
f8a9890ddf uvcsink: set cur_caps to upstream selected caps
If the UVC gadget announces multiple formats in the descriptors the uvcsink
doesn't select the actual format but let's the UVC hosts select the format.

If the GStreamer pipeline is started before a UVC host selected the format,
upstream decides on a format until the UVC host has decided. In this case, the
current format needs to be set based on the caps from the caps event to be able
to detect if the format selection by the UVC host requires a format change on
the GStreamer pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7484>
2024-09-09 23:58:04 +01:00
Michael Tretter
56bfb9a7b4 uvcsink: skip comparison with prev_caps if they are not set
The uvcsink may be put into the READY state to start listening for UVC requests.
Therefore, the UVC host may set a streaming format before the GStreamer pipeline
is started and the uvcsink received a caps event. In this case, prev_caps will
be NULL.

If the EVENT_CAPS has not been received, skip the check if the format needs to
be changed, since the sink will be started with the format selected by the UVC
host, anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7484>
2024-09-09 23:58:04 +01:00
Piotr Brzeziński
1a28d541a4 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/7449>
2024-09-09 13:40:00 +00:00
Edward Hervey
8d7cb4a5d1 gstplay: Name the different bus
Makes it clearer when reading logs which one is which

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7471>
2024-09-09 09:09:16 +00:00
Hou Qi
7256cd1ce7 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/7448>
2024-09-08 11:28:30 +00:00
Philippe Normand
5cfa9dc0e0 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/7436>
2024-09-02 17:22:28 +01:00
Francis Quiers
411e7958fc voamrwbenc: fix list of bitrates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7418>
2024-08-27 15:50:42 +01:00
Jan Schmidt
e3f07e1d68 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/7398>
2024-08-21 23:47:46 +00:00
Guillaume Desmottes
03f66c8513 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/7397>
2024-08-21 14:29:55 +01:00
Tim-Philipp Müller
29b51fb13d Back to development after 1.24.7 2024-08-21 12:33:28 +01:00
Tim-Philipp Müller
0f1e984e41 Release 1.24.7 2024-08-21 12:25:15 +01:00
Guillaume Desmottes
fba7c87cd7 wpe: initialize threading.ready before reading it
Fixes Valgrind warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7385>
2024-08-20 11:38:37 +01:00
Víctor Manuel Jáquez Leal
85fee9738e 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/7379>
2024-08-19 15:09:50 +01:00
Qian Hu (胡骞)
86c6a43a7c 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/7358>
2024-08-14 14:54:35 +01:00
Víctor Manuel Jáquez Leal
85b4fbf40b msdk: replace strcmp with g_strcmp0
Because strcmp doesn't handle NULL.

Fixes: #3721
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7349>
2024-08-13 18:13:56 +01:00
Tim-Philipp Müller
364d88045d 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/7328>
2024-08-08 16:17:10 +01:00
Jan Schmidt
a592bf28b0 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/7313>
2024-08-06 14:51:51 +01:00
Jordan Yelloz
b7cfd11b72 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/7296>
2024-08-02 14:54:30 +00:00
Guillaume Desmottes
0a2f3fbb9e rsvgoverlay: add debug category
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7281>
2024-07-30 20:44:12 +01:00
Tim-Philipp Müller
ad0cc551e1 Back to development after 1.24.6 2024-07-29 16:48:02 +01:00
Tim-Philipp Müller
8d175ea255 Release 1.24.6 2024-07-29 16:41:37 +01:00
Víctor Manuel Jáquez Leal
bb5632f5ef 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/7256>
2024-07-29 11:25:41 +01:00
Seungha Yang
c92e150207 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/7252>
2024-07-27 23:16:01 +01:00
Nirbheek Chauhan
541f9ba34d 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/7251>
2024-07-27 20:19:10 +01:00
Jan Schmidt
6409510e33 va: Fix dmabuf handle leaks
Close dmabuf handles manually when they're not going to
be passed into GStreamer FD memory, to avoid fd handle
leaks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7245>
2024-07-26 12:25:09 +01:00
Guillaume Desmottes
eba5405512 qroverlay: redraw overlay when caps changes
The position needs to be updated as it depends of the video size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7234>
2024-07-25 14:42:15 +00:00
Guillaume Desmottes
62c8c8a6cd qroverlay: add some debug logs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7234>
2024-07-25 14:42:15 +00:00
tomaszmi
c7df36c976 avtp: Fixed Linux/Alpine 3.20 build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7227>
2024-07-24 12:53:09 +01:00
Seungha Yang
df62e71289 cuda: Fix runtime compiler loading with old CUDA tookit
Fallback to PTX if CUBIN symbol is unavailable

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3685
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7223>
2024-07-24 00:25:09 +00:00
Víctor Manuel Jáquez Leal
b831478e53 vulkan: fix wrong stages or access in barriers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7202>
2024-07-22 13:38:15 +02:00
L. E. Segovia
c045531222 isac: Work around upstream having no shared library support for MSVC
None of the symbols in webrtc-audio-coding-1 are marked with
`__declspec(dllexport)`, rendering the library usable only if
it was built with GCC/Clang.

The only fix available (as the pulseaudio copy has not been updated
with Google's upstream) is to ensure the fallback builds statically.
Although this change will also affect webrtcdsp's dependency on
webrtc-audio-processing-1, it does not break its compilation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7206>
2024-07-20 02:05:59 +01:00
Robert Mader
a3dd8c1f3a vabase: Stop aligning VideoInfo during DMABUF import
Doing so resets the stride from the VideoMeta and it wasn't done before
the commit below. While on it, drop the plane size check as we can't
reliably predict the correct size when using DRM modifiers.

Fixes: 89b0a6fa23 ("va: refactor buffer import")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7196>
2024-07-18 10:57:04 +00:00
Robert Mader
7b7cf0afe4 vabase: Use correct VideoInfo during DMABUF import
The changes to the VideoInfo, notably the stride from the VideoMeta,
were lost. Avoid such mistakes by explicitly using the VideoInfo from
drm_info.

Fixes: 9f5b2c4e25 ("va: use GstVideoInfoDmaDrm when importing buffers")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7196>
2024-07-18 10:57:04 +00:00
Nirbheek Chauhan
3b398e7d9c avfdeviceprovider: Fix debug category initialization
The device monitor calls into avfvideosrc functions without
initializing the debug category, which causes multiple criticals.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7195>
2024-07-18 10:54:45 +01:00
Robert Mader
f4da9a4fea va: Blocklist i965 driver for encoding
The driver - AKA intel-vaapi-driver - has been unmaintained for four years
now and encoding appears to be broken in various cases. As it's unlikely
that the situation will improve, blocklist the driver for encoding.
Decoding appears to be stable enough to keep it enabled.

The driver can still be used by setting the `GST_VA_ALL_DRIVERS` env
variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7186>
2024-07-16 20:55:49 +02:00
Seungha Yang
4780685745 d3d12compositor: Fix transparent background mode with YUV output
In case of YUV format without alpha channel, zero clear value
for each channle will result in green color. Use calculated black
background color with alpha=0 for transparent background mode instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7185>
2024-07-16 17:02:08 +00:00
Seungha Yang
6d97fcd656 d3d11compositor: Fix transparent background mode with YUV output
In case of YUV format without alpha channel, zero clear value
for each channle will result in green color. Use calculated black
background color with alpha=0 for transparent background mode instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7185>
2024-07-16 17:02:08 +00:00
Seungha Yang
bef77722aa h264decoder: Update output frame duration when second field frame is discarded
In case of an interlaced stream, if each field picture belongs to
different GstVideoCodecFrame, updates output frame's duration
based on discarded second field picture's timestamp information.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7175>
2024-07-15 20:10:41 +02:00
Víctor Manuel Jáquez Leal
2962097764 vadisplay: fix minor version check
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7169>
2024-07-12 17:39:52 +02:00
Robert Mader
7502b1ef29 waylandsink: Fix surface cropping for rotated streams
The wp_viewport source rectangle is applied in surface-local coordinates
after buffer_transform and buffer_scale. Therefore we need to swap width
and height for 90/270 deg. rotations.

This fixes playback of rotated videos such as portrait videos from
mobile devices.

See also: https://wayland.app/protocols/viewporter#wp_viewport

Fixes: 0b648f9a2d ("waylandsink: Crop surfaces to their display width height")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7160>
2024-07-10 20:11:32 +02:00