awstranscriber: post warning message with details when item is late

When the latency is configured to a value that is too low, items will be
pushed out with an adjusted timestamp, thus affecting synchronization.

It can be useful for the application to receive details about those
adjustments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1793>
This commit is contained in:
Mathieu Duponchelle 2024-09-20 17:40:37 +02:00 committed by GStreamer Marge Bot
parent 41ddbd8706
commit 79845fd99a

View file

@ -1436,6 +1436,18 @@ impl TranslationPadTask {
"Updating item PTS ({pts} < {last_position}), consider increasing latency", "Updating item PTS ({pts} < {last_position}), consider increasing latency",
); );
let details = gst::Structure::builder("awstranscriber/late-item")
.field("original-pts", pts)
.field("last-position", last_position)
.build();
gst::element_warning!(
self.pad.parent(),
gst::LibraryError::Settings,
["Late transcription item, updating PTS"],
details: details
);
pts = last_position; pts = last_position;
// FIXME if the resulting duration is zero, we might as well not push it. // FIXME if the resulting duration is zero, we might as well not push it.
duration = duration.saturating_sub(delta); duration = duration.saturating_sub(delta);