+
+ // Only bother doing MJPEG encoding if there are any connected clients
+ // that want the stream. FIXME: We should also stop memcpy-ing if there are none!
+ if (httpd.get_num_connected_multicam_clients() > 0) {
+ auto stream_it = global_flags.card_to_mjpeg_stream_export.find(card_index);
+ if (stream_it != global_flags.card_to_mjpeg_stream_export.end()) {
+ mjpeg_encoder->upload_frame(pts_int, stream_it->second, new_frame->frame, new_frame->video_format, new_frame->y_offset, new_frame->cbcr_offset);
+ }
+ }