| Index: webrtc/media/base/videoframefactory.h
|
| diff --git a/webrtc/media/base/videoframefactory.h b/webrtc/media/base/videoframefactory.h
|
| index 6aa2ce51733b0c01ea8d5187ace63865a2d32571..7e8eeaf3c8f6ccebe5f84e8ce93dc9f9bb47503a 100644
|
| --- a/webrtc/media/base/videoframefactory.h
|
| +++ b/webrtc/media/base/videoframefactory.h
|
| @@ -27,6 +27,20 @@ class VideoFrameFactory {
|
| VideoFrameFactory() : apply_rotation_(false) {}
|
| virtual ~VideoFrameFactory() {}
|
|
|
| + // Convert a CapturedFrame to a VideoFrame. |width| and |height|
|
| + // give the desired size, and the factory is expected to first crop
|
| + // the frame to get a matching aspect ratio, and then scale it to
|
| + // the right size. The size refers the the image before application
|
| + // of |input_frame->rotation|.
|
| + virtual std::unique_ptr<VideoFrame> CreateScaledFrame(
|
| + const CapturedFrame* input_frame,
|
| + int width,
|
| + int height) const;
|
| +
|
| + // The CreateAliasedFrame methods are deprecated, since cropping is
|
| + // no longer supported, and we don't want raw pointer return types.
|
| + // TODO(nisse): Delete when all users are updated.
|
| +
|
| // The returned frame aliases the aliased_frame if the input color
|
| // space allows for aliasing, otherwise a color conversion will
|
| // occur. Returns NULL if conversion fails.
|
| @@ -35,8 +49,11 @@ class VideoFrameFactory {
|
| // size |cropped_width| x |cropped_height|.
|
| virtual VideoFrame* CreateAliasedFrame(const CapturedFrame* input_frame,
|
| int cropped_width,
|
| - int cropped_height) const = 0;
|
| -
|
| + int cropped_height) const {
|
| + // Dummy default implementation, to make it easier to delete in
|
| + // subclasses.
|
| + return NULL;
|
| + }
|
| // The returned frame will be a center crop of |input_frame| with size
|
| // |cropped_width| x |cropped_height|, scaled to |output_width| x
|
| // |output_height|.
|
|
|