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.h | |
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.h')
-rw-r--r-- | apps/plugin.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index b34a5cf0de..cc00b9c60e 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -207,6 +207,10 @@ struct plugin_api { | |||
207 | void (*lcd_double_height)(bool on); | 207 | void (*lcd_double_height)(bool on); |
208 | #else /* HAVE_LCD_BITMAP */ | 208 | #else /* HAVE_LCD_BITMAP */ |
209 | fb_data* lcd_framebuffer; | 209 | fb_data* lcd_framebuffer; |
210 | void (*lcd_set_viewport)(struct viewport* vp); | ||
211 | void (*lcd_set_framebuffer)(fb_data *fb); | ||
212 | void (*lcd_bmp_part)(const struct bitmap *bm, int src_x, int src_y, | ||
213 | int x, int y, int width, int height); | ||
210 | void (*lcd_update_rect)(int x, int y, int width, int height); | 214 | void (*lcd_update_rect)(int x, int y, int width, int height); |
211 | void (*lcd_set_drawmode)(int mode); | 215 | void (*lcd_set_drawmode)(int mode); |
212 | int (*lcd_get_drawmode)(void); | 216 | int (*lcd_get_drawmode)(void); |
@@ -372,6 +376,8 @@ struct plugin_api { | |||
372 | void (*viewportmanager_theme_enable)(enum screen_type screen, bool enable, | 376 | void (*viewportmanager_theme_enable)(enum screen_type screen, bool enable, |
373 | struct viewport *viewport); | 377 | struct viewport *viewport); |
374 | void (*viewportmanager_theme_undo)(enum screen_type screen, bool force_redraw); | 378 | void (*viewportmanager_theme_undo)(enum screen_type screen, bool force_redraw); |
379 | void (*viewport_set_fullscreen)(struct viewport *vp, | ||
380 | const enum screen_type screen); | ||
375 | #endif | 381 | #endif |
376 | /* list */ | 382 | /* list */ |
377 | void (*gui_synclist_init)(struct gui_synclist * lists, | 383 | void (*gui_synclist_init)(struct gui_synclist * lists, |
@@ -707,6 +713,8 @@ struct plugin_api { | |||
707 | void (*mixer_channel_set_amplitude)(enum pcm_mixer_channel channel, | 713 | void (*mixer_channel_set_amplitude)(enum pcm_mixer_channel channel, |
708 | unsigned int amplitude); | 714 | unsigned int amplitude); |
709 | size_t (*mixer_channel_get_bytes_waiting)(enum pcm_mixer_channel channel); | 715 | size_t (*mixer_channel_get_bytes_waiting)(enum pcm_mixer_channel channel); |
716 | void (*mixer_channel_set_buffer_hook)(enum pcm_mixer_channel channel, | ||
717 | chan_buffer_hook_fn_type fn); | ||
710 | 718 | ||
711 | void (*system_sound_play)(enum system_sound sound); | 719 | void (*system_sound_play)(enum system_sound sound); |
712 | void (*keyclick_click)(bool rawbutton, int action); | 720 | void (*keyclick_click)(bool rawbutton, int action); |
@@ -715,6 +723,7 @@ struct plugin_api { | |||
715 | /* playback control */ | 723 | /* playback control */ |
716 | int (*playlist_amount)(void); | 724 | int (*playlist_amount)(void); |
717 | int (*playlist_resume)(void); | 725 | int (*playlist_resume)(void); |
726 | void (*playlist_resume_track)(int start_index, unsigned int crc, int offset); | ||
718 | void (*playlist_start)(int start_index, int offset); | 727 | void (*playlist_start)(int start_index, int offset); |
719 | int (*playlist_add)(const char *filename); | 728 | int (*playlist_add)(const char *filename); |
720 | void (*playlist_sync)(struct playlist_info* playlist); | 729 | void (*playlist_sync)(struct playlist_info* playlist); |
@@ -961,16 +970,6 @@ struct plugin_api { | |||
961 | /* new stuff at the end, sort into place next time | 970 | /* new stuff at the end, sort into place next time |
962 | the API gets incompatible */ | 971 | the API gets incompatible */ |
963 | 972 | ||
964 | #ifdef HAVE_LCD_BITMAP | ||
965 | #if CONFIG_CODEC == SWCODEC | ||
966 | void (*mixer_channel_set_buffer_hook)(enum pcm_mixer_channel channel, | ||
967 | chan_buffer_hook_fn_type fn); | ||
968 | #endif | ||
969 | void (*lcd_set_viewport)(struct viewport* vp); | ||
970 | void (*viewport_set_fullscreen)(struct viewport *vp, | ||
971 | const enum screen_type screen); | ||
972 | void (*lcd_set_framebuffer)(fb_data *fb); | ||
973 | #endif | ||
974 | }; | 973 | }; |
975 | 974 | ||
976 | /* plugin header */ | 975 | /* plugin header */ |