/* ** some function for MP4 file based on libmp4v2 from mpeg4ip project */ #include #include const char *mp4AudioNames[]= { "MPEG-1 Audio Layers 1,2 or 3", "MPEG-2 low biterate (MPEG-1 extension) - MP3", "MPEG-2 AAC Main Profile", "MPEG-2 AAC Low Complexity profile", "MPEG-2 AAC SSR profile", "MPEG-4 audio (MPEG-4 AAC)", 0 }; const u_int8_t mp4AudioTypes[] = { MP4_MPEG1_AUDIO_TYPE, // 0x6B MP4_MPEG2_AUDIO_TYPE, // 0x69 MP4_MPEG2_AAC_MAIN_AUDIO_TYPE, // 0x66 MP4_MPEG2_AAC_LC_AUDIO_TYPE, // 0x67 MP4_MPEG2_AAC_SSR_AUDIO_TYPE, // 0x68 MP4_MPEG4_AUDIO_TYPE, // 0x40 0 }; /* MPEG-4 Audio types from 14496-3 Table 1.5.1 (from mp4.h)*/ const char *mpeg4AudioNames[]= { "!!!!MPEG-4 Audio track Invalid !!!!!!!", "MPEG-4 AAC Main profile", "MPEG-4 AAC Low Complexity profile", "MPEG-4 AAC SSR profile", "MPEG-4 AAC Long Term Prediction profile", "MPEG-4 AAC Scalable", "MPEG-4 CELP", "MPEG-4 HVXC", "MPEG-4 Text To Speech", "MPEG-4 Main Synthetic profile", "MPEG-4 Wavetable Synthesis profile", "MPEG-4 MIDI Profile", "MPEG-4 Algorithmic Synthesis and Audio FX profile" }; int getAACTrack(MP4FileHandle file) { int numTracks = MP4GetNumberOfTracks(file, NULL, 0); int i=0; for(i=0;i