summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/video.c47
1 files changed, 26 insertions, 21 deletions
diff --git a/apps/plugins/video.c b/apps/plugins/video.c
index a44b9c6354..bcb160e0b6 100644
--- a/apps/plugins/video.c
+++ b/apps/plugins/video.c
@@ -759,7 +759,7 @@ int main(char* filename)
759 int file_size; 759 int file_size;
760 int fd; /* file descriptor handle */ 760 int fd; /* file descriptor handle */
761 int read_now, got_now; 761 int read_now, got_now;
762 int button; 762 int button = 0;
763 int retval; 763 int retval;
764 764
765 // try to open the file 765 // try to open the file
@@ -865,27 +865,32 @@ int main(char* filename)
865 return PLUGIN_USB_CONNECTED; 865 return PLUGIN_USB_CONNECTED;
866 } 866 }
867 867
868 // display statistics 868#ifndef DEBUG // for release compilations, only display the stats in case of error
869 rb->lcd_clear_display(); 869 if (gStats.nAudioUnderruns || gStats.nVideoUnderruns)
870 rb->snprintf(gPrint, sizeof(gPrint), "%d Audio Underruns", gStats.nAudioUnderruns); 870#endif
871 rb->lcd_puts(0, 0, gPrint); 871 {
872 rb->snprintf(gPrint, sizeof(gPrint), "%d Video Underruns", gStats.nVideoUnderruns); 872 // display statistics
873 rb->lcd_puts(0, 1, gPrint); 873 rb->lcd_clear_display();
874 rb->snprintf(gPrint, sizeof(gPrint), "%d MinAudio bytes", gStats.minAudioAvail); 874 rb->snprintf(gPrint, sizeof(gPrint), "%d Audio Underruns", gStats.nAudioUnderruns);
875 rb->lcd_puts(0, 2, gPrint); 875 rb->lcd_puts(0, 0, gPrint);
876 rb->snprintf(gPrint, sizeof(gPrint), "%d MinVideo bytes", gStats.minVideoAvail); 876 rb->snprintf(gPrint, sizeof(gPrint), "%d Video Underruns", gStats.nVideoUnderruns);
877 rb->lcd_puts(0, 3, gPrint); 877 rb->lcd_puts(0, 1, gPrint);
878 rb->snprintf(gPrint, sizeof(gPrint), "ReadChunk: %d", gBuf.nReadChunk); 878 rb->snprintf(gPrint, sizeof(gPrint), "%d MinAudio bytes", gStats.minAudioAvail);
879 rb->lcd_puts(0, 4, gPrint); 879 rb->lcd_puts(0, 2, gPrint);
880 rb->snprintf(gPrint, sizeof(gPrint), "SeekChunk: %d", gBuf.nSeekChunk); 880 rb->snprintf(gPrint, sizeof(gPrint), "%d MinVideo bytes", gStats.minVideoAvail);
881 rb->lcd_puts(0, 5, gPrint); 881 rb->lcd_puts(0, 3, gPrint);
882 rb->snprintf(gPrint, sizeof(gPrint), "LowWater: %d", gBuf.low_water); 882 rb->snprintf(gPrint, sizeof(gPrint), "ReadChunk: %d", gBuf.nReadChunk);
883 rb->lcd_puts(0, 6, gPrint); 883 rb->lcd_puts(0, 4, gPrint);
884 rb->snprintf(gPrint, sizeof(gPrint), "HighWater: %d", gBuf.high_water); 884 rb->snprintf(gPrint, sizeof(gPrint), "SeekChunk: %d", gBuf.nSeekChunk);
885 rb->lcd_puts(0, 7, gPrint); 885 rb->lcd_puts(0, 5, gPrint);
886 rb->snprintf(gPrint, sizeof(gPrint), "LowWater: %d", gBuf.low_water);
887 rb->lcd_puts(0, 6, gPrint);
888 rb->snprintf(gPrint, sizeof(gPrint), "HighWater: %d", gBuf.high_water);
889 rb->lcd_puts(0, 7, gPrint);
886 890
887 rb->lcd_update(); 891 rb->lcd_update();
888 button = WaitForButton(); 892 button = WaitForButton();
893 }
889 return (button == SYS_USB_CONNECTED) ? PLUGIN_USB_CONNECTED : PLUGIN_OK; 894 return (button == SYS_USB_CONNECTED) ? PLUGIN_USB_CONNECTED : PLUGIN_OK;
890} 895}
891 896