From 1c930286db1d56e8a07e294815ecc42ce2416771 Mon Sep 17 00:00:00 2001 From: Darby Johnston Date: Tue, 17 Sep 2024 16:38:42 -0700 Subject: [PATCH] Refactoring --- bin/toucan-render/App.cpp | 7 ++++--- lib/toucan/FFmpegRead.cpp | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/toucan-render/App.cpp b/bin/toucan-render/App.cpp index 8876fa1..3ac5d9c 100644 --- a/bin/toucan-render/App.cpp +++ b/bin/toucan-render/App.cpp @@ -186,17 +186,17 @@ namespace toucan std::cout << timeRange.start_time().value() << std::endl; return 0; } - if (_options.printDuration) + else if (_options.printDuration) { std::cout << timeRange.duration().value() << std::endl; return 0; } - if (_options.printRate) + else if (_options.printRate) { std::cout << timeRange.duration().rate() << std::endl; return 0; } - if (_options.printSize) + else if (_options.printSize) { std::cout << imageSize.x << "x" << imageSize.y << std::endl; return 0; @@ -361,6 +361,7 @@ namespace toucan { std::cout << "Usage:" << std::endl; std::cout << " toucan-render (input) (output) [options...]" << std::endl; + std::cout << " toucan-render (input) (-print_start|-print_duration|-print_rate|-print_size)" << std::endl; std::cout << std::endl; std::cout << "Arguments:" << std::endl; for (const auto& arg : _args.list) diff --git a/lib/toucan/FFmpegRead.cpp b/lib/toucan/FFmpegRead.cpp index 783e9f1..2c991fb 100644 --- a/lib/toucan/FFmpegRead.cpp +++ b/lib/toucan/FFmpegRead.cpp @@ -74,9 +74,9 @@ namespace toucan FFmpegRead::FFmpegRead(const std::filesystem::path& path) : _path(path) { - //av_log_set_level(AV_LOG_QUIET); - av_log_set_level(AV_LOG_VERBOSE); - av_log_set_callback(logCallback); + av_log_set_level(AV_LOG_QUIET); + //av_log_set_level(AV_LOG_VERBOSE); + //av_log_set_callback(logCallback); const std::string fileName = path.string(); int r = avformat_open_input(