diff options
author | Richard Quirk <richard.quirk@gmail.com> | 2012-12-09 21:04:17 +0100 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2013-01-02 08:29:38 +0100 |
commit | 212e7808d5f39e1d7fc1bd487de8f13c50d136f2 (patch) | |
tree | dc16ed3fc3a4857554e0d58d4a277d558eefab77 /apps/plugin.c | |
parent | 17181ecf30d2f7c73eba73309a35e770fab2c7ca (diff) | |
download | rockbox-212e7808d5f39e1d7fc1bd487de8f13c50d136f2.tar.gz rockbox-212e7808d5f39e1d7fc1bd487de8f13c50d136f2.zip |
Use crc32 of filename to resume tracks
As well as using an index, which breaks when a file is added or
removed, use the crc32 of the filename. When the crc32 check passes the
index is used directly. When it fails, the slow path is taken checking
each file name in the playlist until the right crc is found. If that fails
the playlist is started from the beginning.
See http://www.rockbox.org/tracker/6411
Bump plugin API and nvram version numbers
Change-Id: I156f61a9f1ac428b4a682bc680379cb6b60b1b10
Reviewed-on: http://gerrit.rockbox.org/372
Tested-by: Jonathan Gordon <rockbox@jdgordon.info>
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
Diffstat (limited to 'apps/plugin.c')
-rw-r--r-- | apps/plugin.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 9992d85620..24443b58d9 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -155,6 +155,9 @@ static const struct plugin_api rockbox_api = { | |||
155 | lcd_double_height, | 155 | lcd_double_height, |
156 | #else | 156 | #else |
157 | &lcd_static_framebuffer[0][0], | 157 | &lcd_static_framebuffer[0][0], |
158 | lcd_set_viewport, | ||
159 | lcd_set_framebuffer, | ||
160 | lcd_bmp_part, | ||
158 | lcd_update_rect, | 161 | lcd_update_rect, |
159 | lcd_set_drawmode, | 162 | lcd_set_drawmode, |
160 | lcd_get_drawmode, | 163 | lcd_get_drawmode, |
@@ -287,6 +290,7 @@ static const struct plugin_api rockbox_api = { | |||
287 | #ifdef HAVE_LCD_BITMAP | 290 | #ifdef HAVE_LCD_BITMAP |
288 | viewportmanager_theme_enable, | 291 | viewportmanager_theme_enable, |
289 | viewportmanager_theme_undo, | 292 | viewportmanager_theme_undo, |
293 | viewport_set_fullscreen, | ||
290 | #endif | 294 | #endif |
291 | 295 | ||
292 | /* list */ | 296 | /* list */ |
@@ -583,6 +587,7 @@ static const struct plugin_api rockbox_api = { | |||
583 | mixer_channel_stop, | 587 | mixer_channel_stop, |
584 | mixer_channel_set_amplitude, | 588 | mixer_channel_set_amplitude, |
585 | mixer_channel_get_bytes_waiting, | 589 | mixer_channel_get_bytes_waiting, |
590 | mixer_channel_set_buffer_hook, | ||
586 | 591 | ||
587 | system_sound_play, | 592 | system_sound_play, |
588 | keyclick_click, | 593 | keyclick_click, |
@@ -590,6 +595,7 @@ static const struct plugin_api rockbox_api = { | |||
590 | /* playback control */ | 595 | /* playback control */ |
591 | playlist_amount, | 596 | playlist_amount, |
592 | playlist_resume, | 597 | playlist_resume, |
598 | playlist_resume_track, | ||
593 | playlist_start, | 599 | playlist_start, |
594 | playlist_add, | 600 | playlist_add, |
595 | playlist_sync, | 601 | playlist_sync, |
@@ -792,14 +798,6 @@ static const struct plugin_api rockbox_api = { | |||
792 | /* new stuff at the end, sort into place next time | 798 | /* new stuff at the end, sort into place next time |
793 | the API gets incompatible */ | 799 | the API gets incompatible */ |
794 | 800 | ||
795 | #ifdef HAVE_LCD_BITMAP | ||
796 | #if CONFIG_CODEC == SWCODEC | ||
797 | mixer_channel_set_buffer_hook, | ||
798 | #endif | ||
799 | lcd_set_viewport, | ||
800 | viewport_set_fullscreen, | ||
801 | lcd_set_framebuffer, | ||
802 | #endif | ||
803 | }; | 801 | }; |
804 | 802 | ||
805 | int plugin_load(const char* plugin, const void* parameter) | 803 | int plugin_load(const char* plugin, const void* parameter) |