diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2003-03-10 18:05:01 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2003-03-10 18:05:01 +0000 |
commit | 6475aa0c85fcca7a37a7aa4316173270fcb6d038 (patch) | |
tree | e6dbe18217113212a9b8e713d3325c5803b3f4a6 /apps | |
parent | 673937d65402b058b5b5bfa5a1bf990c2d218dba (diff) | |
download | rockbox-6475aa0c85fcca7a37a7aa4316173270fcb6d038.tar.gz rockbox-6475aa0c85fcca7a37a7aa4316173270fcb6d038.zip |
Experimental Xing header generation added. Use with caution
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3418 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/tree.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/apps/tree.c b/apps/tree.c index 677f9302c4..013bfce010 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -653,6 +653,40 @@ void set_current_file(char *path) } #ifdef HAVE_LCD_BITMAP +extern int d_1; +extern int d_2; + +void xingupdate(int percent) +{ + char buf[32]; + + snprintf(buf, 32, "%d%%", percent); + lcd_puts(0, 3, buf); + snprintf(buf, 32, "%x", d_1); + lcd_puts(0, 4, buf); + snprintf(buf, 32, "%x", d_2); + lcd_puts(0, 5, buf); + lcd_update(); +} + +void do_xing(char *filename) +{ + char buf2[32]; + unsigned long dbg_tick; + + lcd_clear_display(); + lcd_puts(0, 0, filename); + lcd_update(); + dbg_tick = current_tick; + mpeg_create_xing_header(filename, xingupdate); + dbg_tick = current_tick - dbg_tick; + snprintf(buf2, 32, "%d ticks", dbg_tick); + lcd_puts(0, 1, buf2); + snprintf(buf2, 32, "%d seconds", dbg_tick/HZ); + lcd_puts(0, 2, buf2); + lcd_update(); +} + static int onplay_screen(char* dir, char* file) { bool exit = false; @@ -697,6 +731,12 @@ static int onplay_screen(char* dir, char* file) lcd_putsxy(0, LCD_HEIGHT/2 - h/2, ptr); lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true); + + ptr = "VBR Fix"; + lcd_getstringsize(ptr,&w,&h); + lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr); + lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow], + LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true); } lcd_update(); @@ -760,6 +800,12 @@ static int onplay_screen(char* dir, char* file) } break; + case BUTTON_DOWN: + case BUTTON_ON | BUTTON_DOWN: + do_xing(buf); +// exit = true; + break; + case BUTTON_PLAY: case BUTTON_ON | BUTTON_PLAY: { if (playing) |