/* ** some function for MP4 file based on libmp4v2 from mpeg4ip project */ #include #include const char *mp4AudioNames[]= { "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", NULL }; const u_int8_t mp4AudioTypes[] = { MP4_MPEG4_AAC_MAIN_AUDIO_TYPE, MP4_MPEG4_AAC_LC_AUDIO_TYPE, MP4_MPEG4_AAC_SSR_AUDIO_TYPE, MP4_MPEG4_AAC_LTP_AUDIO_TYPE, MP4_MPEG4_AAC_SCALABLE_AUDIO_TYPE, MP4_MPEG4_CELP_AUDIO_TYPE, MP4_MPEG4_HVXC_AUDIO_TYPE, MP4_MPEG4_TTSI_AUDIO_TYPE, MP4_MPEG4_MAIN_SYNTHETIC_AUDIO_TYPE, MP4_MPEG4_WAVETABLE_AUDIO_TYPE, MP4_MPEG4_MIDI_AUDIO_TYPE, MP4_MPEG4_ALGORITHMIC_FX_AUDIO_TYPE, 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