Commit graph

1171 commits

Author SHA1 Message Date
Tim-Philipp Müller
204ba57e81 Back to development after 1.24.3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6772>
2024-04-30 00:36:59 +01:00
Tim-Philipp Müller
da69285863 Release 1.24.3 2024-04-30 00:15:23 +01:00
William Wedler
782f0c885b fix: qmlglsink: video content resizes to new item size
Mark geometry dirty when the item rectangle changes in the
QtGLVideoItem::updatePaintNode method. This allows changes in the bounding
rectangle to be applied to the scene graph geometry node.

Fixes #3493

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6759>
2024-04-29 16:36:16 +00:00
William Wedler
57446d1252 fix: qml6glsink: video content resizes to new item size
Mark geometry dirty when the item rectangle changes in the
QtGLVideoItem::updatePaintNode method. This allows changes in the bounding
rectangle to be applied to the scene graph geometry node.

Fixes #3493

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6759>
2024-04-29 16:36:16 +00:00
Tim Blechmann
d829ff510c v4l2: silence valgrind warning
Valgrind complains about uninitialized memory used in an ioctl

    Syscall param ioctl(VKI_V4L2_G_TUNER).reserved points to uninitialised byte(s)
       at 0x719294F: ioctl (ioctl.c:36)
       by 0x3126A817: gst_v4l2_fill_lists (v4l2_calls.c:185)
       by 0x3126A817: gst_v4l2_open (v4l2_calls.c:589)
       by 0x3123F1C2: gst_v4l2_device_provider_probe_device (gstv4l2deviceprovider.c:122)
       by 0x3123F648: gst_v4l2_device_provider_device_from_udev (gstv4l2deviceprovider.c:301)
       by 0x3123F998: provider_thread (gstv4l2deviceprovider.c:395)
       by 0x796FA50: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4)
       by 0x710CAC2: start_thread (pthread_create.c:442)
       by 0x719DA03: clone (clone.S:100)
     Address 0x44008a34 is on thread 11's stack
     in frame #1, created by gst_v4l2_open (v4l2_calls.c:524)
     Uninitialised value was created by a stack allocation
       at 0x3126A024: gst_v4l2_open (v4l2_calls.c:524)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6761>
2024-04-29 15:35:34 +01:00
Tim Blechmann
aa982bfa15 soup: fix thread name
thread names should be below 16char, otherwise they won't be shown on
linux.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6739>
2024-04-26 12:36:55 +01:00
Edward Hervey
e534f681b4 adaptivedemux2: Answer GST_QUERY_CAPS
If we have a generic caps, we can answer the query.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6716>
2024-04-23 11:17:32 +01:00
Edward Hervey
19e613d889 adaptivedemux2: Refactor output slot creation
Set as much information as possible on the slot (including the associated
track) *before* the associated source pad is added to the element.

We need this so that incoming event/queries can be replied to if they are
received when adding the pad

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6716>
2024-04-23 11:17:32 +01:00
Philipp Zabel
23c5ff8032 v4l2bufferpool: Ensure freshly created buffers are not marked as queued
Otherwise, if we run in to the copy case, this can cause these
groups to stay around with queued flag set, but never actually
queued, until gst_v4l2_allocator_flush() is called, which then
erroneously frees the associated memories, causing the release
function to decrement the allocator refcount where it was never
incremented, resulting in early allocator disposal, and either
deadlock or use after free.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6685>
2024-04-18 18:47:10 +01:00
Qian Hu (胡骞)
1a699e85e4 v4l2: add multiplane y42b(yuv422m)
for some jpg file, mediatek v4l2 jpeg decoder
hardware produce multi plane YUV 4:2:2 data

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6657>
2024-04-16 14:34:18 +00:00
Hou Qi
5ba2563820 v4l2bufferpool: queue back the buffer flagged LAST but empty
Some decoder drivers need to wait enough capture buffers before
starting to decode. But the dequeued buffer flag LAST but empty
has no chance to queue back to driver, which makes decode hang
after seek. So need to queue back such kind of buffer to driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6649>
2024-04-16 10:50:16 +00:00
Philipp Zabel
7ae6c203cb v4l2: bufferpool: Drop writable check on output pool process
Output buffers don't have to be writable. Accepting read-only buffers
from the V4L2 buffer pool allows upstream elements to write directly
into the V4L2 buffers without triggering a CPU copy into a new buffer
from the same V4L2 buffer pool every time.

Tested with the vivid output device:

  GST_DEBUG=GST_PERFORMANCE:7 gst-launch-1.0 videotestsrc ! v4l2sink device=/dev/video5

With this change, gst_v4l2_buffer_pool_dqbuf() must be allowed to not
resize read-only memories of output buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6648>
2024-04-16 08:15:16 +00:00
Philippe Normand
e87ecf448b vpxdec: Include vpx error details in errors and warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6636>
2024-04-16 02:44:01 +00:00
Philippe Normand
ce16646190 vp9enc: Include vpx error details in errors and warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6636>
2024-04-16 02:44:01 +00:00
Philippe Normand
45fdf4b69b vpxenc: Rename GST_VPX_WARN to GST_VPX_ENC_WARN
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6636>
2024-04-16 02:44:01 +00:00
Qian Hu (胡骞)
01b00643af qtdemux: fix wrong full_range offset when parsing colr box
use colr_data[18] >> 7 to get full range information, instead
of colr_data[17] >> 7

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6634>
2024-04-16 01:22:56 +00:00
William Wedler
9fe8fd41ba fix: qml6glsink: Notify that the returned QSGNode node has changes
Sets the QSGNode::DirtyMaterial bit when a new buffer is used for the material's texture

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3469
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6633>
2024-04-16 00:09:19 +00:00
Jimmy Ohn
61d7336bf3 pulsedeviceprovider: Add is_default_device_name function and missing lock
Add is_default_device_name function to simplify compare device type
name and fix the missing lock when accessing default_sink_name and
default_source_name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6599>
2024-04-10 13:27:11 +01:00
Tim-Philipp Müller
934af761fd Back to development after 1.24.2 2024-04-10 00:15:42 +01:00
Tim-Philipp Müller
2d82731515 Release 1.24.2 2024-04-09 21:48:55 +01:00
Philippe Normand
7ce569359f vpxenc: Include vpx error details in errors and warnings
The vpx_codec_t err_detail string usually provides additional context about the
error, so include it in GStreamer warnings and errors, when it's not NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6584>
2024-04-09 17:34:44 +01:00
Jochen Henneberg
2aff9380c7 qt6: Fixes for dummy texture
* RED_OR_ALPHA8 will map value to alpha for OpenGL, use R8 to avoid
  2nd shader
* Determine texel size for proper texture memory preparation
* QByteArray::fromRawData() does shallow copy and thus leads to use of
  corrupted memory
* Make sure RGBA dummy texture is fully opaque
* QRhiTexture::create() must be called to allocate texture resources

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6581>
2024-04-09 13:51:27 +01:00
Jochen Henneberg
a0e870263e qt: Fixup for dummy textures
* Initialize dummy texture Ids
* Ensure YUV->RGB matrix set for dummy textures

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6581>
2024-04-09 13:51:27 +01:00
Sebastian Dröge
17db91c7c1 rtpbin: Don't re-use a variable for a completely different purpose temporarily
During RTP-Info synchronization, clock_base was temporarily switched
from the actual clock-base to the base RTP time and then back some lines
later.

Instead directly work with the base RTP time. The comment about using a
signed variable for convenience doesn't make any sense because all
calculations done with the value are unsigned.

Similarly, rtp_clock_base was overridden with the rtp_delta when
calculating it, which was fine because it is not used anymore
afterwards. Instead, introduce a new variable `rtp_delta` to make this
calculation clearer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6575>
2024-04-08 13:22:24 +00:00
Sebastian Dröge
72c6cac8db rtpbin: Convert clock-base to extended RTP timestamp correctly
It's not in the same period as the current RTP base time but always in
the very first period. This avoids using it again at a much later time.

The code in question is only triggered with rtcp-sync=rtp-info.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6575>
2024-04-08 13:22:24 +00:00
Sebastian Dröge
bba6f097b1 rtpjitterbuffer: Use an extended RTP timestamp for the clock-base
It is compared to other extended RTP timestamps all over rtpjitterbuffer
and since 4df3da3bab the initial extended RTP timestamp is not equal
anymore to the plain RTP time.

Continue passing a non-extended RTP timestamp via the `sync` signal for
backwards compatibility. It will always be a timestamp inside the first
extended timestamp period anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6575>
2024-04-08 13:22:24 +00:00
Sebastian Dröge
38ec8f1299 rtphdrext-ntp: Fix typo of the RFC number in the element metadata
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3417

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6537>
2024-04-08 12:21:35 +00:00
Robert Guziolowski
50bd2f2109 qml6glsink: fix destruction of underlying texture
One should not directly delete the QRhiTexture instance.
Instead it should be marked as to be deleted once QRhi::endFrame()
is called (see: https://doc.qt.io/qt-6/qrhiresource.html#deleteLater )

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3443
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6506>
2024-04-08 10:45:26 +00:00
Jan Schmidt
b3d6a14737 rtpjitterbuffer: Don't use estimated_dts to do default skew adjustment
When the buffer DTS is estimated based on arrival time at the
jitterbuffer (rather than provided on the incoming buffer itself),
it shouldn't be used for skew adjustment. The typical case is
packets being deinterleaved from a tunnelled TCP/HTTP RTSP stream,
and the arrival times at the jitter buffer are not well enough
correlated to usefully do skew adjustments.

This restores the original intended behaviour for the 'estimated dts'
path, that was broken years ago during other jitterbuffer refactoring.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6561>
2024-04-07 16:24:22 +01:00
Sebastian Dröge
4b6cbca300 flac: Add wrap file and add fallback for it to the flac plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6560>
2024-04-07 13:57:40 +00:00
Tim Blechmann
88dd91cb30 v4l2: enforce a pixel aspect ratio of 1/1 if no data are available
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6559>
2024-04-07 14:17:19 +01:00
Philipp Zabel
993d8b89bc v4l2: allocator: Fix unref log/trace on memory release
Use gst_object_unref() instead of g_object_unref() in
gst_v4l2_allocator_release(), so refcounting log and
tracer get to know about this unref.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6556>
2024-04-06 23:41:52 +00:00
Elliot Chen
7aa75e590a v4l2: fix error in calculating padding bottom for tile format
This is a regression while porting to arbitrary tile dimensions
introduced in !3424.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6554>
2024-04-06 19:10:25 +01:00
Sebastian Dröge
984b1f413a wavpackparse: Use an unsigned integer for the block size calculations
It's never negative.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6541>
2024-04-04 17:33:48 +01:00
Sebastian Dröge
078ef786d2 wavpackparse: Fix potential integer overflow on ID_ODD_SIZE blocks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6541>
2024-04-04 17:33:48 +01:00
Sebastian Dröge
99bdbd78ca wavpackparse: Explicitly handle ID_WVX_NEW_BITSTREAM
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6541>
2024-04-04 17:33:48 +01:00
Tim-Philipp Müller
d2aeaeb73f tests: rtpred: fix out-of-bound writes
Don't write more data to the buffer than we allocated
space for.

Fixes #3312

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6478>
2024-03-29 00:22:16 +00:00
Haihua Hu
bb43b96d2c v4l2src: need maintain the caps order in caps compare when fixate
if the calculated "distance" of caps A and B from the preference are
equal, need to keep the original order instead of swap them

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6473>
2024-03-28 20:05:27 +00:00
Jan Schmidt
2980981618 rtpmp4adepay: Set duration on outgoing buffers
If we can calculate timestamps for buffers, then set the duration
on outgoing buffers based on the number of samples depayloaded.

This can fix the muxing to mp4, where otherwise the last packet
in a muxed file will have 0 duration in the mp4 file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6456>
2024-03-27 19:48:43 +00:00
Hou Qi
c0d35575a8 v4l2: Also set max_width/max_height if enum framesize fail
Some driver doesn't implement enum_framesize. The maximum supported
size can be got by trying format with a very large size. Also need
to set max_width/max_height for this case, otherwise default encoded
buffer size 256kB is too small.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6430>
2024-03-22 17:27:58 +00:00
Tim-Philipp Müller
175d116f94 Back to development 2024-03-22 01:38:06 +01:00
Tim-Philipp Müller
0d0a1d9d16 Release 1.24.1 2024-03-21 21:47:53 +01:00
Edward Hervey
db6803bd55 adaptivedemux2: Don't use g_str_equal on potentially NULL strings
It is only meant to be used as a callback. The fallback macro uses strcmp which
doesn't handle NULL strings gracefully. Instead use g_strcmp0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6410>
2024-03-20 10:49:02 +01:00
Edward Hervey
77fa0ae0e7 hlsdemux2: Avoid NULL pointer usage
The pending/current variant are both NULL when the demuxer is resetted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6410>
2024-03-20 10:49:02 +01:00
Edward Hervey
9ce063f5f6 adaptivedemux2: Handle context going away
This issue can happen when the scheduler loop was stopped (and context went
away). We no longer want to push/pop main context threads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6410>
2024-03-20 10:49:02 +01:00
Edward Hervey
257de579b3 hlsdemux2: Improve detection of playlist updates
In the case we are not updating an existing playlist, we only want to reset the
download error count if the URI we are downloading was not the previous one we
were trying to load

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6410>
2024-03-20 10:49:02 +01:00
Alexander Slobodeniuk
6e57362f35 rtspsrc: remove 'deprecated' flag from the 'push-backchannel-sample' signal
It seems that it was added by accident when copying from push-backchannel-buffer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6363>
2024-03-13 21:14:27 +00:00
Sebastian Dröge
5a2f99a255 mpg123audiodec: Correctly handle the case of clipping all decoded samples
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3365

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6357>
2024-03-13 14:23:56 +00:00
Piotr Brzeziński
6b369d8470 qtdemux: Fix wrapping temporary memory in buffers
That memory can disappear at any moment, doesn't cost much to just copy those few bytes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6339>
2024-03-13 12:36:28 +00:00
Nirbheek Chauhan
bcb016d6d2 rtspsrc: Don't invoke close when stopping if we've started cleanup
When we're doing a state change from PLAYING to NULL, first we invoke
gst_rtspsrc_loop_send_cmd_and_wait (..., CMD_CLOSE, ...) during
PAUSED_TO_READY which will schedule a TEARDOWN to happen async on the
task thread.

The task thread will call gst_rtspsrc_close(), which will send the
TEARDOWN and once it's complete, it will call gst_rtspsrc_cleanup()
without taking any locks, which frees src->streams.

At the same time however, the state change in the app thread will
progress further and in READY_TO_NULL it will call gst_rtspsrc_stop()
which calls gst_rtspsrc_close() a second time, which accesses
src->streams (without a lock again), which leads to simultaneous
access of src->streams, and a segfault.

So the state change and the cleanup are racing, but they almost always
complete sequentially. Either the cleanup sets src->streams to NULL or
_stop() completes first. Very rarely, _stop() can start while
src->streams is being freed in a for loop. That causes the segfault.

This is unlocked access is unfixable with more locking, it just leads
to deadlocks. This pattern has been observed in rtspsrc a lot: state
changes and cleanup in the element are unfixably racy, and that
foundational issue is being addressed separately via a rewrite.

The bandage fix here is to prevent gst_rtspsrc_stop() from accessing
src->streams after it has already been freed by setting src->state to
INVALID.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6330>
2024-03-11 18:32:12 +00:00