- //when MEDIA_MIMETYPE_CONTAINER_MPEG4
- //WTF, MPEG4Extractor.cpp can not extractor mov format
- //NOTE: isCompatibleBrand(MPEG4Extractor.cpp)
- // Won't promise that the following file types can be played.
- // Just give these file types a chance.
- // FOURCC('q', 't', ' ', ' '), // Apple's QuickTime
- //So......
- if (!strcmp(tag->value, "qt ")) {
- ALOGI("[mp4]format is mov, confidence should be larger than mpeg4");
- *confidence = 0.41f;
+ codec_id = getCodecId(ic, AVMEDIA_TYPE_VIDEO);
+ if (codec_id != AV_CODEC_ID_NONE
+ && codec_id != AV_CODEC_ID_H264
+ && codec_id != AV_CODEC_ID_MPEG4
+ && codec_id != AV_CODEC_ID_MPEG1VIDEO
+ && codec_id != AV_CODEC_ID_MPEG2VIDEO) {
+ //the MEDIA_MIMETYPE_CONTAINER_MPEG2TS of confidence is 0.25f
+ ALOGI("[mpeg2ps]video codec(%s), confidence should be larger than MPEG2PSExtractor",
+ avcodec_get_name(codec_id));
+ *confidence = 0.26f;
+ }
+
+ codec_id = getCodecId(ic, AVMEDIA_TYPE_AUDIO);
+ if (codec_id != AV_CODEC_ID_NONE
+ && codec_id != AV_CODEC_ID_AAC
+ && codec_id != AV_CODEC_ID_PCM_S16LE
+ && codec_id != AV_CODEC_ID_PCM_S24LE
+ && codec_id != AV_CODEC_ID_MP1
+ && codec_id != AV_CODEC_ID_MP2
+ && codec_id != AV_CODEC_ID_MP3) {
+ ALOGI("[mpeg2ps]audio codec(%s), confidence should be larger than MPEG2PSExtractor",
+ avcodec_get_name(codec_id));
+ *confidence = 0.26f;