Only report signal recovery after actually capturing a frame

This commit is contained in:
Sebastian Dröge 2021-08-18 12:22:28 +03:00
parent 08308c28a2
commit 02519523df

View file

@ -1713,12 +1713,6 @@ restart:
continue; continue;
} }
if (!have_signal) {
GST_ELEMENT_INFO(GST_ELEMENT(self), RESOURCE, READ, ("Signal recovered"),
("Input source detected"));
have_signal = TRUE;
}
AUTOCIRCULATE_STATUS status; AUTOCIRCULATE_STATUS status;
self->device->device->AutoCirculateGetStatus(self->channel, status); self->device->device->AutoCirculateGetStatus(self->channel, status);
@ -1771,6 +1765,12 @@ restart:
GstMapInfo anc_map2 = GST_MAP_INFO_INIT; GstMapInfo anc_map2 = GST_MAP_INFO_INIT;
AUTOCIRCULATE_TRANSFER transfer; AUTOCIRCULATE_TRANSFER transfer;
if (!have_signal) {
GST_ELEMENT_INFO(GST_ELEMENT(self), RESOURCE, READ, ("Signal recovered"),
("Input source detected"));
have_signal = TRUE;
}
iterations_without_frame = 0; iterations_without_frame = 0;
if (gst_buffer_pool_acquire_buffer(self->buffer_pool, &video_buffer, if (gst_buffer_pool_acquire_buffer(self->buffer_pool, &video_buffer,