summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-10-14 14:13:48 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-10-14 14:13:48 +0000
commit2f74eaae81a64c451da2f5650fbbbd8ce1fcc60b (patch)
tree4bd93ca635cec62d66065305120cb85f6693ec47 /apps/debug_menu.c
parent402502fc6f11c3cb6e224e90ecfb30d5a5147a63 (diff)
Added dbg_mpeg_thread()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2624 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index dca95d6cf7..77f896d7df 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -37,6 +37,7 @@
#include "system.h"
#include "font.h"
#include "disk.h"
+#include "mpeg.h"
/*---------------------------------------------------*/
/* SPECIAL DEBUG STUFF */
@@ -132,6 +133,45 @@ bool dbg_os(void)
#endif
#ifdef HAVE_LCD_BITMAP
+bool dbg_mpeg_thread(void)
+{
+ char buf[32];
+ int button;
+ struct mpeg_debug d;
+
+ while(1)
+ {
+ button = button_get_w_tmo(HZ/5);
+ switch(button)
+ {
+ case BUTTON_OFF | BUTTON_REL:
+ return false;
+ }
+
+ mpeg_get_debugdata(&d);
+
+ lcd_clear_display();
+
+ snprintf(buf, sizeof(buf), "read: %x", d.mp3buf_read);
+ lcd_puts(0, 0, buf);
+ snprintf(buf, sizeof(buf), "write: %x", d.mp3buf_write);
+ lcd_puts(0, 1, buf);
+ snprintf(buf, sizeof(buf), "swap: %x", d.mp3buf_swapwrite);
+ lcd_puts(0, 2, buf);
+ snprintf(buf, sizeof(buf), "playing: %d", d.playing);
+ lcd_puts(0, 3, buf);
+ snprintf(buf, sizeof(buf), "unplayed: %x", d.unplayed_space);
+ lcd_puts(0, 4, buf);
+ snprintf(buf, sizeof(buf), "unswapped: %x", d.unswapped_space);
+ lcd_puts(0, 5, buf);
+
+ lcd_update();
+ }
+ return false;
+}
+#endif
+
+#ifdef HAVE_LCD_BITMAP
bool dbg_hw_info(void)
{
char buf[32];
@@ -968,6 +1008,9 @@ bool debug_menu(void)
#endif
{ "View HW info", dbg_hw_info },
{ "View partitions", dbg_partitions },
+#ifdef HAVE_LCD_BITMAP
+ { "View mpeg thread", dbg_mpeg_thread },
+#endif
};
m=menu_init( items, sizeof items / sizeof(struct menu_items) );