Index: media/filters/default_renderer_factory.cc |
diff --git a/media/filters/default_renderer_factory.cc b/media/filters/default_renderer_factory.cc |
index b9f95d4f9b7b1afe9248b60f93f36db55393ad68..bc7698771e3810e76dc3cec9250e6f7de0880ef7 100644 |
--- a/media/filters/default_renderer_factory.cc |
+++ b/media/filters/default_renderer_factory.cc |
@@ -7,23 +7,29 @@ |
#include "base/bind.h" |
#include "base/single_thread_task_runner.h" |
#include "media/filters/audio_renderer_impl.h" |
+#ifndef MEDIA_DISABLE_FFMPEG |
xhwang
2015/01/07 17:12:30
Here and below, s/ifndef/if !defined/, which is wh
Mostyn Bramley-Moore
2015/01/07 19:29:53
Done.
|
#include "media/filters/ffmpeg_audio_decoder.h" |
#include "media/filters/ffmpeg_video_decoder.h" |
+#endif // !MEDIA_DISABLE_FFMPEG |
#include "media/filters/gpu_video_accelerator_factories.h" |
#include "media/filters/gpu_video_decoder.h" |
#include "media/filters/opus_audio_decoder.h" |
#include "media/filters/renderer_impl.h" |
#include "media/filters/video_renderer_impl.h" |
+#ifndef MEDIA_DISABLE_LIBVPX |
#include "media/filters/vpx_video_decoder.h" |
+#endif // !MEDIA_DISABLE_LIBVPX |
namespace media { |
+#ifndef MEDIA_DISABLE_FFMPEG |
// TODO(xhwang): We are abusing CreateMediaSourceErrorEvent() in a lot of places |
// that are not MediaSource related. Fix this in a separate CL. |
static void LogError(const scoped_refptr<MediaLog>& media_log, |
const std::string& error) { |
media_log->AddEvent(media_log->CreateMediaSourceErrorEvent(error)); |
} |
+#endif // !MEDIA_DISABLE_FFMPEG |
DefaultRendererFactory::DefaultRendererFactory( |
const scoped_refptr<MediaLog>& media_log, |
@@ -46,8 +52,11 @@ scoped_ptr<Renderer> DefaultRendererFactory::CreateRenderer( |
// Create our audio decoders and renderer. |
ScopedVector<AudioDecoder> audio_decoders; |
+#ifndef MEDIA_DISABLE_FFMPEG |
audio_decoders.push_back(new FFmpegAudioDecoder( |
media_task_runner, base::Bind(&LogError, media_log_))); |
+#endif // !MEDIA_DISABLE_FFMPEG |
+ |
audio_decoders.push_back(new OpusAudioDecoder(media_task_runner)); |
scoped_ptr<AudioRenderer> audio_renderer(new AudioRendererImpl( |
@@ -70,7 +79,9 @@ scoped_ptr<Renderer> DefaultRendererFactory::CreateRenderer( |
video_decoders.push_back(new VpxVideoDecoder(media_task_runner)); |
#endif // !defined(MEDIA_DISABLE_LIBVPX) |
+#ifndef MEDIA_DISABLE_FFMPEG |
video_decoders.push_back(new FFmpegVideoDecoder(media_task_runner)); |
+#endif // !MEDIA_DISABLE_FFMPEG |
scoped_ptr<VideoRenderer> video_renderer(new VideoRendererImpl( |
media_task_runner, video_decoders.Pass(), true, media_log_)); |