diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2010-05-17 12:34:05 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2010-05-17 12:34:05 +0000 |
commit | fcf36dd4f9879a82342e5606535d2dcf46d1de2a (patch) | |
tree | 21ed249c7a6f9d0bd7e2049c7a9f9e0708ba28f8 /apps/plugins/mpegplayer/mpeg_misc.h | |
parent | 9fde12676b382a31a10c58e2473edfde460e4d73 (diff) | |
download | rockbox-fcf36dd4f9879a82342e5606535d2dcf46d1de2a.tar.gz rockbox-fcf36dd4f9879a82342e5606535d2dcf46d1de2a.zip |
Simplify mpegplayer a bit and use array-based lists rather than linked lists for stream management. Move a couple useful functions to handle pointer arrays from kernel.c into general.c; mpeglayer now makes use of them.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26101 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/mpeg_misc.h')
-rw-r--r-- | apps/plugins/mpegplayer/mpeg_misc.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_misc.h b/apps/plugins/mpegplayer/mpeg_misc.h index 5f60193d52..c36f4faddc 100644 --- a/apps/plugins/mpegplayer/mpeg_misc.h +++ b/apps/plugins/mpegplayer/mpeg_misc.h | |||
@@ -202,4 +202,30 @@ uint32_t muldiv_uint32(uint32_t multiplicand, | |||
202 | uint32_t multiplier, | 202 | uint32_t multiplier, |
203 | uint32_t divisor); | 203 | uint32_t divisor); |
204 | 204 | ||
205 | |||
206 | /** Lists **/ | ||
207 | |||
208 | /* Does the list have any members? */ | ||
209 | bool list_is_empty(void **list); | ||
210 | |||
211 | /* Is the item inserted into a particular list? */ | ||
212 | bool list_is_member(void **list, void *item); | ||
213 | |||
214 | /* Removes an item from a list - returns true if item was found | ||
215 | * and thus removed. */ | ||
216 | bool list_remove_item(void **list, void *item); | ||
217 | |||
218 | /* Adds a list item, insert last, if not already present. */ | ||
219 | void list_add_item(void **list, void *item); | ||
220 | |||
221 | /* Clears the entire list. */ | ||
222 | void list_clear_all(void **list); | ||
223 | |||
224 | /* Enumerate all items in the array. */ | ||
225 | typedef bool (*list_enum_callback_t)(void *item, intptr_t data); | ||
226 | |||
227 | void list_enum_items(void **list, | ||
228 | list_enum_callback_t callback, | ||
229 | intptr_t data); | ||
230 | |||
205 | #endif /* MPEG_MISC_H */ | 231 | #endif /* MPEG_MISC_H */ |