aja: Fix compilation warnings on Clang and GCC

- Fix format warning
  On Linux uint64_t is a unsigned long and on macOS it is
  a unsigned long long.
- Fix macro-redefine warning on macOS
This commit is contained in:
tytan652 2022-07-18 15:02:55 +02:00 committed by Ryan Foster
parent 90c49c7af1
commit ba92da8d74
2 changed files with 6 additions and 1 deletions

View file

@ -15,6 +15,7 @@
#include <atomic>
#include <stdlib.h>
#include <inttypes.h>
// Log AJA Output video/audio delay/sync
// #define AJA_OUTPUT_STATS
@ -839,7 +840,9 @@ void AJAOutput::OutputThread(AJAThread *thread, void *ctx)
uint32_t audioSize = props.audioNumChannels / props.audioSampleSize;
if (audioSize > 0) {
blog(LOG_INFO,
"AJAOutput::OutputThread: Thread stopped\n[Video] qf: %lu wf: %lu pf: %lu\n[Audio] qs: %lu ws: %lu ps: %lu",
"AJAOutput::OutputThread: Thread stopped\n[Video] qf: %" PRIu64
" wf: %" PRIu64 " pf: %" PRIu64 "\n[Audio] qs: %" PRIu64
" ws: %" PRIu64 " ps: %" PRIu64,
ajaOutput->mVideoQueueFrames, ajaOutput->mVideoWriteFrames,
ajaOutput->mVideoPlayFrames,
ajaOutput->mAudioQueueBytes / audioSize,

View file

@ -13,7 +13,9 @@
#include <ajantv2/includes/ntv2card.h>
#include <ajantv2/includes/ntv2utils.h>
#ifndef NSEC_PER_SEC
#define NSEC_PER_SEC 1000000000LL
#endif
#define NTV2_AUDIOSIZE_MAX (401 * 1024)
AJASource::AJASource(obs_source_t *source)