diff --git a/src/jpeg_streamers.cpp b/src/jpeg_streamers.cpp index e50f952..bfc6c62 100644 --- a/src/jpeg_streamers.cpp +++ b/src/jpeg_streamers.cpp @@ -108,8 +108,9 @@ void JpegSnapshotStreamer::sendImage( cv::imencode(".jpeg", img, encoded_buffer, encode_params); char stamp[20]; - snprintf(stamp, sizeof(stamp), "%.06lf", - std::chrono::duration_cast>(time.time_since_epoch()).count()); + snprintf( + stamp, sizeof(stamp), "%.06lf", + std::chrono::duration_cast>(time.time_since_epoch()).count()); async_web_server_cpp::HttpReply::builder(async_web_server_cpp::HttpReply::ok) .header("Connection", "close") .header("Server", "web_video_server") diff --git a/src/libav_streamer.cpp b/src/libav_streamer.cpp index f12fd05..d5c00b9 100644 --- a/src/libav_streamer.cpp +++ b/src/libav_streamer.cpp @@ -276,8 +276,8 @@ void LibavStreamer::sendImage( std::size_t size; uint8_t * output_buf; - double seconds = std::chrono::duration_cast>(time - - first_image_timestamp_.value()).count(); + double seconds = std::chrono::duration_cast>( + time - first_image_timestamp_.value()).count(); // Encode video at 1/0.95 to minimize delay pkt->pts = (int64_t)(seconds / av_q2d(video_stream_->time_base) * 0.95); if (pkt->pts <= 0) { diff --git a/src/multipart_stream.cpp b/src/multipart_stream.cpp index 5871f0c..b26d229 100644 --- a/src/multipart_stream.cpp +++ b/src/multipart_stream.cpp @@ -61,8 +61,9 @@ void MultipartStream::sendPartHeader( size_t payload_size) { char stamp[20]; - snprintf(stamp, sizeof(stamp), "%.06lf", - std::chrono::duration_cast>(time.time_since_epoch()).count()); + snprintf( + stamp, sizeof(stamp), "%.06lf", + std::chrono::duration_cast>(time.time_since_epoch()).count()); std::shared_ptr> headers( new std::vector()); headers->push_back(async_web_server_cpp::HttpHeader("Content-type", type)); @@ -114,8 +115,8 @@ bool MultipartStream::isBusy() pending_footers_.pop(); } else { auto footer_time = pending_footers_.front().timestamp; - if (std::chrono::duration_cast>((current_time - - footer_time)).count() > 0.5) + if (std::chrono::duration_cast>( + (current_time - footer_time)).count() > 0.5) { pending_footers_.pop(); } else {