From 675d8b347b7a15d77cdeb412c716e20fd4ae6caa Mon Sep 17 00:00:00 2001 From: Vivia Nikolaidou Date: Thu, 10 May 2018 14:05:12 +0300 Subject: [PATCH] decklink*src: Post a warning message on the bus about dropped frames Part-of: --- sys/decklink/gstdecklinkaudiosrc.cpp | 11 ++++++++--- sys/decklink/gstdecklinkvideosrc.cpp | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp index 779cbc8..36573c9 100644 --- a/sys/decklink/gstdecklinkaudiosrc.cpp +++ b/sys/decklink/gstdecklinkaudiosrc.cpp @@ -547,11 +547,16 @@ gst_decklink_audio_src_got_packet (GstElement * element, } if (skipped_packets == 0 && self->skipped_last > 0) { - GST_WARNING_OBJECT (self, - "Dropped %u old packets from %" GST_TIME_FORMAT " to %" + GST_ELEMENT_WARNING_WITH_DETAILS (self, + STREAM, FAILED, + ("Dropped %u old packets from %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT, self->skipped_last, GST_TIME_ARGS (self->skip_from_timestamp), - GST_TIME_ARGS (self->skip_to_timestamp)); + GST_TIME_ARGS (self->skip_to_timestamp)), + (NULL), + ("dropped", G_TYPE_UINT, self->skipped_last, + "from", G_TYPE_UINT64, self->skip_from_timestamp, + "to", G_TYPE_UINT64, self->skip_to_timestamp, NULL)); self->skipped_last = 0; } self->skipped_last += skipped_packets; diff --git a/sys/decklink/gstdecklinkvideosrc.cpp b/sys/decklink/gstdecklinkvideosrc.cpp index e6e2989..1cf8c4b 100644 --- a/sys/decklink/gstdecklinkvideosrc.cpp +++ b/sys/decklink/gstdecklinkvideosrc.cpp @@ -859,11 +859,16 @@ gst_decklink_video_src_got_frame (GstElement * element, } if (skipped_frames == 0 && self->skipped_last > 0) { - GST_WARNING_OBJECT (self, - "Dropped %u old frames from %" GST_TIME_FORMAT " to %" + GST_ELEMENT_WARNING_WITH_DETAILS (self, + STREAM, FAILED, + ("Dropped %u old frames from %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT, self->skipped_last, GST_TIME_ARGS (self->skip_from_timestamp), - GST_TIME_ARGS (self->skip_to_timestamp)); + GST_TIME_ARGS (self->skip_to_timestamp)), + (NULL), + ("dropped", G_TYPE_UINT, self->skipped_last, + "from", G_TYPE_UINT64, self->skip_from_timestamp, + "to", G_TYPE_UINT64, self->skip_to_timestamp, NULL)); self->skipped_last = 0; } -- 2.7.4