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

Unified Diff: webkit/media/filter_helpers.cc

Issue 11416367: Add Opus decode wrapper to media. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 8 years 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
« net/base/mime_util.cc ('K') | « net/base/mime_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/filter_helpers.cc
diff --git a/webkit/media/filter_helpers.cc b/webkit/media/filter_helpers.cc
index 379e2caad4a2cf7c31ff5b2cd825a747c2e8fc61..e584f9c51b628a19bba9357f414b2400aef678fa 100644
--- a/webkit/media/filter_helpers.cc
+++ b/webkit/media/filter_helpers.cc
@@ -5,7 +5,9 @@
#include "webkit/media/filter_helpers.h"
#include "base/bind.h"
+#include "base/command_line.h"
#include "media/base/filter_collection.h"
+#include "media/base/media_switches.h"
#include "media/filters/decrypting_audio_decoder.h"
#include "media/filters/decrypting_video_decoder.h"
#include "media/filters/chunk_demuxer.h"
@@ -13,6 +15,7 @@
#include "media/filters/ffmpeg_audio_decoder.h"
#include "media/filters/ffmpeg_demuxer.h"
#include "media/filters/ffmpeg_video_decoder.h"
+#include "media/filters/opus_audio_decoder.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "webkit/media/crypto/proxy_decryptor.h"
#include "webkit/media/media_stream_client.h"
@@ -30,6 +33,14 @@ static void AddDefaultDecodersToCollection(
const scoped_refptr<base::MessageLoopProxy>& message_loop,
media::FilterCollection* filter_collection,
ProxyDecryptor* proxy_decryptor) {
+
+ const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ if (cmd_line->HasSwitch(switches::kEnableVp9OpusPlayback)) {
+ scoped_refptr<media::OpusAudioDecoder> opus_audio_decoder =
+ new media::OpusAudioDecoder(message_loop);
+ filter_collection->GetAudioDecoders()->push_back(opus_audio_decoder);
+ }
xhwang 2012/12/14 08:41:48 media pipeline tries each audio decoder in the ord
Tom Finegan 2012/12/14 20:21:34 Done.
+
scoped_refptr<media::FFmpegAudioDecoder> ffmpeg_audio_decoder =
new media::FFmpegAudioDecoder(message_loop);
filter_collection->GetAudioDecoders()->push_back(ffmpeg_audio_decoder);
« net/base/mime_util.cc ('K') | « net/base/mime_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698