11 std::string_view suffix) {
12 const fs::path output_path(filename);
13 const fs::path parent = output_path.has_parent_path()
14 ? output_path.parent_path()
16 const std::string name = output_path.filename().empty()
17 ? std::string(
"output")
18 : output_path.filename().string();
20 (
"video_file-" + name +
"-" + std::string(suffix));
55 const fs::path &directory, std::uint32_t width, std::uint32_t height,
57 std::chrono::system_clock::time_point timestamp) {
58 const std::time_t timestamp_time =
59 std::chrono::system_clock::to_time_t(timestamp);
62 localtime_s(&local_time, ×tamp_time);
64 localtime_r(×tamp_time, &local_time);
67 std::ostringstream filename;
68 filename <<
"ACMXVK.Snapshot-"
69 << std::put_time(&local_time,
"%Y.%m.%d-%H.%M.%S") <<
'-'
70 << width <<
'x' << height <<
'-' << counter
72 const fs::path candidate = directory / filename.str();
73 if (!fs::exists(candidate)) {
fs::path snapshot_path(const fs::path &directory, std::uint32_t width, std::uint32_t height, std::uint64_t &counter, SnapshotFormat format, std::chrono::system_clock::time_point timestamp)