From b40cc5161171a19b826fdc9b9ad27420e26217db Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Sun, 1 May 2022 13:02:15 +0100 Subject: [PATCH] src/Viewer/viewmgr.cxx: log video encoding sws_scale() timing info with /sim/video/log_sws_scale_stats. --- src/Viewer/viewmgr.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Viewer/viewmgr.cxx b/src/Viewer/viewmgr.cxx index 6dffb6f48..65fe34fbf 100644 --- a/src/Viewer/viewmgr.cxx +++ b/src/Viewer/viewmgr.cxx @@ -485,7 +485,7 @@ bool FGViewMgr::video_start( videoEncodingPopup(warning, 10); } - SG_LOG(SG_SYSTEMS, SG_ALERT, "Starting video encoding." + SG_LOG(SG_SYSTEMS, SG_ALERT, "Video encoding starting." << " codec=" << codec << " quality=" << quality << " speed=" << speed @@ -493,9 +493,12 @@ bool FGViewMgr::video_start( << " path=" << path << " path_link=" << path_link ); + bool log_sws_scale_stats = globals->get_props()->getNode("/sim/video/log_sws_scale_stats", true /*create*/)->getBoolValue(); try { - _video_encoder.reset(new simgear::VideoEncoder(path.str(), codec, quality, speed, bitrate)); + _video_encoder.reset( + new simgear::VideoEncoder(path.str(), codec, quality, speed, bitrate, log_sws_scale_stats) + ); } catch (std::exception& e) { @@ -513,7 +516,7 @@ void FGViewMgr::video_stop() { _video_encoder.reset(); vidoEncodingUpdateStatus(""); - videoEncodingPopup("Video encoding stopped", 5); + videoEncodingPopup("Video encoding stopped.", 5); } else {