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)
downloadrockbox-2f74eaae81a64c451da2f5650fbbbd8ce1fcc60b.tar.gz
rockbox-2f74eaae81a64c451da2f5650fbbbd8ce1fcc60b.zip
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 @@
37#include "system.h" 37#include "system.h"
38#include "font.h" 38#include "font.h"
39#include "disk.h" 39#include "disk.h"
40#include "mpeg.h"
40 41
41/*---------------------------------------------------*/ 42/*---------------------------------------------------*/
42/* SPECIAL DEBUG STUFF */ 43/* SPECIAL DEBUG STUFF */
@@ -132,6 +133,45 @@ bool dbg_os(void)
132#endif 133#endif
133 134
134#ifdef HAVE_LCD_BITMAP 135#ifdef HAVE_LCD_BITMAP
136bool dbg_mpeg_thread(void)
137{
138 char buf[32];
139 int button;
140 struct mpeg_debug d;
141
142 while(1)
143 {
144 button = button_get_w_tmo(HZ/5);
145 switch(button)
146 {
147 case BUTTON_OFF | BUTTON_REL:
148 return false;
149 }
150
151 mpeg_get_debugdata(&d);
152
153 lcd_clear_display();
154
155 snprintf(buf, sizeof(buf), "read: %x", d.mp3buf_read);
156 lcd_puts(0, 0, buf);
157 snprintf(buf, sizeof(buf), "write: %x", d.mp3buf_write);
158 lcd_puts(0, 1, buf);
159 snprintf(buf, sizeof(buf), "swap: %x", d.mp3buf_swapwrite);
160 lcd_puts(0, 2, buf);
161 snprintf(buf, sizeof(buf), "playing: %d", d.playing);
162 lcd_puts(0, 3, buf);
163 snprintf(buf, sizeof(buf), "unplayed: %x", d.unplayed_space);
164 lcd_puts(0, 4, buf);
165 snprintf(buf, sizeof(buf), "unswapped: %x", d.unswapped_space);
166 lcd_puts(0, 5, buf);
167
168 lcd_update();
169 }
170 return false;
171}
172#endif
173
174#ifdef HAVE_LCD_BITMAP
135bool dbg_hw_info(void) 175bool dbg_hw_info(void)
136{ 176{
137 char buf[32]; 177 char buf[32];
@@ -968,6 +1008,9 @@ bool debug_menu(void)
968#endif 1008#endif
969 { "View HW info", dbg_hw_info }, 1009 { "View HW info", dbg_hw_info },
970 { "View partitions", dbg_partitions }, 1010 { "View partitions", dbg_partitions },
1011#ifdef HAVE_LCD_BITMAP
1012 { "View mpeg thread", dbg_mpeg_thread },
1013#endif
971 }; 1014 };
972 1015
973 m=menu_init( items, sizeof items / sizeof(struct menu_items) ); 1016 m=menu_init( items, sizeof items / sizeof(struct menu_items) );