summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2003-03-10 18:05:01 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2003-03-10 18:05:01 +0000
commit6475aa0c85fcca7a37a7aa4316173270fcb6d038 (patch)
treee6dbe18217113212a9b8e713d3325c5803b3f4a6 /apps
parent673937d65402b058b5b5bfa5a1bf990c2d218dba (diff)
downloadrockbox-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.c46
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)
653} 653}
654 654
655#ifdef HAVE_LCD_BITMAP 655#ifdef HAVE_LCD_BITMAP
656extern int d_1;
657extern int d_2;
658
659void xingupdate(int percent)
660{
661 char buf[32];
662
663 snprintf(buf, 32, "%d%%", percent);
664 lcd_puts(0, 3, buf);
665 snprintf(buf, 32, "%x", d_1);
666 lcd_puts(0, 4, buf);
667 snprintf(buf, 32, "%x", d_2);
668 lcd_puts(0, 5, buf);
669 lcd_update();
670}
671
672void do_xing(char *filename)
673{
674 char buf2[32];
675 unsigned long dbg_tick;
676
677 lcd_clear_display();
678 lcd_puts(0, 0, filename);
679 lcd_update();
680 dbg_tick = current_tick;
681 mpeg_create_xing_header(filename, xingupdate);
682 dbg_tick = current_tick - dbg_tick;
683 snprintf(buf2, 32, "%d ticks", dbg_tick);
684 lcd_puts(0, 1, buf2);
685 snprintf(buf2, 32, "%d seconds", dbg_tick/HZ);
686 lcd_puts(0, 2, buf2);
687 lcd_update();
688}
689
656static int onplay_screen(char* dir, char* file) 690static int onplay_screen(char* dir, char* file)
657{ 691{
658 bool exit = false; 692 bool exit = false;
@@ -697,6 +731,12 @@ static int onplay_screen(char* dir, char* file)
697 lcd_putsxy(0, LCD_HEIGHT/2 - h/2, ptr); 731 lcd_putsxy(0, LCD_HEIGHT/2 - h/2, ptr);
698 lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], 732 lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
699 LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true); 733 LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true);
734
735 ptr = "VBR Fix";
736 lcd_getstringsize(ptr,&w,&h);
737 lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr);
738 lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
739 LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true);
700 } 740 }
701 lcd_update(); 741 lcd_update();
702 742
@@ -760,6 +800,12 @@ static int onplay_screen(char* dir, char* file)
760 } 800 }
761 break; 801 break;
762 802
803 case BUTTON_DOWN:
804 case BUTTON_ON | BUTTON_DOWN:
805 do_xing(buf);
806// exit = true;
807 break;
808
763 case BUTTON_PLAY: 809 case BUTTON_PLAY:
764 case BUTTON_ON | BUTTON_PLAY: { 810 case BUTTON_ON | BUTTON_PLAY: {
765 if (playing) 811 if (playing)