1
0
Fork 0

src/Viewer/viewmgr.cxx: log video encoding sws_scale() timing info with /sim/video/log_sws_scale_stats.

This commit is contained in:
Julian Smith 2022-05-01 13:02:15 +01:00
parent d2d3bd5edc
commit b40cc51611

View file

@ -485,7 +485,7 @@ bool FGViewMgr::video_start(
videoEncodingPopup(warning, 10); videoEncodingPopup(warning, 10);
} }
SG_LOG(SG_SYSTEMS, SG_ALERT, "Starting video encoding." SG_LOG(SG_SYSTEMS, SG_ALERT, "Video encoding starting."
<< " codec=" << codec << " codec=" << codec
<< " quality=" << quality << " quality=" << quality
<< " speed=" << speed << " speed=" << speed
@ -493,9 +493,12 @@ bool FGViewMgr::video_start(
<< " path=" << path << " path=" << path
<< " path_link=" << path_link << " path_link=" << path_link
); );
bool log_sws_scale_stats = globals->get_props()->getNode("/sim/video/log_sws_scale_stats", true /*create*/)->getBoolValue();
try 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) catch (std::exception& e)
{ {
@ -513,7 +516,7 @@ void FGViewMgr::video_stop()
{ {
_video_encoder.reset(); _video_encoder.reset();
vidoEncodingUpdateStatus(""); vidoEncodingUpdateStatus("");
videoEncodingPopup("Video encoding stopped", 5); videoEncodingPopup("Video encoding stopped.", 5);
} }
else else
{ {