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

Unified Diff: media/cast/sender/video_encoder_impl.cc

Issue 501153003: Don't use libvpx if it is disabled in GN build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fake codec Created 6 years, 4 months 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
Index: media/cast/sender/video_encoder_impl.cc
diff --git a/media/cast/sender/video_encoder_impl.cc b/media/cast/sender/video_encoder_impl.cc
index d21649784edba25098608c0470636103ee66a62d..bf32c21580f78039d92d47db4addf7f07a7470f5 100644
--- a/media/cast/sender/video_encoder_impl.cc
+++ b/media/cast/sender/video_encoder_impl.cc
@@ -12,14 +12,18 @@
#include "media/base/video_frame.h"
#include "media/cast/cast_defines.h"
#include "media/cast/sender/fake_software_video_encoder.h"
+#if !defined(MEDIA_DISABLE_LIBVPX)
#include "media/cast/sender/vp8_encoder.h"
+#endif // if !defined(MEDIA_DISABLE_LIBVPX)
namespace media {
namespace cast {
namespace {
+#if !defined(MEDIA_DISABLE_LIBVPX)
typedef base::Callback<void(Vp8Encoder*)> PassEncoderCallback;
+#endif // if !defined(MEDIA_DISABLE_LIBVPX)
void InitializeEncoderOnEncoderThread(
const scoped_refptr<CastEnvironment>& environment,
@@ -70,12 +74,14 @@ VideoEncoderImpl::VideoEncoderImpl(
int max_unacked_frames)
: cast_environment_(cast_environment) {
if (video_config.codec == CODEC_VIDEO_VP8) {
+#if !defined(MEDIA_DISABLE_LIBVPX)
encoder_.reset(new Vp8Encoder(video_config, max_unacked_frames));
cast_environment_->PostTask(CastEnvironment::VIDEO,
FROM_HERE,
base::Bind(&InitializeEncoderOnEncoderThread,
cast_environment,
encoder_.get()));
+#endif // if !defined(MEDIA_DISABLE_LIBVPX)
#ifndef OFFICIAL_BUILD
} else if (video_config.codec == CODEC_VIDEO_FAKE) {
encoder_.reset(new FakeSoftwareVideoEncoder(video_config));

Powered by Google App Engine
This is Rietveld 408576698