+void FFmpegCapture::send_disconnected_frame()
+{
+ // Send an empty frame to signal that we have no signal anymore.
+ FrameAllocator::Frame video_frame = video_frame_allocator->alloc_frame();
+ if (video_frame.data) {
+ VideoFormat video_format;
+ video_format.width = width;
+ video_format.height = height;
+ video_format.stride = width * 4;
+ video_format.frame_rate_nom = 60;
+ video_format.frame_rate_den = 1;
+ video_format.is_connected = false;
+
+ video_frame.len = width * height * 4;
+ memset(video_frame.data, 0, video_frame.len);
+
+ frame_callback(timecode++,
+ video_frame, /*video_offset=*/0, video_format,
+ FrameAllocator::Frame(), /*audio_offset=*/0, AudioFormat());
+ }
+}
+