From 08308c28a2f6649c79153730197c449003aa32f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 18 Aug 2021 11:36:24 +0300 Subject: [PATCH] Include detected video format in warning message if it is different from the configured one --- gstajasrc.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/gstajasrc.cpp b/gstajasrc.cpp index f3ad18aab0..3223836d66 100644 --- a/gstajasrc.cpp +++ b/gstajasrc.cpp @@ -1687,16 +1687,25 @@ restart: } else if (current_video_format != effective_video_format && current_video_format != self->video_format) { // TODO: Handle GST_AJA_VIDEO_FORMAT_AUTO here + + std::string current_string = + NTV2VideoFormatToString(current_video_format); + std::string configured_string = + NTV2VideoFormatToString(self->video_format); + std::string effective_string = + NTV2VideoFormatToString(effective_video_format); + GST_DEBUG_OBJECT(self, - "Different input format %u than configured %u " - "(effective %u), waiting", - current_video_format, self->video_format, - effective_video_format); + "Different input format %s than configured %s " + "(effective %s), waiting", + current_string.c_str(), configured_string.c_str(), + effective_string.c_str()); g_mutex_unlock(&self->queue_lock); frames_dropped_last = G_MAXUINT64; if (have_signal) { GST_ELEMENT_WARNING(GST_ELEMENT(self), RESOURCE, READ, ("Signal lost"), - ("Different input source was detected")); + ("Different input source (%s) was detected", + current_string.c_str())); have_signal = FALSE; } self->device->device->WaitForInputVerticalInterrupt(self->channel);