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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 11819013: Add support for accepting MPEG2 AAC-LC bitstreams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and add MPEG2 AAC-LC test. Created 7 years, 11 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 | « no previous file | media/mp4/es_descriptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index 0df35513b490ee23f98e4c3eb3a6f3cef51a29a0..1f091c377acb288adf9788117f0425748b6c371d 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -17,6 +17,7 @@
#include "media/base/stream_parser_buffer.h"
#include "media/base/video_decoder_config.h"
#if defined(GOOGLE_CHROME_BUILD) || defined(USE_PROPRIETARY_CODECS)
+#include "media/mp4/es_descriptor.h"
#include "media/mp4/mp4_stream_parser.h"
#endif
#include "media/webm/webm_stream_parser.h"
@@ -59,16 +60,30 @@ static StreamParser* BuildWebMParser(const std::vector<std::string>& codecs) {
#if defined(GOOGLE_CHROME_BUILD) || defined(USE_PROPRIETARY_CODECS)
static const CodecInfo kH264CodecInfo = { "avc1.*", DemuxerStream::VIDEO };
-static const CodecInfo kAACCodecInfo = { "mp4a.40.*", DemuxerStream::AUDIO };
+static const CodecInfo kMPEG4AACLCCodecInfo = {
+ "mp4a.40.2", DemuxerStream::AUDIO
+};
+
+static const CodecInfo kMPEG4AACSBRCodecInfo = {
+ "mp4a.40.5", DemuxerStream::AUDIO
+};
+
+static const CodecInfo kMPEG2AACLCCodecInfo = {
+ "mp4a.67", DemuxerStream::AUDIO
+};
static const CodecInfo* kVideoMP4Codecs[] = {
&kH264CodecInfo,
- &kAACCodecInfo,
+ &kMPEG4AACLCCodecInfo,
+ &kMPEG4AACSBRCodecInfo,
+ &kMPEG2AACLCCodecInfo,
NULL
};
static const CodecInfo* kAudioMP4Codecs[] = {
- &kAACCodecInfo,
+ &kMPEG4AACLCCodecInfo,
+ &kMPEG4AACSBRCodecInfo,
+ &kMPEG2AACLCCodecInfo,
NULL
};
@@ -76,15 +91,22 @@ static const CodecInfo* kAudioMP4Codecs[] = {
static const char* kSBRCodecId = "mp4a.40.5";
static StreamParser* BuildMP4Parser(const std::vector<std::string>& codecs) {
+ std::set<int> audio_object_types;
bool has_sbr = false;
for (size_t i = 0; i < codecs.size(); ++i) {
+ if (MatchPattern(codecs[i], kMPEG2AACLCCodecInfo.pattern)) {
+ audio_object_types.insert(mp4::kISO_13818_7_AAC_LC);
+ } else {
+ audio_object_types.insert(mp4::kISO_14496_3);
+ }
+
if (codecs[i] == kSBRCodecId) {
has_sbr = true;
break;
}
}
- return new mp4::MP4StreamParser(has_sbr);
+ return new mp4::MP4StreamParser(audio_object_types, has_sbr);
}
#endif
« no previous file with comments | « no previous file | media/mp4/es_descriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698