mlv_rec has this nice recording symbol, followed by the elapsed recording time. But if frames are skipped, which happens to me from time to time, the elapsed time isn´t shown anymore. I can only see, how many frames are skipped acually. But I would like to see both, the elapsed time and the skipped frames.
I played a bit with the code and solved this problem for me like this in mlv_rec.c
if(!DISPLAY_REC_INFO_NONE && liveview_display_idle() && should_run_polling_action(DEBUG_REDRAW_INTERVAL, &auxrec))
{
if(DISPLAY_REC_INFO_ICON)
{
int32_t fps = fps_get_current_x1000();
int32_t t = ((frame_count + frame_skips) * 1000 + fps/2) / fps;
int32_t predicted = predict_frames(measured_write_speed * 1024 / 100 * 1024);
/* print the Recording Icon */
int rl_color;
if(predicted < 10000)
{
int time_left = (predicted-frame_count) * 1000 / fps;
if (time_left < 10) {
rl_color = COLOR_DARK_RED;
} else {
rl_color = COLOR_YELLOW;
}
}
else
{
rl_color = COLOR_GREEN1;
}
int rl_icon_width=0;
/* Draw the movie camera icon */
rl_icon_width = bfnt_draw_char(ICON_ML_MOVIE, MLV_ICON_X, MLV_ICON_Y, rl_color, COLOR_BG_DARK);
/* Display the Status */
bmp_printf(FONT(FONT_MED, COLOR_WHITE, COLOR_BG_DARK), MLV_ICON_X+rl_icon_width+5, MLV_ICON_Y+5, "%02d:%02d", t/60, t%60);
if(frame_skips)
{
bmp_printf(FONT(FONT_MED, COLOR_WHITE, COLOR_BG_DARK), MLV_ICON_X+rl_icon_width+5, MLV_ICON_Y+30, "%d skipped", frame_skips);
}
}
My changes:
int32_t t = ((frame_count + frame_skips) * 1000 + fps/2) / fps;
/* Display the Status */
bmp_printf(FONT(FONT_MED, COLOR_WHITE, COLOR_BG_DARK), MLV_ICON_X+rl_icon_width+5, MLV_ICON_Y+5, "%02d:%02d", t/60, t%60);
if(frame_skips)
{
bmp_printf(FONT(FONT_MED, COLOR_WHITE, COLOR_BG_DARK), MLV_ICON_X+rl_icon_width+5, MLV_ICON_Y+30, "%d skipped", frame_skips);
}
I don´t know, whether my change is a proper solution for this problem or whether this must be done in another way. Can this feature, showing skipped frames and elapsed time, be integrated in mlv_rec, please?
Edgar