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

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: fix build 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
« no previous file with comments | « media/cast/BUILD.gn ('k') | remoting/client/software_video_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4cbb769f0deb934153b96677e59599fbe6af9db8 100644
--- a/media/cast/sender/video_encoder_impl.cc
+++ b/media/cast/sender/video_encoder_impl.cc
@@ -12,13 +12,16 @@
#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 // !defined(MEDIA_DISABLE_LIBVPX)
namespace media {
namespace cast {
namespace {
+#if !defined(MEDIA_DISABLE_LIBVPX)
typedef base::Callback<void(Vp8Encoder*)> PassEncoderCallback;
void InitializeEncoderOnEncoderThread(
@@ -27,6 +30,7 @@ void InitializeEncoderOnEncoderThread(
DCHECK(environment->CurrentlyOn(CastEnvironment::VIDEO));
encoder->Initialize();
}
+#endif // !defined(MEDIA_DISABLE_LIBVPX)
void EncodeVideoFrameOnEncoderThread(
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 // !defined(MEDIA_DISABLE_LIBVPX)
#ifndef OFFICIAL_BUILD
} else if (video_config.codec == CODEC_VIDEO_FAKE) {
encoder_.reset(new FakeSoftwareVideoEncoder(video_config));
« no previous file with comments | « media/cast/BUILD.gn ('k') | remoting/client/software_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698