movieplayer: shorten debug messages, print less often

This commit is contained in:
Stefan Seyfried
2016-01-09 17:00:16 +01:00
parent b53fbaf327
commit f3f6f91fb3

View File

@@ -931,6 +931,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
bool first_start = true;
bool update_lcd = true;
int eof = 0;
int lastpos = 0;
bool at_eof = !(playstate >= CMoviePlayerGui::PLAY);;
keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL;
while (playstate >= CMoviePlayerGui::PLAY)
@@ -963,7 +964,10 @@ void CMoviePlayerGui::PlayFileLoop(void)
update_lcd = true;
}
#ifdef DEBUG
printf("CMoviePlayerGui::PlayFile: speed %d position %d duration %d (%d, %d%%)\n", speed, position, duration, duration-position, file_prozent);
if (msg < CRCInput::RC_Events || eof > 0 || position - lastpos >= 10000) {
lastpos = position;
printf("CMoviePlayerGui::%s: spd %d pos %d/%d (%d, %d%%)\n", __func__, speed, position, duration, duration-position, file_prozent);
}
#endif
/* in case ffmpeg report incorrect values */
int posdiff = duration - position;
@@ -1779,7 +1783,7 @@ void CMoviePlayerGui::UpdatePosition()
file_prozent = (unsigned char) (position / (duration / 100));
FileTime.update(position, duration);
#ifdef DEBUG
printf("CMoviePlayerGui::PlayFile: speed %d position %d duration %d (%d, %d%%)\n", speed, position, duration, duration-position, file_prozent);
printf("CMoviePlayerGui::%s: spd %d pos %d/%d (%d, %d%%)\n", __func__, speed, position, duration, duration-position, file_prozent);
#endif
}
}