summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--DEPS10
-rw-r--r--media/filters/ffmpeg_demuxer.cc8
-rw-r--r--media/filters/ffmpeg_demuxer_unittest.cc5
-rw-r--r--net/base/mime_util.cc85
-rw-r--r--net/base/mime_util.h22
-rw-r--r--net/base/mime_util_unittest.cc9
-rw-r--r--third_party/ffmpeg/ffmpeg.gyp24
-rw-r--r--third_party/ffmpeg/source/config/Chrome/linux/ia32/config.h4
-rw-r--r--third_party/ffmpeg/source/config/Chrome/linux/x64/config.h4
-rw-r--r--third_party/ffmpeg/source/config/Chrome/mac/ia32/config.h5
-rw-r--r--third_party/ffmpeg/source/config/Chrome/win/ia32/config.h6
-rw-r--r--third_party/ffmpeg/source/config/ChromeOS/linux/arm-neon/config.h4
-rw-r--r--third_party/ffmpeg/source/config/ChromeOS/linux/arm/config.h4
-rw-r--r--third_party/ffmpeg/source/config/ChromeOS/linux/ia32/config.h4
-rw-r--r--third_party/ffmpeg/source/config/ChromeOS/linux/x64/config.h4
-rw-r--r--third_party/ffmpeg/source/config/Chromium/linux/ia32/config.h5
-rw-r--r--third_party/ffmpeg/source/config/Chromium/linux/x64/config.h5
-rw-r--r--third_party/ffmpeg/source/config/Chromium/mac/ia32/config.h5
-rw-r--r--third_party/ffmpeg/source/config/Chromium/win/ia32/config.h6
-rw-r--r--third_party/ffmpeg/source/config/ChromiumOS/linux/arm-neon/config.h4
-rw-r--r--third_party/ffmpeg/source/config/ChromiumOS/linux/arm/config.h4
-rw-r--r--third_party/ffmpeg/source/config/ChromiumOS/linux/ia32/config.h4
-rw-r--r--third_party/ffmpeg/source/config/ChromiumOS/linux/x64/config.h4
-rw-r--r--webkit/glue/simple_webmimeregistry_impl.cc21
-rw-r--r--webkit/tools/test_shell/test_shell_webmimeregistry_impl.cc2
26 files changed, 242 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index f2ffa51..7580c30 100644
--- a/.gitignore
+++ b/.gitignore
@@ -62,6 +62,7 @@
/third_party/gles2_conform
/third_party/hunspell
/third_party/icu
+/third_party/libvpx
/third_party/lighttpd
/third_party/mingw-w64
/third_party/nss
diff --git a/DEPS b/DEPS
index b2ccc71..14d39e2 100644
--- a/DEPS
+++ b/DEPS
@@ -2,11 +2,12 @@ vars = {
"webkit_trunk":
"http://svn.webkit.org/repository/webkit/trunk",
"webkit_revision": "59772",
- "ffmpeg_revision": "46128",
+ "ffmpeg_revision": "47712",
"skia_revision": "562",
"chromium_git": "http://src.chromium.org/git",
"swig_revision": "40423",
"nacl_revision": "2235",
+ "libvpx_revision": "47701",
}
deps = {
@@ -142,6 +143,13 @@ deps = {
"/trunk/deps/third_party/ffmpeg/patched-ffmpeg-mt@" +
Var("ffmpeg_revision"),
+ "src/third_party/libvpx/include":
+ "/trunk/deps/third_party/libvpx/include@" +
+ Var("libvpx_revision"),
+ "src/third_party/libvpx/lib":
+ "/trunk/deps/third_party/libvpx/lib@" +
+ Var("libvpx_revision"),
+
"src/third_party/ppapi":
"http://ppapi.googlecode.com/svn/trunk@44",
}
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 154e565..5268c59 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -404,11 +404,19 @@ void FFmpegDemuxer::InitializeTask(DataSource* data_source,
// Create demuxer streams for all supported streams.
base::TimeDelta max_duration;
+ const bool kDemuxerIsWebm = !strcmp("webm", format_context_->iformat->name);
for (size_t i = 0; i < format_context_->nb_streams; ++i) {
AVCodecContext* codec_context = format_context_->streams[i]->codec;
CodecType codec_type = codec_context->codec_type;
if (codec_type == CODEC_TYPE_AUDIO || codec_type == CODEC_TYPE_VIDEO) {
AVStream* stream = format_context_->streams[i];
+ // WebM is currently strictly VP8 and Vorbis.
+ if (kDemuxerIsWebm && (stream->codec->codec_id != CODEC_ID_VP8 &&
+ stream->codec->codec_id != CODEC_ID_VORBIS)) {
+ packet_streams_.push_back(NULL);
+ continue;
+ }
+
FFmpegDemuxerStream* demuxer_stream
= new FFmpegDemuxerStream(this, stream);
diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
index 8c3cb6a..31d575f 100644
--- a/media/filters/ffmpeg_demuxer_unittest.cc
+++ b/media/filters/ffmpeg_demuxer_unittest.cc
@@ -79,6 +79,7 @@ class FFmpegDemuxerTest : public testing::Test {
// Initialize FFmpeg fixtures.
memset(&format_context_, 0, sizeof(format_context_));
+ memset(&input_format_, 0, sizeof(input_format_));
memset(&streams_, 0, sizeof(streams_));
memset(&codecs_, 0, sizeof(codecs_));
@@ -96,6 +97,9 @@ class FFmpegDemuxerTest : public testing::Test {
codecs_[AV_STREAM_AUDIO].channels = kChannels;
codecs_[AV_STREAM_AUDIO].sample_rate = kSampleRate;
+ input_format_.name = "foo";
+ format_context_.iformat = &input_format_;
+
// Initialize AVStream and AVFormatContext structures. We set the time base
// of the streams such that duration is reported in microseconds.
format_context_.nb_streams = AV_STREAM_MAX;
@@ -162,6 +166,7 @@ class FFmpegDemuxerTest : public testing::Test {
// FFmpeg fixtures.
AVFormatContext format_context_;
+ AVInputFormat input_format_;
AVCodecContext codecs_[AV_STREAM_MAX];
AVStream streams_[AV_STREAM_MAX];
MockFFmpeg mock_ffmpeg_;
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index 5d975e6..976aab2 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -1,7 +1,8 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <map>
#include <string>
#include "net/base/mime_util.h"
@@ -41,7 +42,12 @@ class MimeUtil : public PlatformMimeUtil {
bool AreSupportedMediaCodecs(const std::vector<std::string>& codecs) const;
void ParseCodecString(const std::string& codecs,
- std::vector<std::string>* codecs_out);
+ std::vector<std::string>* codecs_out,
+ bool strip);
+
+ bool IsStrictMediaMimeType(const std::string& mime_type) const;
+ bool IsSupportedStrictMediaMimeType(const std::string& mime_type,
+ const std::vector<std::string>& codecs) const;
private:
friend struct DefaultSingletonTraits<MimeUtil>;
@@ -59,6 +65,9 @@ class MimeUtil : public PlatformMimeUtil {
MimeMappings javascript_map_;
MimeMappings view_source_map_;
MimeMappings codecs_map_;
+
+ typedef std::map<std::string, base::hash_set<std::string> > StrictMappings;
+ StrictMappings strict_format_map_;
}; // class MimeUtil
struct MimeInfo {
@@ -78,6 +87,8 @@ static const MimeInfo primary_mappings[] = {
{ "audio/mp3", "mp3" },
{ "video/ogg", "ogv,ogm" },
{ "audio/ogg", "ogg,oga" },
+ { "video/webm", "webm" },
+ { "audio/webm", "webm" },
{ "application/xhtml+xml", "xhtml,xht" },
{ "application/x-chrome-extension", "crx" }
};
@@ -188,6 +199,8 @@ static const char* const supported_media_types[] = {
"video/ogg",
"audio/ogg",
"application/ogg",
+ "video/webm",
+ "audio/webm",
#if defined(GOOGLE_CHROME_BUILD) || defined(USE_PROPRIETARY_CODECS)
// MPEG-4.
@@ -214,6 +227,7 @@ static const char* const supported_media_codecs[] = {
#endif
"theora",
"vorbis",
+ "vp8"
};
// Note: does not include javascript types list (see supported_javascript_types)
@@ -277,6 +291,16 @@ static const char* const view_source_types[] = {
"image/svg+xml"
};
+struct MediaFormatStrict {
+ const char* mime_type;
+ const char* codecs_list;
+};
+
+static const MediaFormatStrict format_codec_mappings[] = {
+ { "video/webm", "vorbis,vp8,vp8.0" },
+ { "audio/webm", "vorbis" }
+};
+
void MimeUtil::InitializeMimeTypeMaps() {
for (size_t i = 0; i < arraysize(supported_image_types); ++i)
image_map_.insert(supported_image_types[i]);
@@ -301,6 +325,19 @@ void MimeUtil::InitializeMimeTypeMaps() {
for (size_t i = 0; i < arraysize(supported_media_codecs); ++i)
codecs_map_.insert(supported_media_codecs[i]);
+
+ // Initialize the strict supported media types.
+ for (size_t i = 0; i < arraysize(format_codec_mappings); ++i) {
+ std::vector<std::string> mime_type_codecs;
+ ParseCodecString(format_codec_mappings[i].codecs_list,
+ &mime_type_codecs,
+ false);
+
+ MimeMappings codecs;
+ for (size_t j = 0; j < mime_type_codecs.size(); ++j)
+ codecs.insert(mime_type_codecs[j]);
+ strict_format_map_[format_codec_mappings[i].mime_type] = codecs;
+ }
}
bool MimeUtil::IsSupportedImageMimeType(const char* mime_type) const {
@@ -378,12 +415,16 @@ bool MimeUtil::AreSupportedMediaCodecs(
}
void MimeUtil::ParseCodecString(const std::string& codecs,
- std::vector<std::string>* codecs_out) {
+ std::vector<std::string>* codecs_out,
+ bool strip) {
std::string no_quote_codecs;
TrimString(codecs, "\"", &no_quote_codecs);
SplitString(no_quote_codecs, ',', codecs_out);
- // Truncate each string at the '.'
+ if (!strip)
+ return;
+
+ // Strip everything past the first '.'
for (std::vector<std::string>::iterator it = codecs_out->begin();
it != codecs_out->end();
++it) {
@@ -393,6 +434,28 @@ void MimeUtil::ParseCodecString(const std::string& codecs,
}
}
+bool MimeUtil::IsStrictMediaMimeType(const std::string& mime_type) const {
+ if (strict_format_map_.find(mime_type) == strict_format_map_.end())
+ return false;
+ return true;
+}
+
+bool MimeUtil::IsSupportedStrictMediaMimeType(const std::string& mime_type,
+ const std::vector<std::string>& codecs) const {
+ StrictMappings::const_iterator it = strict_format_map_.find(mime_type);
+
+ if (it == strict_format_map_.end())
+ return false;
+
+ const MimeMappings strict_codecs_map = it->second;
+ for (size_t i = 0; i < codecs.size(); ++i) {
+ if (strict_codecs_map.find(codecs[i]) == strict_codecs_map.end()) {
+ return false;
+ }
+ }
+ return true;
+}
+
//----------------------------------------------------------------------------
// Wrappers for the singleton
//----------------------------------------------------------------------------
@@ -448,9 +511,19 @@ bool AreSupportedMediaCodecs(const std::vector<std::string>& codecs) {
return GetMimeUtil()->AreSupportedMediaCodecs(codecs);
}
+bool IsStrictMediaMimeType(const std::string& mime_type) {
+ return GetMimeUtil()->IsStrictMediaMimeType(mime_type);
+}
+
+bool IsSupportedStrictMediaMimeType(const std::string& mime_type,
+ const std::vector<std::string>& codecs) {
+ return GetMimeUtil()->IsSupportedStrictMediaMimeType(mime_type, codecs);
+}
+
void ParseCodecString(const std::string& codecs,
- std::vector<std::string>* codecs_out) {
- GetMimeUtil()->ParseCodecString(codecs, codecs_out);
+ std::vector<std::string>* codecs_out,
+ const bool strip) {
+ GetMimeUtil()->ParseCodecString(codecs, codecs_out, strip);
}
} // namespace net
diff --git a/net/base/mime_util.h b/net/base/mime_util.h
index 1846087..eebc2e8 100644
--- a/net/base/mime_util.h
+++ b/net/base/mime_util.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -50,11 +50,25 @@ bool MatchesMimeType(const std::string &mime_type_pattern,
bool AreSupportedMediaCodecs(const std::vector<std::string>& codecs);
// Parses a codec string, populating |codecs_out| with the prefix of each codec
-// in the string |codecs_in|. For example, passed "aaa.b.c,dd.eee", |codecs_out|
-// will contain {"aaa", "dd"}.
+// in the string |codecs_in|. For example, passed "aaa.b.c,dd.eee", if
+// |strip| == true |codecs_out| will contain {"aaa", "dd"}, if |strip| == false
+// |codecs_out| will contain {"aaa.b.c", "dd.eee"}.
// See http://www.ietf.org/rfc/rfc4281.txt.
void ParseCodecString(const std::string& codecs,
- std::vector<std::string>* codecs_out);
+ std::vector<std::string>* codecs_out,
+ bool strip);
+
+// Check to see if a particular MIME type is in our list which only supports a
+// certain subset of codecs.
+bool IsStrictMediaMimeType(const std::string& mime_type);
+
+// Check to see if a particular MIME type is in our list which only supports a
+// certain subset of codecs. Returns true if and only if all codecs are
+// supported for that specific MIME type, false otherwise. If this returns
+// false you will still need to check if the media MIME tpyes and codecs are
+// supported.
+bool IsSupportedStrictMediaMimeType(const std::string& mime_type,
+ const std::vector<std::string>& codecs);
} // namespace net
diff --git a/net/base/mime_util_unittest.cc b/net/base/mime_util_unittest.cc
index 0300da8..51b7f3a 100644
--- a/net/base/mime_util_unittest.cc
+++ b/net/base/mime_util_unittest.cc
@@ -118,10 +118,17 @@ TEST(MimeUtilTest, ParseCodecString) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
std::vector<std::string> codecs_out;
- net::ParseCodecString(tests[i].original, &codecs_out);
+ net::ParseCodecString(tests[i].original, &codecs_out, true);
EXPECT_EQ(tests[i].expected_size, codecs_out.size());
for (size_t j = 0; j < tests[i].expected_size; ++j) {
EXPECT_EQ(tests[i].results[j], codecs_out[j]);
}
}
+
+ // Test without stripping the codec type.
+ std::vector<std::string> codecs_out;
+ net::ParseCodecString("avc1.42E01E, mp4a.40.2", &codecs_out, false);
+ EXPECT_EQ(2u, codecs_out.size());
+ EXPECT_STREQ("avc1.42E01E", codecs_out[0].c_str());
+ EXPECT_STREQ("mp4a.40.2", codecs_out[1].c_str());
}
diff --git a/third_party/ffmpeg/ffmpeg.gyp b/third_party/ffmpeg/ffmpeg.gyp
index 9833911..bfe0b6f 100644
--- a/third_party/ffmpeg/ffmpeg.gyp
+++ b/third_party/ffmpeg/ffmpeg.gyp
@@ -56,6 +56,16 @@
['target_arch=="arm"', {
'ffmpeg_asm_lib': 0,
}],
+
+ # libvpx location.
+ # TODO(scherkus): libvpx_hack_dir is a hack to make -L work on linux.
+ ['OS=="mac" or OS=="win"', {
+ 'libvpx_dir': '../libvpx',
+ 'libvpx_hack_dir': '../libvpx',
+ }, {
+ 'libvpx_dir': '../libvpx',
+ 'libvpx_hack_dir': 'third_party/libvpx',
+ }],
],
'ffmpeg_variant%': '<(target_arch)',
@@ -86,6 +96,7 @@
'source/patched-ffmpeg-mt/libavcodec/golomb.c',
'source/patched-ffmpeg-mt/libavcodec/imgconvert.c',
'source/patched-ffmpeg-mt/libavcodec/jrevdct.c',
+ 'source/patched-ffmpeg-mt/libavcodec/libvpxdec.c',
'source/patched-ffmpeg-mt/libavcodec/mdct.c',
'source/patched-ffmpeg-mt/libavcodec/mpeg12data.c',
'source/patched-ffmpeg-mt/libavcodec/mpeg4audio.c',
@@ -109,6 +120,8 @@
'source/patched-ffmpeg-mt/libavformat/cutils.c',
'source/patched-ffmpeg-mt/libavformat/id3v1.c',
'source/patched-ffmpeg-mt/libavformat/isom.c',
+ 'source/patched-ffmpeg-mt/libavformat/matroska.c',
+ 'source/patched-ffmpeg-mt/libavformat/matroskadec.c',
'source/patched-ffmpeg-mt/libavformat/metadata.c',
'source/patched-ffmpeg-mt/libavformat/metadata_compat.c',
'source/patched-ffmpeg-mt/libavformat/oggdec.c',
@@ -117,12 +130,16 @@
'source/patched-ffmpeg-mt/libavformat/oggparsevorbis.c',
'source/patched-ffmpeg-mt/libavformat/options.c',
'source/patched-ffmpeg-mt/libavformat/riff.c',
+ 'source/patched-ffmpeg-mt/libavformat/rm.c',
+ 'source/patched-ffmpeg-mt/libavformat/rmdec.c',
'source/patched-ffmpeg-mt/libavformat/utils.c',
'source/patched-ffmpeg-mt/libavformat/vorbiscomment.c',
'source/patched-ffmpeg-mt/libavutil/avstring.c',
+ 'source/patched-ffmpeg-mt/libavutil/base64.c',
'source/patched-ffmpeg-mt/libavutil/crc.c',
'source/patched-ffmpeg-mt/libavutil/intfloat_readwrite.c',
'source/patched-ffmpeg-mt/libavutil/log.c',
+ 'source/patched-ffmpeg-mt/libavutil/lzo.c',
'source/patched-ffmpeg-mt/libavutil/mathematics.c',
'source/patched-ffmpeg-mt/libavutil/mem.c',
'source/patched-ffmpeg-mt/libavutil/pixdesc.c',
@@ -135,6 +152,7 @@
'source/config/<(ffmpeg_branding)/<(OS)/<(ffmpeg_config)',
'source/patched-ffmpeg-mt',
'source/config',
+ '<(libvpx_dir)/include',
],
'defines': [
'HAVE_AV_CONFIG_H',
@@ -364,9 +382,11 @@
'ldflags': [
'-Wl,-Bsymbolic',
'-L<(shared_generated_dir)',
+ '-L<(libvpx_hack_dir)/lib/<(OS)/<(target_arch)',
],
'libraries': [
'-lz',
+ '-lvpx',
],
'conditions': [
['ffmpeg_asm_lib==1', {
@@ -386,6 +406,7 @@
#
# http://code.google.com/p/gyp/issues/detail?id=108
'<(shared_generated_dir)/<(STATIC_LIB_PREFIX)<(asm_library)<(STATIC_LIB_SUFFIX)',
+ '<(libvpx_hack_dir)/lib/<(OS)/<(target_arch)/libvpx.a',
],
'link_settings': {
'libraries': [
@@ -413,7 +434,8 @@
# butterflies still exist...as do rainbows, sunshine,
# tulips, etc., etc...but not kittens. Those went away
# with this flag.
- '-Wl,-read_only_relocs,suppress'
+ '-Wl,-read_only_relocs,suppress',
+ '-L<(libvpx_hack_dir)/lib/mac/ia32'
],
},
}], # OS=="mac"
diff --git a/third_party/ffmpeg/source/config/Chrome/linux/ia32/config.h b/third_party/ffmpeg/source/config/Chrome/linux/ia32/config.h
index c6ccb6a..e3e2564 100644
--- a/third_party/ffmpeg/source/config/Chrome/linux/ia32/config.h
+++ b/third_party/ffmpeg/source/config/Chrome/linux/ia32/config.h
@@ -875,4 +875,8 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 1
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 1
+#define CONFIG_WEBM_MUXER 0
#endif /* FFMPEG_CONFIG_H */
diff --git a/third_party/ffmpeg/source/config/Chrome/linux/x64/config.h b/third_party/ffmpeg/source/config/Chrome/linux/x64/config.h
index 42d07df..a597b4d 100644
--- a/third_party/ffmpeg/source/config/Chrome/linux/x64/config.h
+++ b/third_party/ffmpeg/source/config/Chrome/linux/x64/config.h
@@ -875,4 +875,8 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 1
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 1
+#define CONFIG_WEBM_MUXER 0
#endif /* FFMPEG_CONFIG_H */
diff --git a/third_party/ffmpeg/source/config/Chrome/mac/ia32/config.h b/third_party/ffmpeg/source/config/Chrome/mac/ia32/config.h
index 9e1f891..d06c203 100644
--- a/third_party/ffmpeg/source/config/Chrome/mac/ia32/config.h
+++ b/third_party/ffmpeg/source/config/Chrome/mac/ia32/config.h
@@ -875,4 +875,9 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 1
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 1
+#define CONFIG_WEBM_MUXER 0
+
#endif /* FFMPEG_CONFIG_H */
diff --git a/third_party/ffmpeg/source/config/Chrome/win/ia32/config.h b/third_party/ffmpeg/source/config/Chrome/win/ia32/config.h
index e108ac2..45d650c 100644
--- a/third_party/ffmpeg/source/config/Chrome/win/ia32/config.h
+++ b/third_party/ffmpeg/source/config/Chrome/win/ia32/config.h
@@ -1,7 +1,7 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-#define FFMPEG_CONFIGURATION "--disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe --enable-shared --disable-static --disable-debug --disable-network --disable-encoders --disable-decoders --disable-hwaccels --disable-muxers --disable-demuxers --disable-parsers --disable-bsfs --disable-protocols --disable-devices --disable-filters --disable-gpl --disable-bzlib --disable-zlib --enable-decoder=theora --enable-decoder=vorbis --enable-demuxer=ogg --enable-decoder=aac --enable-decoder=h264 --enable-decoder=mp3 --enable-demuxer=mp3 --enable-demuxer=mov --enable-parser=mpegaudio --enable-pthreads --enable-yasm --enable-memalign-hack --cc=gcc-sjlj --prefix=./chrome-ffmpeg"
+#define FFMPEG_CONFIGURATION "--disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe --enable-shared --disable-static --disable-debug --disable-network --disable-encoders --disable-decoders --disable-hwaccels --disable-muxers --disable-demuxers --disable-parsers --disable-bsfs --disable-protocols --disable-devices --disable-filters --disable-gpl --disable-bzlib --disable-zlib --enable-decoder=theora --enable-decoder=vorbis --enable-demuxer=ogg --enable-decoder=aac --enable-decoder=h264 --enable-decoder=mp3 --enable-demuxer=mp3 --enable-demuxer=mov --enable-parser=mpegaudio --enable-decoder=libvpx_vp8 --enable-demuxer=webm --extra-cflags='-O2 -I/d/src/vp8/decode/include -fno-strict-aliasing' --extra-ldflags=-L/d/src/vp8/decode/lib --extra-libs=-lvpx --enable-pthreads --enable-yasm --enable-memalign-hack --cc=gcc-sjlj --prefix=./chrome-ffmpeg"
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
#define FFMPEG_DATADIR "./chrome-ffmpeg/share/ffmpeg"
#define CC_TYPE "gcc"
@@ -475,6 +475,7 @@
#define CONFIG_LIBOPENJPEG_DECODER 0
#define CONFIG_LIBSCHROEDINGER_DECODER 0
#define CONFIG_LIBSPEEX_DECODER 0
+#define CONFIG_LIBVPX_VP8_DECODER 1
#define CONFIG_ASV1_ENCODER 0
#define CONFIG_ASV2_ENCODER 0
#define CONFIG_BMP_ENCODER 0
@@ -573,6 +574,7 @@
#define CONFIG_LIBSCHROEDINGER_ENCODER 0
#define CONFIG_LIBTHEORA_ENCODER 0
#define CONFIG_LIBVORBIS_ENCODER 0
+#define CONFIG_LIBVPX_VP8_ENCODER 0
#define CONFIG_LIBX264_ENCODER 0
#define CONFIG_LIBXVID_ENCODER 0
#define CONFIG_H263_VAAPI_HWACCEL 0
@@ -744,6 +746,7 @@
#define CONFIG_W64_DEMUXER 0
#define CONFIG_WAV_DEMUXER 0
#define CONFIG_WC3_DEMUXER 0
+#define CONFIG_WEBM_DEMUXER 1
#define CONFIG_WSAUD_DEMUXER 0
#define CONFIG_WSVQA_DEMUXER 0
#define CONFIG_WV_DEMUXER 0
@@ -839,6 +842,7 @@
#define CONFIG_VC1T_MUXER 0
#define CONFIG_VOC_MUXER 0
#define CONFIG_WAV_MUXER 0
+#define CONFIG_WEBM_MUXER 0
#define CONFIG_YUV4MPEGPIPE_MUXER 0
#define CONFIG_LIBNUT_MUXER 0
#define CONFIG_ASPECT_FILTER 0
diff --git a/third_party/ffmpeg/source/config/ChromeOS/linux/arm-neon/config.h b/third_party/ffmpeg/source/config/ChromeOS/linux/arm-neon/config.h
index 4fcb2fd..021530a 100644
--- a/third_party/ffmpeg/source/config/ChromeOS/linux/arm-neon/config.h
+++ b/third_party/ffmpeg/source/config/ChromeOS/linux/arm-neon/config.h
@@ -875,4 +875,8 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 0
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 0
+#define CONFIG_WEBM_MUXER 0
#endif /* FFMPEG_CONFIG_H */
diff --git a/third_party/ffmpeg/source/config/ChromeOS/linux/arm/config.h b/third_party/ffmpeg/source/config/ChromeOS/linux/arm/config.h
index a140dd4..2f2cbe6 100644
--- a/third_party/ffmpeg/source/config/ChromeOS/linux/arm/config.h
+++ b/third_party/ffmpeg/source/config/ChromeOS/linux/arm/config.h
@@ -875,4 +875,8 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 0
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 0
+#define CONFIG_WEBM_MUXER 0
#endif /* FFMPEG_CONFIG_H */
diff --git a/third_party/ffmpeg/source/config/ChromeOS/linux/ia32/config.h b/third_party/ffmpeg/source/config/ChromeOS/linux/ia32/config.h
index 8f83c5b..005b6a4 100644
--- a/third_party/ffmpeg/source/config/ChromeOS/linux/ia32/config.h
+++ b/third_party/ffmpeg/source/config/ChromeOS/linux/ia32/config.h
@@ -875,4 +875,8 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 1
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 1
+#define CONFIG_WEBM_MUXER 0
#endif /* FFMPEG_CONFIG_H */
diff --git a/third_party/ffmpeg/source/config/ChromeOS/linux/x64/config.h b/third_party/ffmpeg/source/config/ChromeOS/linux/x64/config.h
index 93cbd4d..25b1e96 100644
--- a/third_party/ffmpeg/source/config/ChromeOS/linux/x64/config.h
+++ b/third_party/ffmpeg/source/config/ChromeOS/linux/x64/config.h
@@ -875,4 +875,8 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 1
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 1
+#define CONFIG_WEBM_MUXER 0
#endif /* FFMPEG_CONFIG_H */
diff --git a/third_party/ffmpeg/source/config/Chromium/linux/ia32/config.h b/third_party/ffmpeg/source/config/Chromium/linux/ia32/config.h
index 04623dc..22cdfdc 100644
--- a/third_party/ffmpeg/source/config/Chromium/linux/ia32/config.h
+++ b/third_party/ffmpeg/source/config/Chromium/linux/ia32/config.h
@@ -875,4 +875,9 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 1
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 1
+#define CONFIG_WEBM_MUXER 0
+#define CONFIG_H264DSP 1
#endif /* FFMPEG_CONFIG_H */
diff --git a/third_party/ffmpeg/source/config/Chromium/linux/x64/config.h b/third_party/ffmpeg/source/config/Chromium/linux/x64/config.h
index 97446ce..f0b3117 100644
--- a/third_party/ffmpeg/source/config/Chromium/linux/x64/config.h
+++ b/third_party/ffmpeg/source/config/Chromium/linux/x64/config.h
@@ -875,4 +875,9 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 1
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 1
+#define CONFIG_WEBM_MUXER 0
+#define CONFIG_H264DSP 1
#endif /* FFMPEG_CONFIG_H */
diff --git a/third_party/ffmpeg/source/config/Chromium/mac/ia32/config.h b/third_party/ffmpeg/source/config/Chromium/mac/ia32/config.h
index 9872409..7022a88 100644
--- a/third_party/ffmpeg/source/config/Chromium/mac/ia32/config.h
+++ b/third_party/ffmpeg/source/config/Chromium/mac/ia32/config.h
@@ -875,4 +875,9 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 1
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 1
+#define CONFIG_WEBM_MUXER 0
+
#endif /* FFMPEG_CONFIG_H */
diff --git a/third_party/ffmpeg/source/config/Chromium/win/ia32/config.h b/third_party/ffmpeg/source/config/Chromium/win/ia32/config.h
index 031c91b..7d9446a0 100644
--- a/third_party/ffmpeg/source/config/Chromium/win/ia32/config.h
+++ b/third_party/ffmpeg/source/config/Chromium/win/ia32/config.h
@@ -1,7 +1,7 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-#define FFMPEG_CONFIGURATION "--disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe --enable-shared --disable-static --disable-debug --disable-network --disable-encoders --disable-decoders --disable-hwaccels --disable-muxers --disable-demuxers --disable-parsers --disable-bsfs --disable-protocols --disable-devices --disable-filters --disable-gpl --disable-bzlib --disable-zlib --enable-decoder=theora --enable-decoder=vorbis --enable-demuxer=ogg --enable-pthreads --enable-yasm --enable-memalign-hack --cc=gcc-sjlj --prefix=./chromium-ffmpeg"
+#define FFMPEG_CONFIGURATION "--disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe --enable-shared --disable-static --disable-debug --disable-network --disable-encoders --disable-decoders --disable-hwaccels --disable-muxers --disable-demuxers --disable-parsers --disable-bsfs --disable-protocols --disable-devices --disable-filters --disable-gpl --disable-bzlib --disable-zlib --enable-decoder=theora --enable-decoder=vorbis --enable-demuxer=ogg --enable-decoder=libvpx_vp8 --enable-demuxer=webm --extra-cflags='-O2 -I/d/src/vp8/decode/include -fno-strict-aliasing' --extra-ldflags=-L/d/src/vp8/decode/lib --extra-libs=-lvpx --enable-pthreads --enable-yasm --enable-memalign-hack --cc=gcc-sjlj --prefix=./chromium-ffmpeg"
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
#define FFMPEG_DATADIR "./chromium-ffmpeg/share/ffmpeg"
#define CC_TYPE "gcc"
@@ -475,6 +475,7 @@
#define CONFIG_LIBOPENJPEG_DECODER 0
#define CONFIG_LIBSCHROEDINGER_DECODER 0
#define CONFIG_LIBSPEEX_DECODER 0
+#define CONFIG_LIBVPX_VP8_DECODER 1
#define CONFIG_ASV1_ENCODER 0
#define CONFIG_ASV2_ENCODER 0
#define CONFIG_BMP_ENCODER 0
@@ -573,6 +574,7 @@
#define CONFIG_LIBSCHROEDINGER_ENCODER 0
#define CONFIG_LIBTHEORA_ENCODER 0
#define CONFIG_LIBVORBIS_ENCODER 0
+#define CONFIG_LIBVPX_VP8_ENCODER 0
#define CONFIG_LIBX264_ENCODER 0
#define CONFIG_LIBXVID_ENCODER 0
#define CONFIG_H263_VAAPI_HWACCEL 0
@@ -744,6 +746,7 @@
#define CONFIG_W64_DEMUXER 0
#define CONFIG_WAV_DEMUXER 0
#define CONFIG_WC3_DEMUXER 0
+#define CONFIG_WEBM_DEMUXER 1
#define CONFIG_WSAUD_DEMUXER 0
#define CONFIG_WSVQA_DEMUXER 0
#define CONFIG_WV_DEMUXER 0
@@ -839,6 +842,7 @@
#define CONFIG_VC1T_MUXER 0
#define CONFIG_VOC_MUXER 0
#define CONFIG_WAV_MUXER 0
+#define CONFIG_WEBM_MUXER 0
#define CONFIG_YUV4MPEGPIPE_MUXER 0
#define CONFIG_LIBNUT_MUXER 0
#define CONFIG_ASPECT_FILTER 0
diff --git a/third_party/ffmpeg/source/config/ChromiumOS/linux/arm-neon/config.h b/third_party/ffmpeg/source/config/ChromiumOS/linux/arm-neon/config.h
index 4b8a597..f073571 100644
--- a/third_party/ffmpeg/source/config/ChromiumOS/linux/arm-neon/config.h
+++ b/third_party/ffmpeg/source/config/ChromiumOS/linux/arm-neon/config.h
@@ -875,4 +875,8 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 0
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 0
+#define CONFIG_WEBM_MUXER 0
#endif /* FFMPEG_CONFIG_H */
diff --git a/third_party/ffmpeg/source/config/ChromiumOS/linux/arm/config.h b/third_party/ffmpeg/source/config/ChromiumOS/linux/arm/config.h
index 5836710..5c2f64a 100644
--- a/third_party/ffmpeg/source/config/ChromiumOS/linux/arm/config.h
+++ b/third_party/ffmpeg/source/config/ChromiumOS/linux/arm/config.h
@@ -875,4 +875,8 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 0
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 0
+#define CONFIG_WEBM_MUXER 0
#endif /* FFMPEG_CONFIG_H */
diff --git a/third_party/ffmpeg/source/config/ChromiumOS/linux/ia32/config.h b/third_party/ffmpeg/source/config/ChromiumOS/linux/ia32/config.h
index 4b2b309..2815a02 100644
--- a/third_party/ffmpeg/source/config/ChromiumOS/linux/ia32/config.h
+++ b/third_party/ffmpeg/source/config/ChromiumOS/linux/ia32/config.h
@@ -875,4 +875,8 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 1
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 1
+#define CONFIG_WEBM_MUXER 0
#endif /* FFMPEG_CONFIG_H */
diff --git a/third_party/ffmpeg/source/config/ChromiumOS/linux/x64/config.h b/third_party/ffmpeg/source/config/ChromiumOS/linux/x64/config.h
index bbad8a9..c681085 100644
--- a/third_party/ffmpeg/source/config/ChromiumOS/linux/x64/config.h
+++ b/third_party/ffmpeg/source/config/ChromiumOS/linux/x64/config.h
@@ -875,4 +875,8 @@
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 0
+#define CONFIG_LIBVPX_VP8_DECODER 1
+#define CONFIG_LIBVPX_VP8_ENCODER 0
+#define CONFIG_WEBM_DEMUXER 1
+#define CONFIG_WEBM_MUXER 0
#endif /* FFMPEG_CONFIG_H */
diff --git a/webkit/glue/simple_webmimeregistry_impl.cc b/webkit/glue/simple_webmimeregistry_impl.cc
index f12f48b..5dd227f 100644
--- a/webkit/glue/simple_webmimeregistry_impl.cc
+++ b/webkit/glue/simple_webmimeregistry_impl.cc
@@ -54,9 +54,28 @@ WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsMediaMIMEType(
if (!net::IsSupportedMediaMimeType(ToASCIIOrEmpty(mime_type).c_str()))
return IsNotSupported;
+ // Check list of strict codecs to see if it is supported.
+ if (net::IsStrictMediaMimeType(ToASCIIOrEmpty(mime_type).c_str())) {
+ // We support the container, but no codecs were specified.
+ if (codecs.isNull())
+ return MayBeSupported;
+
+ // Check if the codecs are a perfect match.
+ std::vector<std::string> strict_codecs;
+ net::ParseCodecString(ToASCIIOrEmpty(codecs).c_str(),
+ &strict_codecs,
+ false);
+ if (!net::IsSupportedStrictMediaMimeType(ToASCIIOrEmpty(mime_type).c_str(),
+ strict_codecs))
+ return IsNotSupported;
+
+ // Good to go!
+ return IsSupported;
+ }
+
// If we don't recognize the codec, it's possible we support it.
std::vector<std::string> parsed_codecs;
- net::ParseCodecString(ToASCIIOrEmpty(codecs).c_str(), &parsed_codecs);
+ net::ParseCodecString(ToASCIIOrEmpty(codecs).c_str(), &parsed_codecs, true);
if (!net::AreSupportedMediaCodecs(parsed_codecs))
return MayBeSupported;
diff --git a/webkit/tools/test_shell/test_shell_webmimeregistry_impl.cc b/webkit/tools/test_shell/test_shell_webmimeregistry_impl.cc
index 0a53345..39419bd 100644
--- a/webkit/tools/test_shell/test_shell_webmimeregistry_impl.cc
+++ b/webkit/tools/test_shell/test_shell_webmimeregistry_impl.cc
@@ -41,7 +41,7 @@ TestShellWebMimeRegistryImpl::supportsMediaMIMEType(
// If we don't recognize the codec, it's possible we support it.
std::vector<std::string> parsed_codecs;
- net::ParseCodecString(ToASCIIOrEmpty(codecs).c_str(), &parsed_codecs);
+ net::ParseCodecString(ToASCIIOrEmpty(codecs).c_str(), &parsed_codecs, true);
if (!AreSupportedMediaCodecs(parsed_codecs))
return MayBeSupported;