X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fdecklink_output.cpp;h=e37002918cb4891f645827dcef74dc7115429031;hb=575f6eb1b052bb1291987753b1a8cccc7f1e3ab3;hp=28f433a8872945b3191608cc7283eea5fea4669e;hpb=392f9d1ccb835c05a3874c4bea163788b2c37024;p=nageru diff --git a/nageru/decklink_output.cpp b/nageru/decklink_output.cpp index 28f433a..e370029 100644 --- a/nageru/decklink_output.cpp +++ b/nageru/decklink_output.cpp @@ -12,9 +12,9 @@ #include "decklink_output.h" #include "decklink_util.h" #include "flags.h" -#include "metrics.h" +#include "shared/metrics.h" #include "print_latency.h" -#include "timebase.h" +#include "shared/timebase.h" #include "v210_converter.h" using namespace movit; @@ -317,7 +317,7 @@ void DeckLinkOutput::send_frame(GLuint y_tex, GLuint cbcr_tex, YCbCrLumaCoeffici frame->duration = duration; { - unique_lock lock(frame_queue_mutex); + lock_guard lock(frame_queue_mutex); pending_video_frames.push(move(frame)); } frame_queues_changed.notify_all(); @@ -334,10 +334,10 @@ void DeckLinkOutput::send_audio(int64_t pts, const std::vector &samples) HRESULT result = output->ScheduleAudioSamples(int_samples.get(), samples.size() / 2, pts, TIMEBASE, &frames_written); if (result != S_OK) { - fprintf(stderr, "ScheduleAudioSamples(pts=%ld) failed (result=0x%08x)\n", pts, result); + fprintf(stderr, "ScheduleAudioSamples(pts=%" PRId64 ") failed (result=0x%08x)\n", pts, result); } else { if (frames_written != samples.size() / 2) { - fprintf(stderr, "ScheduleAudioSamples() returned short write (%u/%ld)\n", frames_written, samples.size() / 2); + fprintf(stderr, "ScheduleAudioSamples() returned short write (%u/%zu)\n", frames_written, samples.size() / 2); } } metric_decklink_output_scheduled_samples += samples.size() / 2; @@ -457,17 +457,17 @@ HRESULT DeckLinkOutput::ScheduledFrameCompleted(/* in */ IDeckLinkVideoFrame *co ++metric_decklink_output_completed_frames_completed; break; case bmdOutputFrameDisplayedLate: - fprintf(stderr, "Output frame displayed late (pts=%ld)\n", frame->pts); + fprintf(stderr, "Output frame displayed late (pts=%" PRId64 ")\n", frame->pts); fprintf(stderr, "Consider increasing --output-buffer-frames if this persists.\n"); ++metric_decklink_output_completed_frames_late; break; case bmdOutputFrameDropped: - fprintf(stderr, "Output frame was dropped (pts=%ld)\n", frame->pts); + fprintf(stderr, "Output frame was dropped (pts=%" PRId64 "ld)\n", frame->pts); fprintf(stderr, "Consider increasing --output-buffer-frames if this persists.\n"); ++metric_decklink_output_completed_frames_dropped; break; case bmdOutputFrameFlushed: - fprintf(stderr, "Output frame was flushed (pts=%ld)\n", frame->pts); + fprintf(stderr, "Output frame was flushed (pts=%" PRId64 "ld)\n", frame->pts); ++metric_decklink_output_completed_frames_flushed; break; default: