summaryrefslogtreecommitdiff
path: root/src/lib/dcp_video.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-07-09 22:53:27 +0200
committerCarl Hetherington <cth@carlh.net>2025-07-10 20:50:32 +0200
commit62c34b28567a097e8f22576e7d7891bd3dbe0ac0 (patch)
tree2a0440ed2bdb58c608582b75da6c877527dd6bda /src/lib/dcp_video.cc
parent2c499921a9f8615c8368d8161cb43c9a93c67311 (diff)
Replace String::compose with fmt.
sed -i "/Plural-Forms/n;/%100/n;/scanf/n;s/%[123456789]/{}/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc src/lib/po/*.po src/wx/po/*.po src/tools/po/*.po test/*.cc sed -i "s/String::compose */fmt::format/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc test/*.cc
Diffstat (limited to 'src/lib/dcp_video.cc')
-rw-r--r--src/lib/dcp_video.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/dcp_video.cc b/src/lib/dcp_video.cc
index 988a92ac5..e55cec5fa 100644
--- a/src/lib/dcp_video.cc
+++ b/src/lib/dcp_video.cc
@@ -152,7 +152,7 @@ DCPVideo::encode_locally() const
ArrayData enc = {};
/* This was empirically derived by a user: see #1902 */
int const minimum_size = 16384;
- LOG_DEBUG_ENCODE("Using minimum frame size %1", minimum_size);
+ LOG_DEBUG_ENCODE("Using minimum frame size {}", minimum_size);
auto xyz = convert_to_xyz(_frame);
int noise_amount = 2;
@@ -168,11 +168,11 @@ DCPVideo::encode_locally() const
);
if (enc.size() >= minimum_size) {
- LOG_DEBUG_ENCODE(N_("Frame %1 encoded size was OK (%2)"), _index, enc.size());
+ LOG_DEBUG_ENCODE(N_("Frame {} encoded size was OK ({})"), _index, enc.size());
break;
}
- LOG_GENERAL(N_("Frame %1 encoded size was small (%2); adding noise at level %3 with pixel skip %4"), _index, enc.size(), noise_amount, pixel_skip);
+ LOG_GENERAL(N_("Frame {} encoded size was small ({}); adding noise at level {} with pixel skip {}"), _index, enc.size(), noise_amount, pixel_skip);
/* The JPEG2000 is too low-bitrate for some decoders <cough>DSS200</cough> so add some noise
* and try again. This is slow but hopefully won't happen too often. We have to do
@@ -203,13 +203,13 @@ DCPVideo::encode_locally() const
switch (_frame->eyes()) {
case Eyes::BOTH:
- LOG_DEBUG_ENCODE(N_("Finished locally-encoded frame %1 for mono"), _index);
+ LOG_DEBUG_ENCODE(N_("Finished locally-encoded frame {} for mono"), _index);
break;
case Eyes::LEFT:
- LOG_DEBUG_ENCODE(N_("Finished locally-encoded frame %1 for L"), _index);
+ LOG_DEBUG_ENCODE(N_("Finished locally-encoded frame {} for L"), _index);
break;
case Eyes::RIGHT:
- LOG_DEBUG_ENCODE(N_("Finished locally-encoded frame %1 for R"), _index);
+ LOG_DEBUG_ENCODE(N_("Finished locally-encoded frame {} for R"), _index);
break;
default:
break;
@@ -237,7 +237,7 @@ DCPVideo::encode_remotely(EncodeServerDescription serv, int timeout) const
cxml::add_text_child(root, "Version", fmt::to_string(SERVER_LINK_VERSION));
add_metadata(root);
- LOG_DEBUG_ENCODE(N_("Sending frame %1 to remote"), _index);
+ LOG_DEBUG_ENCODE(N_("Sending frame {} to remote"), _index);
{
Socket::WriteDigestScope ds(socket);
@@ -248,7 +248,7 @@ DCPVideo::encode_remotely(EncodeServerDescription serv, int timeout) const
socket->write((uint8_t *) xml.c_str(), xml.bytes() + 1);
/* Send binary data */
- LOG_TIMING("start-remote-send thread=%1", thread_id());
+ LOG_TIMING("start-remote-send thread={}", thread_id());
_frame->write_to_socket(socket);
}
@@ -256,16 +256,16 @@ DCPVideo::encode_remotely(EncodeServerDescription serv, int timeout) const
is ready and sent back.
*/
Socket::ReadDigestScope ds(socket);
- LOG_TIMING("start-remote-encode thread=%1", thread_id());
+ LOG_TIMING("start-remote-encode thread={}", thread_id());
ArrayData e(socket->read_uint32());
- LOG_TIMING("start-remote-receive thread=%1", thread_id());
+ LOG_TIMING("start-remote-receive thread={}", thread_id());
socket->read(e.data(), e.size());
- LOG_TIMING("finish-remote-receive thread=%1", thread_id());
+ LOG_TIMING("finish-remote-receive thread={}", thread_id());
if (!ds.check()) {
throw NetworkError("Checksums do not match");
}
- LOG_DEBUG_ENCODE(N_("Finished remotely-encoded frame %1"), _index);
+ LOG_DEBUG_ENCODE(N_("Finished remotely-encoded frame {}"), _index);
return e;
}