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

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: Rebase on updates to webkit/media/filter_helpers.cc 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
« no previous file with comments | « media/media.gyp ('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 362810c10ff0559c82be9307a1c36d5b7d4dd5b8..b52adc07358eecea5c9765d3ff49b2513d1b2f71 100644
--- a/webkit/media/filter_helpers.cc
+++ b/webkit/media/filter_helpers.cc
@@ -5,12 +5,15 @@
#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/chunk_demuxer.h"
#include "media/filters/dummy_demuxer.h"
#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"
@@ -27,10 +30,18 @@ static void AddDefaultDecodersToCollection(
const scoped_refptr<base::MessageLoopProxy>& message_loop,
media::FilterCollection* filter_collection,
ProxyDecryptor* proxy_decryptor) {
+
scoped_refptr<media::FFmpegAudioDecoder> ffmpeg_audio_decoder =
new media::FFmpegAudioDecoder(message_loop);
filter_collection->GetAudioDecoders()->push_back(ffmpeg_audio_decoder);
+ const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ if (cmd_line->HasSwitch(switches::kEnableOpusPlayback)) {
+ scoped_refptr<media::OpusAudioDecoder> opus_audio_decoder =
+ new media::OpusAudioDecoder(message_loop);
+ filter_collection->GetAudioDecoders()->push_back(opus_audio_decoder);
+ }
+
scoped_refptr<media::FFmpegVideoDecoder> ffmpeg_video_decoder =
new media::FFmpegVideoDecoder(message_loop, proxy_decryptor);
filter_collection->GetVideoDecoders()->push_back(ffmpeg_video_decoder);
« no previous file with comments | « media/media.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698