GNOME Bugzilla – Bug 774629
decklinkvideosrc: Issue "no signal" warnings
Last modified: 2016-11-18 09:56:47 UTC
When a frame is found to not have an associated input source (cable unplugged, wrong mode selected), an element warning will be issued. When the next frame in the stream is found to have an input source selected (e.g. cable replugged), an element info will be issued.
Created attachment 340141 [details] [review] 0001-decklinkvideosrc-Issue-no-signal-warnings.patch
Review of attachment 340141 [details] [review]: ::: sys/decklink/gstdecklinkvideosrc.cpp @@ +660,3 @@ + flags = f->frame->GetFlags(); + if (flags & bmdFrameHasNoInputSource) { + if (self->no_signal == FALSE) { Don't compare booleans with == @@ +667,3 @@ + } else { + if (self->no_signal) { + self->no_signal = FALSE; You also need to reset it to FALSE (as in init()) whenever the element is restarted.
Created attachment 340142 [details] [review] 0001-decklinkvideosrc-Issue-no-signal-warnings.patch Thanks for the review comments, patch updated.
commit 85ef4166a2ab6e871e3efde779d7fd65a3103dc6 Author: Vivia Nikolaidou <vivia@ahiru.eu> Date: Thu Nov 17 18:23:04 2016 +0200 decklinkvideosrc: Issue "no signal" warnings When a frame is found to not have an associated input source (cable unplugged, wrong mode selected), an element warning will be issued. When the next frame in the stream is found to have an input source selected (e.g. cable replugged), an element info will be issued. https://bugzilla.gnome.org/show_bug.cgi?id=774629
I think we should be making use of the new _WITH_DETAILS API for error/warning/info messages here, since the error code itself is really quite meaningless and the app can't rely on the error string (might be translated in future) or the debug string (should not be looked at). Or add a new error code for it. Or use a different kind of message (maybe progress messages?)