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

Unified Diff: content/renderer/pepper/video_decoder_shim.cc

Issue 1415793003: fix build when ffmpeg, libvpx and libwebm are disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « content/renderer/media/media_recorder_handler.cc ('k') | media/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/video_decoder_shim.cc
diff --git a/content/renderer/pepper/video_decoder_shim.cc b/content/renderer/pepper/video_decoder_shim.cc
index ae191272e7e399b105251b18871567ee7d5d908e..8efb3d80c9831b61c0b2918449e5252315a33847 100644
--- a/content/renderer/pepper/video_decoder_shim.cc
+++ b/content/renderer/pepper/video_decoder_shim.cc
@@ -49,7 +49,11 @@ bool IsCodecSupported(media::VideoCodec codec) {
return true;
#endif
+#if !defined(MEDIA_DISABLE_FFMPEG) && !defined(DISABLE_FFMPEG_VIDEO_DECODERS)
return media::FFmpegVideoDecoder::IsCodecSupported(codec);
+#else
+ return false;
+#endif
}
} // namespace
@@ -689,12 +693,18 @@ void VideoDecoderShim::DecoderImpl::Initialize(
new media::VpxVideoDecoder(base::ThreadTaskRunnerHandle::Get()));
} else
#endif
+
+#if !defined(MEDIA_DISABLE_FFMPEG) && !defined(DISABLE_FFMPEG_VIDEO_DECODERS)
{
scoped_ptr<media::FFmpegVideoDecoder> ffmpeg_video_decoder(
new media::FFmpegVideoDecoder(base::ThreadTaskRunnerHandle::Get()));
ffmpeg_video_decoder->set_decode_nalus(true);
decoder_ = ffmpeg_video_decoder.Pass();
}
+#elif defined(MEDIA_DISABLE_LIBVPX)
+ OnInitDone(false);
+ return;
+#endif
// VpxVideoDecoder and FFmpegVideoDecoder support only one pending Decode()
// request.
« no previous file with comments | « content/renderer/media/media_recorder_handler.cc ('k') | media/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698