Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Unified Diff: media/filters/stream_parser_factory.cc

Issue 2773793002: Allow mp3 audio codec for mpeg2ts containers in MSE (Closed)
Patch Set: CR feedback Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/formats/mp2t/mp2t_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/stream_parser_factory.cc
diff --git a/media/filters/stream_parser_factory.cc b/media/filters/stream_parser_factory.cc
index 0d71f2ac942807b315a5b98b0ccc36a68f97027d..26325f3d822b1ac198b414e3010de517d082c787 100644
--- a/media/filters/stream_parser_factory.cc
+++ b/media/filters/stream_parser_factory.cc
@@ -298,13 +298,23 @@ static StreamParser* BuildADTSParser(const std::vector<std::string>& codecs,
}
#if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER)
-static const CodecInfo* kVideoMP2TCodecs[] = {
- &kH264AVC1CodecInfo,
- &kH264AVC3CodecInfo,
- &kMPEG4AACCodecInfo,
- &kMPEG2AACLCCodecInfo,
- NULL
-};
+// These codec ids correspond to object types registered with MP4RA and are the
+// same as MP3 audio codec ids in media/base/mime_util_internal.cc.
+// From http://www.mp4ra.org/object.html:
+// 69 Audio ISO/IEC 13818-3
+// 6B Audio ISO/IEC 11172-3
+static const CodecInfo kMPEG2TS_MP3CodecInfo1 = {
+ "mp4a.69", CodecInfo::AUDIO, NULL, CodecInfo::HISTOGRAM_MP3};
+static const CodecInfo kMPEG2TS_MP3CodecInfo2 = {
+ "mp4a.6B", CodecInfo::AUDIO, NULL, CodecInfo::HISTOGRAM_MP3};
+
+static const CodecInfo* kVideoMP2TCodecs[] = {&kH264AVC1CodecInfo,
+ &kH264AVC3CodecInfo,
+ &kMPEG2TS_MP3CodecInfo1,
+ &kMPEG2TS_MP3CodecInfo2,
+ &kMPEG4AACCodecInfo,
+ &kMPEG2AACLCCodecInfo,
+ NULL};
static StreamParser* BuildMP2TParser(const std::vector<std::string>& codecs,
const scoped_refptr<MediaLog>& media_log) {
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/formats/mp2t/mp2t_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698