Commit graph

19193 commits

Author SHA1 Message Date
Havard Graff
1368b4214b rtpjitterbuffer: clean up and improve missing packets handling
* Try to make variable and function names more clear.
* Add plenty of comments describing the logic step-by-step.
* Improve the logging around this, making the logs easier to read and
  understand when debugging these issues.

* Revise the logic of packets that are actually beyond saving in doing
  the following:
1. Do an optimistic estimation of which packets can still arrive.
2. Based on this, find which packets (and duration) are now hopelessly
   lost.
3. Issue an immediate lost-event for the hopelessly lost and then add
   lost/rtx timers for the ones we still hope to save, meaning that if
   they are to arrive, they will not be discarded.

* Revise the use of rtx-delay:
  Earlier the rtx-delay would vary, depending on the pts of the latest
  packet and the estimated pts of the packet it being issued a RTX for,
  but now that we aim to estimate the PTS of the missing packet accurately,
  the RTX delay should remain the same for all packets.
  Meaning: If the packet have a PTS of X, the delay in asked for a RTX
  for this packet is always a constant X + delay, not a variable one.

* Finally ensure that the chaotic "check-for-stall" tests uses timestamps
  that starts from 0 to make them easier to debug.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/952>
2021-04-24 13:53:58 +00:00
Guillaume Desmottes
309269a93b level: make properties thread-safe
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/962>
2021-04-23 15:14:44 +02:00
Guillaume Desmottes
f61bd6239a level: disable passthrough when audio-level-meta is enabled
Ensure we receive a writable buffer to add the meta.

Fix #878

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/962>
2021-04-23 11:41:36 +02:00
Sebastian Dröge
c0d68d03a6 matroskamux: Don't pass a non-GObject pointer to GST_DEBUG_OBJECT and similar
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/964>
2021-04-23 08:28:06 +03:00
Edward Hervey
4d3b8d1129 rtpjitterbuffer: Avoid generation of invalid timestamps
When updating timestamps and timer timeouts with a new offset, make sure that
the resulting value is valid (and not a negative (signed) value which ends up in
a massive (unsigned) value).

Fixes #571

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/960>
2021-04-22 15:23:13 +02:00
Philippe Normand
a2c16ec632 v4l2: Fix glib warning emitted when attribute query fails
The v4l2object is not a GstObject. Logging has to go through its dbg_obj
specially meant for this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/959>
2021-04-21 18:48:38 +01:00
VaL Doroshchuk
36b794f9ff qmloverlay: Use first found GstGLVideoItem as widget property
GstGLVideoItem is required to render input video in the overlay's qml.
And currently qmlgloverlay requires to set this GstGLVideoItem to its widget property.

Instead of fetching GstGLVideoItem from the overlay's root object (root-item prop),
and setting it back as a widget (widget prop),
proposing to use found GstGLVideoItem in the current object hierarchy (passed in qml-scene) by default.

Also useful in Python, which solves the issue when casting gpointer <=> QQuickItem* is required.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/919>
2021-04-21 08:26:52 +00:00
Tim-Philipp Müller
c70b41b22b v4l2: fix debug category initialisation again
Would spew warnings on the rpi4 when calling into
gst_v4l2_object_get_codec_caps() from the probe_and_register()
function since the v4l2_debug category initialisation would
only be done later as part of the element/device provider
registration.

Also log things in the probe function to the v4l2 category
instead of the default category while we're at it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/956>
2021-04-20 06:35:01 +00:00
Doug Nazar
b705fb93be rtspsrc: Fix race saving seek event seqnum.
We need to save the seek seqnum before the flush stop event
since that will start the basesrc task which may send the segment
event before we're ready.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/954>
2021-04-20 06:03:22 +00:00
Marco Felsch
8e8dab7a4d qmlglsink: allow to set force-aspect-ratio property
Add the forceAspectRatio Q_PROPERTY to allow changing the aspect ratio
from QML code as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/937>
2021-04-19 17:46:41 +00:00
Tim-Philipp Müller
63c1e2ed60 v4l2src: fix spurious SOURCE_CHANGED error-level log messages
They're harmless, and some drivers at least return EINVAL
instead of ENOTTY for unsupported events (here: uvcvideo).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/955>
2021-04-19 11:29:44 +01:00
Doug Nazar
61d4dd0b9b rtpsbcpay: remove use of packed struct for payload
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/950>
2021-04-15 07:29:09 -04:00
Doug Nazar
850a6f5f6f dtmf: convert to bit accessors
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/949>
2021-04-14 11:13:45 -04:00
Nirbheek Chauhan
c071cbbe30 rtspsrc: Remove some dead code
stop is not used after this point, nor do we create a new segment
here since 84725d62b5

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/940>
2021-04-13 14:30:54 +00:00
Nirbheek Chauhan
fb97ca9458 rtspsrc: Do not overwrite the known duration after a seek
This breaks the duration query and also the seeking query.

Broke in 5f1a732bc7

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/940>
2021-04-13 14:30:54 +00:00
Nirbheek Chauhan
99ee5fb2d9 rtspsrc: Just assign the segment instead of memcpy
Assignments copy by value, we don't need to memcpy...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/940>
2021-04-13 14:30:54 +00:00
Sebastian Dröge
52ead086d9 rtpjitterbuffer: Check srcresult before waiting on the condition variable too
It might've been set to FLUSHING between the last check and the waiting,
and in that case we'd be waiting here forever now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/944>
2021-04-13 12:30:49 +00:00
Doug Nazar
b289cc6788 rtp: fix test_twcc_header_and_run to support big endian.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/942>
2021-04-13 11:35:15 +00:00
Doug Nazar
b5deff7b64 rtp: fix rtptwcc to support big endian.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/942>
2021-04-13 11:35:15 +00:00
Doug Nazar
7918f80a43 rtp: fix rtphdrextrfc6464 to support big endian.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/942>
2021-04-13 11:35:15 +00:00
Doug Nazar
f5f94695f2 tests: Fix alpha test on big endian machines.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/943>
2021-04-13 08:20:45 +00:00
Jan Schmidt
fae29cb3c2 qtmux: Protect against writing absurd sample durations
If the input DTS goes backward or is missing, the calculated
sample duration goes negative and wraps around to a very big
number. In that case, just write a sample with a duration of
0 and hope the problem is transient.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/914>
2021-04-13 00:18:36 +10:00
Nirbheek Chauhan
590fbb4ddd rtspsrc: De-dup seek event seqnums to avoid multiple seeks
Seek events are sent upstream on each sink, so if we receive multiple
seeks with the same seqnum, we must only perform one seek, not N seeks
where N = the number of sinks in the pipeline connected to rtspsrc.

This is the same thing done by demuxers like qtdemux or matrsokademux.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/938>
2021-04-12 03:32:08 +00:00
Nirbheek Chauhan
57e4eab72d rtspsrc: Using multicast UDP has no relation to seekability
The transport has no relation to whether a media can be seeked. The
range response having a duration is the correct thing to check for.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/939>
2021-04-12 02:56:44 +00:00
Nirbheek Chauhan
b1dcbf393b rtspsrc: Add more logging for range parsing and seekable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/939>
2021-04-12 02:56:44 +00:00
Sebastian Dröge
af5abe43d0 videocrop: Update documentation cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/515>
2021-04-10 14:48:02 +03:00
Markus Ebner
7276b0f9d1 videocrop: Add support for GBR* video formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/515>
2021-04-10 11:26:59 +00:00
Markus Ebner
e31cbce4d5 videocrop: Added support for planar pixel formats > 8bits
- Added support for planar pixel formats with depths greater than 8bits
  to transform_planar implementation
- Added a whole lot of new pixel formats to the support-list

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/515>
2021-04-10 11:26:59 +00:00
Markus Ebner
3ba8abb056 videocrop: Move supported format list into private header
- Moved declaration of supported pixel formats to private header, which
  can be shared between videocrop and aspectvideocrop

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/515>
2021-04-10 11:26:59 +00:00
Nirbheek Chauhan
c8827acb93 rtpjitterbuffer: More logging when calculating rfc7273 timestamps
This code can be fragile, since it is very exacting in the timestamps
that it will accept. Add more logging so it's easier to debug issues
and figure out whether it's a bug in the calculation or something
wrong in the incoming buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/934>
2021-04-09 12:48:02 +05:30
Stéphane Cerveau
0935c7efbb rtp: missing debug init after element splitting
- h264depay
- h265depay
- sv3vdepay

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/936>
2021-04-08 14:02:46 +02:00
Michal Dzik
8e8b22174d rtp: rename gst_rtp_sbc_pay_flush_buffers()
gst_rtp_sbc_pay_flush_buffers() is a misleading name. A better name would
be gst_rtp_sbc_pay_drain_buffers(), because that's what it does, it drains
any leftover queued data and pushes it downstream. "Flushing" in GStreamer
typically means to throw away any queued data and not process/push it
downstream.

Signed-off-by: Michal Dzik <michal.dzik@streamunlimited.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/700>
2021-04-08 08:46:34 +00:00
Michal Dzik
680722bbfa rtp: fix adapter flushing in sbc payloader
GstAdapter must be flushed in some cases (flush, new segment, state change)
Without it, it may, for example, push some leftover buffer from old
segment in new segment. This, in general, breaks timestamps.
See GstAdapter documentation for more.

Signed-off-by: Michal Dzik <michal.dzik@streamunlimited.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/700>
2021-04-08 08:46:34 +00:00
Jakub Adam
769df2c5d1 vpxenc: add colorspace information into VP9 bitstream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/871>
2021-04-07 22:05:06 +00:00
Hou Qi
a75cfa522d v4l2object: Use default colorimetry if that in caps is unknown
Some streams have unknown colorimetry in caps, but v4l2object sets
default values for each primaries. It will cause check colorimetry
fail when do gst_v4l2_video_colorimetry_matches().

To fix this, need to keep the unknown colorimetry in caps same as
the default value set by v4l2object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/923>
2021-04-01 08:50:05 +08:00
Vivia Nikolaidou
5f783647a0 matroskademux: Take segment stop into account when need_segment
Otherwise, in the case of e.g. a deferred seek event, the segment stop
would be replaced with GST_CLOCK_TIME_NONE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/929>
2021-03-31 15:13:58 +00:00
Val Doroshchuk
597a226b92 gstqtoverlay: Add initialization and finalization to qml-scene prop
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/924>
2021-03-31 12:05:14 +00:00
Matthew Waters
4c3906356c qt: fix build warning with clang and c-linkage of user defined type
In file included from ../subprojects/gst-plugins-good/ext/qt/qtglrenderer.cc:17:
../subprojects/gst-plugins-good/ext/qt/gstqtglutility.h:35:16: error: 'qt_opengl_native_context_from_gst_gl_context' has C-linkage specified, but returns user-defined type 'QVariant' which is incompatible with C [-Werror,-Wreturn-type-c-linkage]
QVariant       qt_opengl_native_context_from_gst_gl_context     (GstGLContext * context);

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/928>
2021-03-31 10:28:11 +11:00
Stéphane Cerveau
42b803ebb3 qt: hotfix: allow per feature registration
Fixes #869

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/925>
2021-03-30 10:09:00 +02:00
Stéphane Cerveau
48786371df twolame: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
2021-03-29 12:45:23 +02:00
Stéphane Cerveau
31c1e8ca13 shout2: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
2021-03-29 12:45:23 +02:00
Stéphane Cerveau
e63ab37431 cairo: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
2021-03-29 12:45:23 +02:00
Stéphane Cerveau
24c03454e3 y4m: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
2021-03-29 12:45:23 +02:00
Stéphane Cerveau
8ef56e529f wavparse: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
2021-03-29 12:45:23 +02:00
Stéphane Cerveau
136de010bb wavenc: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
2021-03-29 12:45:23 +02:00
Stéphane Cerveau
41f7a88f6b spectrum: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
2021-03-29 12:45:23 +02:00
Stéphane Cerveau
7bfcfd660f monoscope: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
2021-03-29 12:45:23 +02:00
Stéphane Cerveau
2ba958555f imagefreeze: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
2021-03-29 12:45:23 +02:00
Stéphane Cerveau
3347e1786f id3demux: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
2021-03-29 12:45:23 +02:00
Stéphane Cerveau
6db40c9140 icydemux: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
2021-03-29 12:45:23 +02:00