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

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: 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..027d8e3906e88514d052049253ed9f9a39fd1676 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,6 +74,7 @@ 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,
@@ -81,6 +86,7 @@ VideoEncoderImpl::VideoEncoderImpl(
encoder_.reset(new FakeSoftwareVideoEncoder(video_config));
#endif
} else {
+#endif // if !defined(MEDIA_DISABLE_LIBVPX)
brettw 2014/08/26 03:14:21 Did you mean to wrap the fake one in this block as
Alpha Left Google 2014/08/26 17:58:22 Acknowledged.
DCHECK(false) << "Invalid config"; // Codec not supported.
}
« 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