forked from len0rd/rockbox
Move a function to gwps-common.c because it belongs there
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17084 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fef82552e1
commit
84dc8d2c7e
3 changed files with 14 additions and 15 deletions
|
@ -698,6 +698,15 @@ static void draw_player_fullbar(struct gui_wps *gwps, char* buf, int buf_size)
|
||||||
|
|
||||||
#endif /* HAVE_LCD_CHARCELL */
|
#endif /* HAVE_LCD_CHARCELL */
|
||||||
|
|
||||||
|
static char* get_codectype(const struct mp3entry* id3)
|
||||||
|
{
|
||||||
|
if (id3->codectype < AFMT_NUM_CODECS) {
|
||||||
|
return (char*)audio_formats[id3->codectype].label;
|
||||||
|
} else {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Extract a part from a path.
|
/* Extract a part from a path.
|
||||||
*
|
*
|
||||||
* buf - buffer extract part to.
|
* buf - buffer extract part to.
|
||||||
|
@ -983,7 +992,7 @@ static char *get_token_value(struct gui_wps *gwps,
|
||||||
else
|
else
|
||||||
*intval = id3->codectype;
|
*intval = id3->codectype;
|
||||||
}
|
}
|
||||||
return id3_get_codec(id3);
|
return get_codectype(id3);
|
||||||
|
|
||||||
case WPS_TOKEN_FILE_FREQUENCY:
|
case WPS_TOKEN_FILE_FREQUENCY:
|
||||||
snprintf(buf, buf_size, "%ld", id3->frequency);
|
snprintf(buf, buf_size, "%ld", id3->frequency);
|
||||||
|
|
|
@ -232,7 +232,6 @@ enum {
|
||||||
bool get_mp3_metadata(int fd, struct mp3entry *entry, const char *filename);
|
bool get_mp3_metadata(int fd, struct mp3entry *entry, const char *filename);
|
||||||
bool mp3info(struct mp3entry *entry, const char *filename);
|
bool mp3info(struct mp3entry *entry, const char *filename);
|
||||||
char* id3_get_num_genre(unsigned int genre_num);
|
char* id3_get_num_genre(unsigned int genre_num);
|
||||||
char* id3_get_codec(const struct mp3entry* id3);
|
|
||||||
int getid3v2len(int fd);
|
int getid3v2len(int fd);
|
||||||
void adjust_mp3entry(struct mp3entry *entry, void *dest, const void *orig);
|
void adjust_mp3entry(struct mp3entry *entry, void *dest, const void *orig);
|
||||||
void copy_mp3entry(struct mp3entry *dest, const struct mp3entry *orig);
|
void copy_mp3entry(struct mp3entry *dest, const struct mp3entry *orig);
|
||||||
|
|
|
@ -143,7 +143,7 @@ const int afmt_rec_format[AFMT_NUM_CODECS] =
|
||||||
#endif /* CONFIG_CODEC == SWCODEC && defined (HAVE_RECORDING) */
|
#endif /* CONFIG_CODEC == SWCODEC && defined (HAVE_RECORDING) */
|
||||||
/****/
|
/****/
|
||||||
|
|
||||||
unsigned long unsync(unsigned long b0,
|
static unsigned long unsync(unsigned long b0,
|
||||||
unsigned long b1,
|
unsigned long b1,
|
||||||
unsigned long b2,
|
unsigned long b2,
|
||||||
unsigned long b3)
|
unsigned long b3)
|
||||||
|
@ -199,15 +199,6 @@ static bool id3_is_genre_string(const char *string)
|
||||||
string <= genres[sizeof(genres)/sizeof(char*) - 1] );
|
string <= genres[sizeof(genres)/sizeof(char*) - 1] );
|
||||||
}
|
}
|
||||||
|
|
||||||
char* id3_get_codec(const struct mp3entry* id3)
|
|
||||||
{
|
|
||||||
if (id3->codectype < AFMT_NUM_CODECS) {
|
|
||||||
return (char*)audio_formats[id3->codectype].label;
|
|
||||||
} else {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
HOW TO ADD ADDITIONAL ID3 VERSION 2 TAGS
|
HOW TO ADD ADDITIONAL ID3 VERSION 2 TAGS
|
||||||
Code and comments by Thomas Paul Diffenbach
|
Code and comments by Thomas Paul Diffenbach
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue