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

Unified Diff: webrtc/media/base/videoframefactory.cc

Issue 1960073002: New method CreateScaledFrame in the VideoFrameFactory interface. Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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: webrtc/media/base/videoframefactory.cc
diff --git a/webrtc/media/base/videoframefactory.cc b/webrtc/media/base/videoframefactory.cc
index 23925bda56abefb096d71250f0531878478fc532..7bd77678fd3833d54b90ba9168c8e4ce0534f757 100644
--- a/webrtc/media/base/videoframefactory.cc
+++ b/webrtc/media/base/videoframefactory.cc
@@ -15,6 +15,16 @@
namespace cricket {
+// For backwards compatiblity, default implementation in terms of old methods.
+// TODO(nisse): Delete when Chrome's subclass is updated.
+std::unique_ptr<VideoFrame> VideoFrameFactory::CreateScaledFrame(
+ const CapturedFrame* input_frame,
+ int width,
+ int height) const {
+ return std::unique_ptr<VideoFrame>(CreateAliasedFrame(
+ input_frame, input_frame->width, input_frame->height, width, height));
+}
+
VideoFrame* VideoFrameFactory::CreateAliasedFrame(
const CapturedFrame* input_frame,
int cropped_input_width,

Powered by Google App Engine
This is Rietveld 408576698