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

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

Issue 906403006: [Cast] Size-Adaptable platform video encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed hubbe's comments. Created 5 years, 10 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/sender/video_encoder_impl.h ('k') | media/cast/sender/video_encoder_impl_unittest.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 a2b0da9075253213ac1396224fd15b4b9f41f9eb..84f700e2cf9eb3edf7b47cf9822120504c81747f 100644
--- a/media/cast/sender/video_encoder_impl.cc
+++ b/media/cast/sender/video_encoder_impl.cc
@@ -52,6 +52,15 @@ void EncodeVideoFrameOnEncoderThread(
}
} // namespace
+// static
+bool VideoEncoderImpl::IsSupported(const VideoSenderConfig& video_config) {
+#ifndef OFFICIAL_BUILD
+ if (video_config.codec == CODEC_VIDEO_FAKE)
+ return true;
+#endif
+ return video_config.codec == CODEC_VIDEO_VP8;
+}
+
VideoEncoderImpl::VideoEncoderImpl(
scoped_refptr<CastEnvironment> cast_environment,
const VideoSenderConfig& video_config,
@@ -98,12 +107,6 @@ VideoEncoderImpl::~VideoEncoderImpl() {
}
}
-bool VideoEncoderImpl::CanEncodeVariedFrameSizes() const {
- // Both the VP8Encoder and FakeSoftwareVideoEncoder support calls to
- // EncodeVideoFrame() with different frame sizes.
- return true;
-}
-
bool VideoEncoderImpl::EncodeVideoFrame(
const scoped_refptr<media::VideoFrame>& video_frame,
const base::TimeTicks& reference_time,
« no previous file with comments | « media/cast/sender/video_encoder_impl.h ('k') | media/cast/sender/video_encoder_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698