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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 10534172: Implement ISO BMFF support in Media Source (try 2). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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/filters/ffmpeg_audio_decoder.cc » ('j') | media/mp4/track_run_iterator.cc » ('J')
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 2d47cc2c219b76ad948ab17b4f94ebd940765f6b..fcb36258bd520a246fa7733a376fc79d14195cba 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -11,6 +11,7 @@
#include "media/base/stream_parser_buffer.h"
#include "media/base/video_decoder_config.h"
#include "media/filters/chunk_demuxer_client.h"
+#include "media/mp4/mp4_stream_parser.h"
#include "media/webm/webm_stream_parser.h"
namespace media {
@@ -31,6 +32,11 @@ struct SupportedTypeInfo {
static const CodecInfo kVP8CodecInfo = { "vp8", DemuxerStream::VIDEO };
static const CodecInfo kVorbisCodecInfo = { "vorbis", DemuxerStream::AUDIO };
+// TODO(strobe): Perform matching against supported profiles and levels, or
+// simply accept codecs that match a prefix.
+static const CodecInfo kH264CodecInfo = { "avc1.4D4041", DemuxerStream::VIDEO };
+static const CodecInfo kAACCodecInfo = { "mp4a.40.2", DemuxerStream::AUDIO };
+
static const CodecInfo* kVideoWebMCodecs[] = {
&kVP8CodecInfo,
&kVorbisCodecInfo,
@@ -42,13 +48,30 @@ static const CodecInfo* kAudioWebMCodecs[] = {
NULL
};
+static const CodecInfo* kVideoMP4Codecs[] = {
+ &kH264CodecInfo,
+ &kAACCodecInfo,
+ NULL
+};
+
+static const CodecInfo* kAudioMP4Codecs[] = {
+ &kAACCodecInfo,
+ NULL
+};
+
static StreamParser* BuildWebMParser() {
return new WebMStreamParser();
}
+static StreamParser* BuildMP4Parser() {
+ return new mp4::MP4StreamParser();
+}
+
static const SupportedTypeInfo kSupportedTypeInfo[] = {
{ "video/webm", &BuildWebMParser, kVideoWebMCodecs },
{ "audio/webm", &BuildWebMParser, kAudioWebMCodecs },
+ { "video/mp4", &BuildMP4Parser, kVideoMP4Codecs },
+ { "audio/mp4", &BuildMP4Parser, kAudioMP4Codecs },
};
// Checks to see if the specified |type| and |codecs| list are supported.
« no previous file with comments | « no previous file | media/filters/ffmpeg_audio_decoder.cc » ('j') | media/mp4/track_run_iterator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698