diff options
| author | Dave Chapman <dave@dchapman.com> | 2007-05-07 11:09:45 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2007-05-07 11:09:45 +0000 |
| commit | 9a011f3a80e93c7a70f6f0397a07c74df84b7c5d (patch) | |
| tree | 0937c1b6b54c67c6b3bfbe83c27c2f467f361a94 /apps/codecs.c | |
| parent | c5ec5f2c727a40718bdc5691c079b280d3f6a1ad (diff) | |
| download | rockbox-9a011f3a80e93c7a70f6f0397a07c74df84b7c5d.zip rockbox-9a011f3a80e93c7a70f6f0397a07c74df84b7c5d.tar.gz rockbox-9a011f3a80e93c7a70f6f0397a07c74df84b7c5d.tar.bz2 rockbox-9a011f3a80e93c7a70f6f0397a07c74df84b7c5d.tar.xz | |
Clean up the codec API - remove all unused (and in many cases inappropriate) functions, move functions used only by encoders into the HAVE_RECORDING part of the API and document the reasons for the more unexpected functions being present.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13343 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs.c')
| -rw-r--r-- | apps/codecs.c | 114 |
1 files changed, 21 insertions, 93 deletions
diff --git a/apps/codecs.c b/apps/codecs.c index f5eb5db..ba9d739 100644 --- a/apps/codecs.c +++ b/apps/codecs.c @@ -91,121 +91,31 @@ struct codec_api ci = { NULL, /* set_offset */ NULL, /* configure */ - gui_syncsplash, - - /* file */ - (open_func)PREFIX(open), - close, - (read_func)read, - PREFIX(lseek), - (creat_func)PREFIX(creat), - (write_func)write, - PREFIX(remove), - PREFIX(rename), - PREFIX(ftruncate), - PREFIX(fsync), - fdprintf, - read_line, - settings_parseline, -#ifndef SIMULATOR - ata_sleep, -#endif - - /* dir */ - PREFIX(opendir), - PREFIX(closedir), - PREFIX(readdir), - PREFIX(mkdir), - /* kernel/ system */ PREFIX(sleep), yield, - ¤t_tick, - default_event_handler, - default_event_handler_ex, - create_thread, - remove_thread, - reset_poweroff_timer, -#ifndef SIMULATOR - system_memory_guard, - &cpu_frequency, -#ifdef HAVE_ADJUSTABLE_CPU_FREQ -#ifdef CPU_BOOST_LOGGING - cpu_boost_, -#else - cpu_boost, -#endif -#endif -#endif /* strings and memory */ - snprintf, strcpy, strncpy, strlen, - strrchr, strcmp, - strcasecmp, - strncasecmp, + strcat, memset, memcpy, memmove, - _ctype_, - atoi, - strchr, - strcat, memcmp, - strcasestr, memchr, - /* sound */ - sound_set, -#ifndef SIMULATOR - mp3_play_data, - mp3_play_pause, - mp3_play_stop, - mp3_is_playing, -#endif - - /* playback control */ - PREFIX(audio_play), - audio_stop, - audio_pause, - audio_resume, - audio_next, - audio_prev, - audio_ff_rewind, - audio_next_track, - playlist_amount, - audio_status, - audio_has_changed_track, - audio_current_track, - audio_flush_and_reload_tracks, - audio_get_file_pos, - - /* misc */ - srand, - rand, - (qsort_func)qsort, - kbd_input, - get_time, - set_time, - plugin_get_audio_buffer, - round_value_to_list32, - #if defined(DEBUG) || defined(SIMULATOR) debugf, #endif #ifdef ROCKBOX_HAS_LOGF logf, #endif + + (qsort_func)qsort, &global_settings, - mp3info, - count_mp3_frames, - create_xing_header, - find_next_frame, - battery_level, - battery_level_safe, #ifdef RB_PROFILE profile_thread, @@ -224,6 +134,24 @@ struct codec_api ci = { enc_pcm_buf_near_empty, enc_get_pcm_data, enc_unget_pcm_data, + + /* file */ + (open_func)PREFIX(open), + close, + (read_func)read, + PREFIX(lseek), + (write_func)write, + +#ifdef HAVE_ADJUSTABLE_CPU_FREQ +#ifdef CPU_BOOST_LOGGING + cpu_boost_, +#else + cpu_boost, +#endif +#endif + + round_value_to_list32, + #endif /* new stuff at the end, sort into place next time |