Fix 32bits warnings

This commit is contained in:
Patrick Nicolas
2024-11-30 13:16:39 +01:00
parent 9eacb3b881
commit ba47c80213
6 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -93,12 +93,12 @@ void print_encoders(const std::vector<wivrn::encoder_settings> & encoders)
std::string codec(magic_enum::enum_name(encoder.codec));
U_LOG_I("\t%s (%s)", encoder.encoder_name.c_str(), codec.c_str());
U_LOG_I("\tchannels: %s", std::string(magic_enum::enum_name(encoder.channels)).c_str());
U_LOG_I("\tsize:%dx%d offset:%dx%d",
U_LOG_I("\tsize:%" PRIu16 "x%" PRIu16 " offset:%" PRIu16 "x%" PRIu16,
encoder.width,
encoder.height,
encoder.offset_x,
encoder.offset_y);
U_LOG_I("\tbitrate: %ldMbit/s", encoder.bitrate / 1'000'000);
U_LOG_I("\tbitrate: %" PRIu64 "Mbit/s", encoder.bitrate / 1'000'000);
}
}
+1 -1
View File
@@ -260,7 +260,7 @@ void video_encoder::encode(wivrn_session & cnx,
// Throttle idr to prevent overloading the decoder
if (idr and frame_index < last_idr_frame + idr_throttle)
{
U_LOG_D("Throttle IDR: stream %d frame %ld", stream_idx, frame_index);
U_LOG_D("Throttle IDR: stream %" PRIu8 " frame %" PRIu64, stream_idx, frame_index);
sync_needed = true;
idr = false;
}
+2 -2
View File
@@ -66,10 +66,10 @@ wivrn::video_encoder_vulkan::video_encoder_vulkan(
if (encode_caps.rateControlModes & (vk::VideoEncodeRateControlModeFlagBitsKHR::eCbr | vk::VideoEncodeRateControlModeFlagBitsKHR::eVbr))
{
U_LOG_D("Maximum bitrate: %ld", encode_caps.maxBitrate / 1'000'000);
U_LOG_D("Maximum bitrate: %" PRIu64, encode_caps.maxBitrate / 1'000'000);
if (encode_caps.maxBitrate < settings.bitrate)
{
U_LOG_W("Configured bitrate %ldMB/s is higher than max supported %ld",
U_LOG_W("Configured bitrate %" PRIu64 "MB/s is higher than max supported %" PRIu64,
settings.bitrate / 1'000'000,
encode_caps.maxBitrate / 1'000'000);
}