Log total/skipped frames on output stop
This makes it easier to do two things: 1.) Get the skipped frames count relative to each specific output 2.) Make it so that getting the 'current' log will always contain information about skipped frames. Before, you'd have to force the user to restart the program and get the last log, which was really annoying when you just wanted to see how the encoders were performing.
This commit is contained in:
16
libobs/obs.c
16
libobs/obs.c
@@ -314,24 +314,8 @@ static void obs_free_video(void)
|
||||
struct obs_core_video *video = &obs->video;
|
||||
|
||||
if (video->video) {
|
||||
uint32_t total_frames =
|
||||
video_output_get_total_frames(video->video);
|
||||
uint32_t skipped_frames =
|
||||
video_output_get_skipped_frames(video->video);
|
||||
double percentage_skipped =
|
||||
(double)skipped_frames / (double)total_frames * 100.0;
|
||||
|
||||
obs_display_free(&video->main_display);
|
||||
|
||||
blog(LOG_INFO, "Video session ending");
|
||||
blog(LOG_INFO, "Total frames: %"PRIu32, total_frames);
|
||||
if (total_frames) {
|
||||
blog(LOG_INFO, "Number of skipped frames: "
|
||||
"%"PRIu32" (%g%%)",
|
||||
skipped_frames, percentage_skipped);
|
||||
}
|
||||
blog(LOG_INFO, "-------------------------------------------");
|
||||
|
||||
video_output_close(video->video);
|
||||
video->video = NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user