Commit graph

1186 commits

Author SHA1 Message Date
Diego Nieto 453a6f1800 rtsp-server: Remove unused define in backchannel test
The caps match with the ones used in test-onvif-backchannel,
but they are actually not used here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6885>
2024-05-21 13:25:44 +02:00
Jan Schmidt 64133b40a7 rtpmp4gdepay: Set duration on outgoing buffers
If we have constant duration buffers, set the duration on
outgoing buffers, like rtpmp4adepay does. This fixes
problems with (for example) muxers like mp4mux not writing
the duration of the final sample into the index.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6878>
2024-05-20 15:24:32 +00:00
Guillaume Desmottes 210487b50a wavparse: reset when receiving STREAM_START
We need to reset the internal state to be able to parse a new stream.
When doing so keep seek event and do not destroy the adapter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6840>
2024-05-16 11:35:02 +00:00
Sebastian Dröge 8ea355e52c audioringbuffer: Avoid overflows of segment done counter
This counter is incremented once for every segment, meaning it would
e.g. overflow after 24 days when using 1ms segments. Once that happens,
completely wrong positions are reported and invalid memory is handed out
for writing/reading the next segments.

As the affected variables are unfortunately part of the public API of
the struct, a second set of variables is added together with accessor
functions and both variables are kept in sync for backwards
compatibility.

All existing users of the two variables are moved to the new ones but
external code might still run into the overflow.

This also slightly breaks API as external code updating the variables
will have no effect anymore but the only known user of this is
pulsesink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6740>
2024-05-16 06:52:58 +00:00
Sebastian Dröge a4514c5458 level: Don't post a message on EOS without a valid audio info
If EOS is received before caps, e.g. because of an error, then rate and
number of channels would be 0 and some divisions by zero would happen.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6819>
2024-05-12 07:06:32 +00:00
Sebastian Dröge 0ef396359c gst: Move GstQueueArray as GstVecDeque to core
And change lengths and indices from guint to gsize for a more correct type.

Also deprecate GstQueueArray and implement it in terms of GstVecDeque.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6779>
2024-05-06 18:25:42 +00:00
Sebastian Dröge efba52fcba qtdemux: Use G_GUINT64_CONSTANT when creating test caps
Otherwise this fails on 32 bit platforms.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6804>
2024-05-06 06:18:35 +00:00
Seungha Yang c8d01d7d1a video: Add Y216 and Y416 formats
The same memory layout as Y212 and Y412 formats, respectively

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6745>
2024-05-03 17:02:34 +00:00
Tim-Philipp Müller eec64e372b rtph264depay: fix FU-B handling
Skip extra 16-bit DON in FU-B header.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/806

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6607>
2024-04-29 12:21:52 +00:00
Tim-Philipp Müller b1a45b527a rtph264depay: minor refactoring of FU handling code
Make code easier to follow, and prepare for next commit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6607>
2024-04-29 12:21:52 +00:00
William Wedler 9ad6a9b942 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/6711>
2024-04-29 02:57:06 +00:00
William Wedler c02af39026 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/6711>
2024-04-29 02:57:06 +00:00
Tim Blechmann ff7b41ac86 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/6736>
2024-04-26 09:45:49 +08:00
Edward Hervey 4e5a54612e 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/6690>
2024-04-23 07:09:21 +00:00
Edward Hervey 6b43e4e19f 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/6690>
2024-04-23 07:09:21 +00:00
Philipp Zabel 46a41667a3 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/6552>
2024-04-18 16:42:43 +00:00
Qian Hu (胡骞) 8d003f00e9 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/6617>
2024-04-16 09:03:47 +00:00
Hou Qi 105d232fde 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/6579>
2024-04-15 18:07:17 +00:00
Philipp Zabel e1f5bacf8d 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/6572>
2024-04-15 17:11:00 +00:00
Philippe Normand 111cc8d796 vpxdec: Include vpx error details in errors and warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6626>
2024-04-13 10:57:43 +01:00
Philippe Normand bd83046193 vp9enc: Include vpx error details in errors and warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6626>
2024-04-13 10:56:29 +01:00
Philippe Normand 73ce4fd770 vpxenc: Rename GST_VPX_WARN to GST_VPX_ENC_WARN
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6626>
2024-04-13 10:55:55 +01:00
Qian Hu (胡骞) cd95d02032 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/6616>
2024-04-12 16:59:33 +08:00
William Wedler 942415dce0 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/6609>
2024-04-11 14:21:04 +00:00
Jochen Henneberg 687b3a2027 qt6: Let plugin documentation show up
* Added qml6 to plugin cache
* Added 'since' markers
* Moved plugin to plugins-good where it really is
* Fixed section comments

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6603>
2024-04-11 12:38:59 +00:00
Jochen Henneberg 8b87d7bcf7 qt: Let plugin documentation show up
* Enabled cc file parsing from hotdoc
* Moved package to plugins-good where it really is
* Fixed section comments

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6603>
2024-04-11 12:38:59 +00:00
Jochen Henneberg fee46dee28 qt6: Added support for NV12 input format to qml6glsink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6582>
2024-04-10 13:45:26 +02:00
Jochen Henneberg 7065d540ee qt: Added support for NV12 input format to qmlglsink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6582>
2024-04-10 13:45:26 +02:00
Jimmy Ohn a6c8c6f866 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/6558>
2024-04-10 08:43:56 +00:00
Arun Raghavan 82b10e57b0 pulsesink: Re-enable emission of stream status messages
This was disabled almost 10 years ago because we were missing libpulse API to
avoid a deadlock. That was fixed quite a long time ago, so let's enable this
again. The defer counter becomes an atomic, as we no longer have a threaded
mainloop lock protecting it.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3444
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6500>
2024-04-09 15:50:04 +00:00
Philippe Normand 8d3e7689e1 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/6573>
2024-04-09 14:40:21 +00:00
Jochen Henneberg 6e33a5da14 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/6578>
2024-04-08 20:05:10 +02:00
Jochen Henneberg 87dc22b053 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/6578>
2024-04-08 20:05:09 +02:00
Sebastian Dröge 0596871b98 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/6536>
2024-04-08 10:29:54 +00:00
Sebastian Dröge 11ce209ea0 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/6536>
2024-04-08 10:29:54 +00:00
Sebastian Dröge 0c34c85f7a 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/6536>
2024-04-08 10:29:54 +00:00
Sebastian Dröge 4a4eb56fc2 rtspsrc: Optionally timestamp RTP packets with their receive times in TCP/HTTP mode
Until https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6509
this was accidentally done inside rtpjitterbuffer for many years, and
doing so potentially solves problems on some streams while introducing
problems on others.

Make this configurable on rtspsrc and default to not set timestamps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6529>
2024-04-08 08:34:38 +00:00
Jan Schmidt 832a517965 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/6509>
2024-04-07 12:24:58 +00:00
Sebastian Dröge ee566b8960 flac: Add wrap file and add fallback for it to the flac plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6553>
2024-04-07 11:12:51 +00:00
Tim Blechmann 1c9fe19b23 v4l2: enforce a pixel aspect ratio of 1/1 if no data are available
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6242>
2024-04-07 10:14:18 +00:00
Philipp Zabel 6f9872cb56 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/6551>
2024-04-06 11:44:27 +00:00
Elliot Chen e4ee4ca716 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/6480>
2024-04-05 13:28:47 +00:00
Elizabeth Figura c308f013a7 atdec: Handle channel counts greater than 2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6157>
2024-04-05 06:54:24 +00:00
Elizabeth Figura 277d6ddf22 atdec: Use gst_audio_decoder_set_output_caps() directly
The code currently sets the same caps in two different ways, and neither of them correctly handle the channel mask.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6157>
2024-04-05 06:54:24 +00:00
Sebastian Dröge 16f69acf30 wavpackparse: Use an unsigned integer for the block size calculations
It's never negative.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6498>
2024-04-04 15:10:02 +00:00
Sebastian Dröge eefb7c1638 wavpackparse: Fix potential integer overflow on ID_ODD_SIZE blocks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6498>
2024-04-04 15:10:02 +00:00
Sebastian Dröge 6402978a48 wavpackparse: Explicitly handle ID_WVX_NEW_BITSTREAM
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6498>
2024-04-04 15:10:02 +00:00
Robert Guziolowski 52638c1b22 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/6467>
2024-04-02 11:55:16 +11:00
Tim-Philipp Müller ef5b8dc96a 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/6474>
2024-03-28 19:51:47 +00:00
Haihua Hu 37e3a38ba9 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/6451>
2024-03-28 12:53:01 +00:00