1
0
Fork 0
forked from len0rd/rockbox

Change the naming scheme for codecs found in different containers.

Like changing AFMT_AAC to AFMT_MP4_AAC and AFMT_RAAC to AFMT_RM_AAC.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22066 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Mohamed Tarek 2009-07-27 12:13:22 +00:00
parent 320bd1adb8
commit 5f5d105755
6 changed files with 16 additions and 16 deletions

View file

@ -223,7 +223,7 @@ static bool read_chunk_stsd(qtmovie_t *qtmovie, size_t chunk_len)
/* remaining is codec data */ /* remaining is codec data */
if ((qtmovie->res->format==MAKEFOURCC('a','l','a','c'))) { if ((qtmovie->res->format==MAKEFOURCC('a','l','a','c'))) {
if (qtmovie->stream->ci->id3->codectype!=AFMT_ALAC) { if (qtmovie->stream->ci->id3->codectype!=AFMT_MP4_ALAC) {
return false; return false;
} }
@ -254,7 +254,7 @@ static bool read_chunk_stsd(qtmovie_t *qtmovie, size_t chunk_len)
stream_skip(qtmovie->stream, entry_remaining); stream_skip(qtmovie->stream, entry_remaining);
} else if (qtmovie->res->format==MAKEFOURCC('m','p','4','a')) { } else if (qtmovie->res->format==MAKEFOURCC('m','p','4','a')) {
if (qtmovie->stream->ci->id3->codectype!=AFMT_AAC) { if (qtmovie->stream->ci->id3->codectype!=AFMT_MP4_AAC) {
return false; return false;
} }

View file

@ -80,10 +80,10 @@ const struct afmt_entry audio_formats[AFMT_NUM_CODECS] =
[AFMT_WAVPACK] = [AFMT_WAVPACK] =
AFMT_ENTRY("WV", "wavpack", "wavpack_enc", "wv\0" ), AFMT_ENTRY("WV", "wavpack", "wavpack_enc", "wv\0" ),
/* Apple Lossless Audio Codec */ /* Apple Lossless Audio Codec */
[AFMT_ALAC] = [AFMT_MP4_ALAC] =
AFMT_ENTRY("ALAC", "alac", NULL, "m4a\0m4b\0" ), AFMT_ENTRY("ALAC", "alac", NULL, "m4a\0m4b\0" ),
/* Advanced Audio Coding in M4A container */ /* Advanced Audio Coding in M4A container */
[AFMT_AAC] = [AFMT_MP4_AAC] =
AFMT_ENTRY("AAC", "aac", NULL, "mp4\0" ), AFMT_ENTRY("AAC", "aac", NULL, "mp4\0" ),
/* Shorten */ /* Shorten */
[AFMT_SHN] = [AFMT_SHN] =
@ -116,10 +116,10 @@ const struct afmt_entry audio_formats[AFMT_NUM_CODECS] =
[AFMT_SAP] = [AFMT_SAP] =
AFMT_ENTRY("SAP", "asap", NULL, "sap\0" ), AFMT_ENTRY("SAP", "asap", NULL, "sap\0" ),
/* Cook in RM/RA */ /* Cook in RM/RA */
[AFMT_COOK] = [AFMT_RM_COOK] =
AFMT_ENTRY("Cook", "cook", NULL, "rm\0ra\0rmvb\0" ), AFMT_ENTRY("Cook", "cook", NULL, "rm\0ra\0rmvb\0" ),
/* AAC in RM/RA */ /* AAC in RM/RA */
[AFMT_RAAC] = [AFMT_RM_AAC] =
AFMT_ENTRY("RAAC", "raac", NULL, "rm\0ra\0rmvb\0" ), AFMT_ENTRY("RAAC", "raac", NULL, "rm\0ra\0rmvb\0" ),
#endif #endif
}; };
@ -296,8 +296,8 @@ bool get_metadata(struct mp3entry* id3, int fd, const char* trackname)
break; break;
case AFMT_ALAC: case AFMT_MP4_ALAC:
case AFMT_AAC: case AFMT_MP4_AAC:
if (!get_mp4_metadata(fd, id3)) if (!get_mp4_metadata(fd, id3))
{ {
return false; return false;
@ -379,7 +379,7 @@ bool get_metadata(struct mp3entry* id3, int fd, const char* trackname)
id3->genre_string = id3_get_num_genre(36); id3->genre_string = id3_get_num_genre(36);
break; break;
case AFMT_COOK: case AFMT_RM_COOK:
if (!get_rm_metadata(fd, id3)) if (!get_rm_metadata(fd, id3))
{ {
DEBUGF("get_rm_metadata error\n"); DEBUGF("get_rm_metadata error\n");

View file

@ -49,8 +49,8 @@ enum
AFMT_MPC, /* Musepack */ AFMT_MPC, /* Musepack */
AFMT_A52, /* A/52 (aka AC3) audio */ AFMT_A52, /* A/52 (aka AC3) audio */
AFMT_WAVPACK, /* WavPack */ AFMT_WAVPACK, /* WavPack */
AFMT_ALAC, /* Apple Lossless Audio Codec */ AFMT_MP4_ALAC, /* Apple Lossless Audio Codec */
AFMT_AAC, /* Advanced Audio Coding (AAC) in M4A container */ AFMT_MP4_AAC, /* Advanced Audio Coding (AAC) in M4A container */
AFMT_SHN, /* Shorten */ AFMT_SHN, /* Shorten */
AFMT_SID, /* SID File Format */ AFMT_SID, /* SID File Format */
AFMT_ADX, /* ADX File Format */ AFMT_ADX, /* ADX File Format */
@ -61,8 +61,8 @@ enum
AFMT_WMA, /* WMAV1/V2 in ASF */ AFMT_WMA, /* WMAV1/V2 in ASF */
AFMT_MOD, /* Amiga MOD File Format */ AFMT_MOD, /* Amiga MOD File Format */
AFMT_SAP, /* Amiga 8Bit SAP Format */ AFMT_SAP, /* Amiga 8Bit SAP Format */
AFMT_COOK, /* Cook in RM/RA */ AFMT_RM_COOK, /* Cook in RM/RA */
AFMT_RAAC, /* AAC in RM/RA */ AFMT_RM_AAC, /* AAC in RM/RA */
#endif #endif
/* add new formats at any index above this line to have a sensible order - /* add new formats at any index above this line to have a sensible order -

View file

@ -650,7 +650,7 @@ static bool read_mp4_container(int fd, struct mp3entry* id3,
{ {
uint32_t frequency; uint32_t frequency;
id3->codectype = (type == MP4_mp4a) ? AFMT_AAC : AFMT_ALAC; id3->codectype = (type == MP4_mp4a) ? AFMT_MP4_AAC : AFMT_MP4_ALAC;
lseek(fd, 22, SEEK_CUR); lseek(fd, 22, SEEK_CUR);
read_uint32be(fd, &frequency); read_uint32be(fd, &frequency);
size -= 26; size -= 26;

View file

@ -405,7 +405,7 @@ bool get_rm_metadata(int fd, struct mp3entry* id3)
/* Already set, do nothing */ /* Already set, do nothing */
break; break;
case aac: case aac:
id3->codectype = AFMT_RAAC; id3->codectype = AFMT_RM_AAC;
break; break;
} }

View file

@ -1941,7 +1941,7 @@ static void audio_finish_load_track(void)
case AFMT_FLAC: case AFMT_FLAC:
case AFMT_PCM_WAV: case AFMT_PCM_WAV:
case AFMT_A52: case AFMT_A52:
case AFMT_AAC: case AFMT_MP4_AAC:
case AFMT_MPC: case AFMT_MPC:
case AFMT_APE: case AFMT_APE:
case AFMT_WMA: case AFMT_WMA: