gstreamer-encoder: Show the source fps when the system is too slow

The source framerate is as important as the resolution when trying to
understand if the system should be fast enough to encode the video
stream in real time.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Francois Gouget 2019-05-21 02:27:23 +02:00 committed by Frediano Ziglio
parent 148203a5d2
commit cfe98800a0

View File

@ -542,7 +542,8 @@ static void update_next_frame_mm_time(SpiceGstEncoder *encoder)
uint64_t period_ns = NSEC_PER_SEC / get_source_fps(encoder);
uint64_t min_delay_ns = get_average_encoding_time(encoder);
if (min_delay_ns > period_ns) {
spice_warning("your system seems to be too slow to encode this %dx%d video in real time", encoder->width, encoder->height);
spice_warning("your system seems to be too slow to encode this %dx%d@%d video in real time",
encoder->width, encoder->height, get_source_fps(encoder));
}
min_delay_ns = MIN(min_delay_ns, SPICE_GST_MAX_PERIOD);