Commit graph

14 commits

Author SHA1 Message Date
Nirbheek Chauhan
a1463637e0 pango: Add a property to compensate for display response time
When measuring video latency, one mechanism involves taking a photo
with a camera of two screens showing the test video overlayed with
timeoverlay or clockoverlay. In these cases, if the display's pixel
response time is crappy, you will see ghosting due to which it can be
quite difficult to discern what the current timestamp being shown is.

This commit adds a property that *also* shows the timestamp in
a different (sequentially predictable) location every frame, which
makes it easy to tell what the latest rendered timestamp is.

For bonus points, you can also use the fade-time of the previous frame
to measure with sub-framerate accuracy when the photo was taken, not
just clamped to the framerate, giving you a higher precision latency
value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6935>
2024-06-06 14:03:04 +00:00
Guillaume Desmottes
0b17b17a8a basetextoverlay: use GST_DEBUG_OBJECT instead of GST_DEBUG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6918>
2024-05-27 08:36:17 +02:00
Piotr Brzeziński
49865826b0 basetextoverlay: Fix overlay never rendering again if width reaches 1px
If text width ever reached 1px, for example after resizing the output window, the overlay would stop rendering
and never return again. The 1px condition itself does not seem to make much sense here anyway.

This was a chain of events: width reached 1, so the composition was set to NULL. Then, after resizing the output window,
push_frame() was called but would not attempt to renegotiate because composition is NULL. This caused the width/height
to never be updated again, as that only happens during negotiation, so the overlay was gone for good.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5614>
2023-11-08 11:19:39 +00:00
William Manley
04bcff4dce basetextoverlay: Fix typo in "text-y" property description
Looks like a copy and paste error.

Co-authored-by: Fabian Orccon <cfoch.fabian@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4823>
2023-06-10 16:52:29 +00:00
Stéphane Cerveau
f6b2b716b2 timeoverlay: add buffer-count mode
This mode would allow to display the buffer
number received by the timeoverlay element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3827>
2023-03-10 16:00:53 +00:00
Tim-Philipp Müller
b9d8fb3d63 timeoverlay: fix pad leak
Spotted by Jiri Uncovsky.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1336>
2022-12-11 23:54:50 +00:00
Sebastian Dröge
010ede30dd textrender: Negotiate caps on a GAP event if none were negotiated yet
Otherwise downstream wouldn't have received a segment event either and
wouldn't know what to do with the gap event

And also forward any pending segment event.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3541>
2022-12-07 14:27:17 +00:00
Sebastian Dröge
7af129b755 textrender: Don't pass plaintext as pango markup to Pango
Otherwise e.g. & in the text will cause Pango to complain about invalid
markup and render the text incorrectly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3445>
2022-11-21 18:47:50 +02:00
Sebastian Dröge
5b1a1c41b6 textrender: Don't blindly forward all events
Use gst_pad_event_default(), which does the right thing by default.
Especially it does not forward text/x-plain caps downstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3445>
2022-11-21 18:43:54 +02:00
Thibault Saunier
6a4425e46a meson: Call pkgconfig.generate in the loop where we declare plugins dependencies
Removing some copy pasted code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2970>
2022-09-01 21:17:35 +00:00
Jan Schmidt
c668f6fc22 basetextoverlay: Don't miscalculate text running times
When a new segment event arrives, it immediately updates
the current stored segment, which was used for calculating
the running time of the current text buffer for every
passing video frame. This means a segment that arrives
after the text buffer might get used to (mis)calculate
the running times subsequently.

Instead, calculate and store the right running time
using the current segment when storing the buffer. Later
the stored segment can get freely updated.

This fixes the case where pieces of video and text streams
are seamlessly concatenated and fed through the text overlay.
Previously, it could lead to the current text buffer suddenly
have a massive running time and blocking all further input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2802>
2022-08-12 12:08:18 +00:00
Mathieu Duponchelle
14b37268f6 timeoverlay: add support for reference timestamp time mode
+ update date-time mode to actually use the timestamp that
  was selected with the time-mode property

Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2252>
2022-04-27 12:35:21 +00:00
Xavier Claessens
b004464ac6 Remove glib and gobject dependencies everywhere
They are part of gst_dep already and we have to make sure to always have
gst_dep. The order in dependencies matters, because it is also the order
in which Meson will set -I args. We want gstreamer's config.h to take
precedence over glib's private config.h when it's a subproject.

While at it, remove useless fallback args for gmodule/gio dependencies,
only gstreamer core needs it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2031>
2022-04-01 16:32:17 +00:00
Thibault Saunier
2fd28195ca Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00