Fix 32bits warnings
This commit is contained in:
@@ -268,7 +268,7 @@ void pipewire_device::mic_process(void * self_v)
|
||||
if (not tmp)
|
||||
break;
|
||||
self->mic_buffer_size_bytes -= tmp->payload.size_bytes();
|
||||
U_LOG_D("Audio sync: discard %ld bytes", tmp->payload.size_bytes());
|
||||
U_LOG_D("Audio sync: discard %zd bytes", tmp->payload.size_bytes());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ void clock_offset_estimator::add_sample(const wivrn::from_headset::timesync_resp
|
||||
// packets with too high latency are likely to be retransmitted
|
||||
if (sample.received - sample.query > 3 * latency)
|
||||
{
|
||||
U_LOG_D("drop packet for latency %ldµs > %ldµs", (sample.received - sample.query) / 1000, latency / 1000);
|
||||
U_LOG_D("drop packet for latency %" PRIi64 "µs > %" PRIi64 "µs", (sample.received - sample.query) / 1000, latency / 1000);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ void clock_offset_estimator::add_sample(const wivrn::from_headset::timesync_resp
|
||||
offset.stable = std::abs((b - (double)offset.b)) < 20'000'000;
|
||||
|
||||
offset.b = b;
|
||||
U_LOG_D("clock relations: headset = x+b where b=%ldµs", offset.b / 1000);
|
||||
U_LOG_D("clock relations: headset = x+b where b=%" PRIu64 "µs", offset.b / 1000);
|
||||
}
|
||||
|
||||
clock_offset clock_offset_estimator::get_offset()
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -384,7 +384,7 @@ void start_publishing()
|
||||
return;
|
||||
|
||||
char protocol_string[17];
|
||||
sprintf(protocol_string, "%016lx", wivrn::protocol_version);
|
||||
sprintf(protocol_string, "%016" PRIx64, wivrn::protocol_version);
|
||||
std::map<std::string, std::string> TXT = {
|
||||
{"protocol", protocol_string},
|
||||
{"version", wivrn::git_version},
|
||||
|
||||
Reference in New Issue
Block a user