Commit graph

6823 commits

Author SHA1 Message Date
Sebastian Dröge
dd11178f81 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/7367>
2024-08-16 11:57:36 +01:00
Víctor Manuel Jáquez Leal
68913e0a56 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/7359>
2024-08-15 01:06:48 +00: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
Mathieu Duponchelle
6500fc7666 rtspsrc: expose property for forcing usage of non-compliant URLs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7346>
2024-08-13 11:16:11 +00:00
Nicolas Dufresne
c29f2e8632 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/7345>
2024-08-13 10:03:47 +00:00
Nicolas Dufresne
a5be59f9c0 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/7344>
2024-08-13 09:27:34 +00:00
Jan Schmidt
a86803ae3a 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/7336>
2024-08-12 10:54:45 +01:00
Sebastian Dröge
c4af350105 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/7334>
2024-08-09 12:11:38 +01:00
Sebastian Dröge
b8d7cdbd1f validate: Fix copying of action name
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7334>
2024-08-09 12:11:38 +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
Sebastian Dröge
14e3be6a26 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/7310>
2024-08-06 09:27:11 +00:00
Max Romanov
8aa5a9520c 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/7309>
2024-08-06 09:32:13 +01:00
Jesper Jensen
83373f786b 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/7299>
2024-08-05 12:24:52 +01:00
Nicolas Dufresne
12283d9d97 xv: imagepool: Improve error logging
The shm creation function can return a GError, use this to improve the error
reporting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7292>
2024-08-05 08:32:24 +00:00
Nicolas Dufresne
15bed85173 xvimagesink: Fix crash in pool on error
The set_config() virtual function is not support to free the config. As a side
effect, when there is protocol error of some sort, we endup with a crash.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7292>
2024-08-05 08:32:24 +00:00
David Rosca
15528df1cf vaapi: Fix sps_max_dec_pic_buffering_minus1 value in h265 decoder
Fixes decoding SLPPLP_A_VIDYO_2 sample.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7298>
2024-08-03 10:48:36 +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
Nicolas Dufresne
487e41b815 glframebuffer: Improve error tracing
glCheckFrameStatus() can fail by returning 0, and otherwise return a
status. Fix the trace to make it clear when we get an unkown status
compare to having an error, in which case we also trace the error code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7295>
2024-08-02 14:57:32 +01:00
Nicolas Dufresne
65f1c70430 qt6glwindow: Only use GL_READ_FRAMEBUFFER when we do blits
This fbo target is not always supported, and should only be used
along with the frame buffer blit extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7295>
2024-08-02 14:57:32 +01:00
Nicolas Dufresne
be7ff82614 qt6: glwindow: Don't leak previously rendered buffer
If the consumer reads the buffers too slowily, simply unref the
previously rendered buffer instead of leaking it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7289>
2024-08-01 14:46:36 +01:00
Hou Qi
dd22125b1e v4l2: Fix colorimetry mismatch for encoded format with RGB color-matrix
video-info supports encoded format to have RGB color-matrix, while
v4l2object just leave the v4l2 matrix to default when mapping
GST_VIDEO_COLOR_MATRIX_RGB. It causes gst matrix changed to be
GST_VIDEO_COLOR_MATRIX_BT601 when mapping v4l2 colorimetry.

So add support for encoded format with RGB color-matrix in v4l2object.
Note that for M2M encoders, we should in theory assume that that we can
transfer this value from OUTPUT to CAPTURE queues, though its only true
if the drivers does not do CSC. For now, we don't support any RGB
codecs, but leaving a note for the future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7284>
2024-07-31 11:14:12 +01:00
Nicolas Dufresne
654901612b v4l2object: SRGB colorspace is documented limited-range
Split JPEG and SRGB so that we can follow the specified difference. The
SRGB definition in V4L2 does not follow the standard, and is document
so. This is also why JPEG colorspace exists.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7284>
2024-07-31 11:14:12 +01:00
Nicolas Dufresne
37d64f651e v4l2object: Fix size of plane_size array calculation
Due to missing parenthesys, only the first element of the array was
being cleared. As it is a staticly sized array in the object, this
code could also be simplified.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7284>
2024-07-31 11:14:12 +01:00
Nicolas Dufresne
8c881e833c v4l2object: Fix translation of quantization
The V4L2_MAP_QUANTIZATION macro has been fixed to something a lot saner,
fix our replica accordingly. The new macro now simply set the quantization
to full range is the pixel formats is RGB based, or if the JPEG
colorspace is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7284>
2024-07-31 11:14:12 +01: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
Edward Hervey
a6feed84e4 nlecomposition: Don't leak QoS events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7280>
2024-07-30 16:09:41 +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
Piotr Brzeziński
2aa610605e macos: Listen for audio devices being added/removed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7258>
2024-07-29 14:05:49 +00:00
Philippe Normand
14ca30a014 parsebin: accept-caps handling for elements with unusual pad names
In case the last element of the parse chain doesn´t have a sink pad named
"sink", send the accept-caps query to the first sink pad of the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7257>
2024-07-29 14:26:19 +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
Shengqi Yu
65327c1a8c videoscale: correct classification error
videoscale does not have convert function, so remove the convert
description in it's classification. Otherwise, if we want use
autovideoconvert to convert colorsapce, autovideoconvert will select
videoscale to do convert and this will cause to fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7235>
2024-07-25 16:43:34 +00: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
Tim-Philipp Müller
77b250bcca wraps: libgudev: add fallback uri
Release tarball is .xz but we currently use a snapshot
from gitlab, so just mirror the .bz2 instead of changing
all URLs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7228>
2024-07-24 12:31:59 +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
Matthew Waters
d705966861 qml/glsink: also support GLES2 needing shader 'precision' directives
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3616
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7125>
2024-07-24 10:05:23 +00: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
Ruben Gonzalez
75bcdc4564 avmux: Fix crash when muxer doesn't get codecid
gst_ffmpeg_formatid_get_codecids from gst_ffmpegmux_base_init to gst_ffmpegmux_base_init

FFmpeg 7.0 included new muxer rcwt for Raw Captions with Time
(RCWT). Commit [1].  GStreamer couldn't get sink caps for muxer it.

Calling gst_ffmpeg_formatid_get_codecids in gst_ffmpegmux_register to
avoid create muxer without pad templates.

[1] https://github.com/FFmpeg/FFmpeg/commit/3525544e48

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7222>
2024-07-24 00:15:14 +01:00
Loïc Yhuel
1305d597c7 meson: fix SIZEOF_OFF_T when cross-compiling with Meson >= 1.3.0
https://mesonbuild.com/Release-notes-for-1-3-0.html#clarify-of-implicitlyincluded-headers-in-clike-compiler-checks

With only stddef.h, off_t is not defined, so when cross-compiling SIZEOF_OFF_T is -1.
We now use sys/types.h which should define off_t.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7218>
2024-07-23 16:32:10 +01:00
Sebastian Gross
406e8f3fe3 asfdemux: Be more lenient towards malformed header
VLC counts METADATA as 1 even if the specification states you must not.
This leads to asfdemux failing since there are no bytes left when asfdemux
tries to extract the "last" header.

Do not fail hard in this case and try to proceed when everything else went
fine.
So at least gst-discoverer will see what's in the file.

Closes #3684

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7216>
2024-07-23 12:38:54 +01: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
Nirbheek Chauhan
4a14196f28 glvideomixer: Fix critical when setting start-time-selection
It caused a critical, but did not affect functionality because the
GValue was passed as-is to the glvideomixerelement which actually does
something with the property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7207>
2024-07-20 10:03:40 +01: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
Guillaume Desmottes
8e2ed73fa9 downloadbuffer: send EOS in push mode
gst_download_buffer_read_buffer() returns FLOW_EOS but it was not
handled in the 'out_flushing' goto block which uses srcresult,
so EOS was not sent downstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7140>
2024-07-18 19:57:23 +00:00
Guillaume Desmottes
8d99e858ff downloadbuffer: initialize upstream_size when activated in push mode
Push mode flow relies on upstream_size but it was not initialized when
activated as it is when activated in pull mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7140>
2024-07-18 19:57:23 +00:00
Guillaume Desmottes
a0ce51c2ba downloadbuffer: init upstream_size to -1
Code in check_upstream_size() is checking for -1 to check if
upstream_size has been set or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7140>
2024-07-18 19:57:23 +00:00
Guillaume Desmottes
d54bbfbd61 downloadbuffer: properly log when receiving events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7140>
2024-07-18 19:57:23 +00:00
Jakub Adam
d56f601b48 gstvideoaggregator: preserve features in non-alpha caps
Fixes caps negotiation when sink template caps of an element inheriting
GstVideoAggregator have features different from the implicit
"memory:SystemMemory".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7198>
2024-07-18 16:14:34 +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
c5f8587e8d avauddec: Fix crash on stop()
GstFFMpegAudDec.context can be nullptr if decoder got closed
without opening new context. Note that we don't need to clear
AVCodecContext.extradata there since avcodec_free_context()
will do clear the data if needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7184>
2024-07-16 18:07:59 +02: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
Seungha Yang
e6c19a7922 d3d11converter: Fix runtime compiled shader code
Restore mistakenly deleted code in a previous MR
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6803

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7138>
2024-07-09 09:54:43 +00:00
Sebastian Dröge
b19a687437 typefind: Add typefinders for formats that were previously available via ffmpeg
Co-Authored-By: Matthew Waters <matthew@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7148>
2024-07-08 16:25:32 +00:00
Sebastian Dröge
4f0fc8a42c avvidenc: Make sure to pass always increasing PTS to the encoder
All MPEG1/2/4-based encoders at least are ignoring input frames if
backwards PTS or PTS that are equal to the previous one are passed in.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7148>
2024-07-08 16:25:32 +00:00
Sebastian Dröge
963e15f920 avviddec: Only use 2 ticks per frame if decoding interlaced video
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7148>
2024-07-08 16:25:32 +00:00
Sebastian Dröge
20485320e5 avvidenc: Set the DTS to 0 if it is negative, not the PTS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7148>
2024-07-08 16:25:32 +00:00
Sebastian Dröge
fa49369c46 avvidenc: Only use 2 ticks per frame if encoding interlaced video
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3518

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7148>
2024-07-08 16:25:32 +00:00
Sebastian Dröge
fcbb1fa5f1 avmux: Reset input context to NULL after closing in the muxer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7148>
2024-07-08 16:25:32 +00:00
Sebastian Dröge
d3935f0974 avdemux: Fix leak of demuxer input context in error cases
Also simplify context lifetime management a bit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7148>
2024-07-08 16:25:32 +00:00
Sebastian Dröge
d871f34b39 libav: Update AVCodecContext lifetime to work properly with ffmpeg 7
avcodec_close() is deprecated and it's not supported anymore to re-open
a codec, so we only ever allocate the codec in set_format() now and
always free it after usage.

As part of this, also fix various memory leaks in related code paths.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7148>
2024-07-08 16:25:32 +00:00
Edward Hervey
bbf21060c2 avviddec: Rename variables and fuse function
* gst_ffmpegviddec_frame() is the only caller of gst_ffmpegviddec_video_frame()
  and has the same signature. Just move the checks into a single function and
  use that.
* Make it clear which frames are the input and output ones in
  gst_ffmpegviddec_video_frame() to make issues like the one fixed in the previous
  commit more obvious.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7148>
2024-07-08 16:25:32 +00:00
Sebastian Dröge
2cdaa79da6 libav: Fix signature of avprotocol write function for ffmpeg 7
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7148>
2024-07-08 16:25:31 +00:00
Sebastian Dröge
bd7b5b166d avdemux: Remove typefinder implementation
Direct access to AVInputFormat::read_probe() is not possible anymore
with ffmpeg 7.0, and the usefulness of this typefinder seems limited
anyway. An alternative implementation around av_probe_input_format3() or
similar would be possible but it would be going over all possible ffmpeg
probes at once.

Having a typefinder here means that basically every application will
load the gst-libav plugin when typefinding is necessary, which has
unnecessary performance impacts. If a typefinder from here was indeed
missing from typefindfunctions in gst-plugins-base then it would be
better to add it there directly.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7148>
2024-07-08 16:25:31 +00:00
Ruben Gonzalez
c5b4ad429d vkh265dec: Fix H.264 ref in logs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7147>
2024-07-08 17:34:07 +02:00
Nirbheek Chauhan
a9fec8f638 meson: Fix invalid include flag in uninstalled gl pc file
${libdir}/gstreamer-1.0/include is only valid after installation, but
extra_cflags are added unconditionally, so we can't use that for
include flags.

Instead, let's add the include flag via variables, which are different
for installed and uninstalled pc files.

This is particularly bad for consuming GStreamer via CMake which barfs
on non-existent include paths.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7143>
2024-07-05 18:43:27 +01:00
Taruntej Kanakamalla
0ae0efb623 lc3: remove bitstream comparison in the tests
since the encoded output is changing based on version
it does not make sense to check the output bitstream with a fixed
bytearray since the version in the target might vary. So sticking
to checking the number of output buffers and encoded frame size
similar to the other tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7142>
2024-07-05 17:14:46 +01:00
Tim-Philipp Müller
0dfdbf49da subprojects: update liblc3 wrap to 1.1.1
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6407#note_2472538

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7135>
2024-07-04 11:22:59 +01:00
Tim-Philipp Müller
764543d3a5 info: remove unused valgrind header include
Follow-up to commit a2cbf75523.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7129>
2024-07-03 12:22:18 +01:00
Tim-Philipp Müller
24de7cf1fe subparse: remove regex optimized flag explicitly
That way the other flags in jit_flags are not touched and
flags changes in future only need to be done in one place.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7129>
2024-07-03 12:22:18 +01:00
Tim-Philipp Müller
051b8b6dbb gst-plugins-base: put valgrind header availability define into config.h for subparse
Make the valgrind header avaibility accessible to any code in
gst-plugins-base, currently it was only signalled to unit tests.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7129>
2024-07-03 12:22:18 +01:00
Chris Spoelstra
63196c2ae7 srtsrc: fix case fallthrough of authentication param
Add missing breaks to two case statements.
Also adds a missing lock of srtobject->element when getting the value
of PROP_AUTHENTICATION.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7127>
2024-07-02 17:07:24 +01:00
Edward Hervey
bad0daeb8f subparse: Don't use jitted regex when used with valgrind
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7124>
2024-07-02 11:04:01 +00:00
Edward Hervey
869b122e6b gstreamer/gst-tester: Don't leak thread
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7123>
2024-07-02 10:10:45 +01:00
Edward Hervey
a8cf222cd0 gst-inspect: Fix leak of plugin/feature
Reordering changes the initial list head

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7123>
2024-07-02 10:10:45 +01:00
Edward Hervey
00903e36cb encoding-target: Chain up to parent class
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7123>
2024-07-02 10:10:45 +01:00
Edward Hervey
02607432e3 encoding-profile: Chain up to parent class finalize
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7123>
2024-07-02 10:10:45 +01:00
Shengqi Yu
c4fe9786ea v4l2object: use v4l2 reported width for padded_width when complex video formats
Stride means bytes per line, and padded_width means pixels. Here,
padded_width shoule be pix width reported by v4l2 instead of stride.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7122>
2024-07-01 20:44:02 +01:00
Edward Hervey
8435fb4805 nlecomposition: Don't leak atomic rc box
* gst_structure_get => increases ref
* query_ancestors_position: There are two refs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7120>
2024-07-01 14:31:23 +01:00
Edward Hervey
ef53d8c7b7 nlecomposition: Don't leak message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7120>
2024-07-01 14:31:23 +01:00
Edward Hervey
2d38c289f6 ges-layer: Don't use invalid layers
There's a possibility that there are no layers at that priority

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7120>
2024-07-01 14:31:23 +01:00
Edward Hervey
1af999696e ges-discoverer-manager: Properly initialize/free GRecMutex
Fixes small leak of mutex internals

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7120>
2024-07-01 14:31:23 +01:00
Jordan Petridis
7057d7ce22 validate: Remove G_REGEX_OPTIMIZE usage
It's not needed and causes issues with valgrind (which doesn't support jit)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7113>
2024-06-28 17:31:14 +01:00
Guillaume Desmottes
83d736d6d9 rtmp2: guard against calling gst_amf_node_get_type() with NULL
gst_amf_node_get_type() raises a CRITICAL if called with a NULL node.
All callers were checking for this except those.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7110>
2024-06-28 10:25:37 +01:00
Jan Schmidt
5a25a00324 adaptivedemux: Fix handling closed caption streams
Fix a typo "CLOSED_CAPTION" -> "CLOSED-CAPTION" and
a broken if statement that always bailed out for
closed captions

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7105>
2024-06-26 15:58:20 +00:00
Jan Schmidt
48e2fb95e6 webrtcdsp: Enable multi_channel processing
Enable multi_channel processing in webrtc-audio-processing when the
input or output has multiple channels.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3220
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7104>
2024-06-26 16:13:04 +01:00
Piotr Brzeziński
67eae3cf31 vtenc: Fix redistribute latency spam
Just a quick fix to only report the maximum noticed delay (measured by frames inside the encoder) instead of changing
the reported latency every time the number there changes, which is way too often.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7098>
2024-06-25 09:49:56 +01:00
Seungha Yang
a593f2f71f d3d12converter: Make gamma remap work as intended
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7080>
2024-06-21 10:53:25 +01:00