Delete AndroidVideoCapturer::FrameFactory.
Splits VideoCapturer::OnFrameCaptured into helper methods,
which enables use of the VideoAdaptation logic without
using a frame factory.
Refactors AndroidVideoCapturer to make adaptation decision
earlier, so we can crop and rotate using
NV12ToI420Rotate.
BUG=webrtc:5682
Review-Url: https://codereview.webrtc.org/1973873003
Cr-Commit-Position: refs/heads/master@{#12895}
diff --git a/webrtc/media/base/videoadapter.h b/webrtc/media/base/videoadapter.h
index 45fd1fa..9d17f5c 100644
--- a/webrtc/media/base/videoadapter.h
+++ b/webrtc/media/base/videoadapter.h
@@ -27,11 +27,11 @@
VideoAdapter();
virtual ~VideoAdapter();
- // Return the adapted resolution given the input resolution. The input
- // resolution should first be cropped to the specified resolution, and then
- // scaled to the final output resolution. The output resolution will be 0x0 if
- // the frame should be dropped.
- void AdaptFrameResolution(int in_width,
+ // Return the adapted resolution and cropping parameters given the
+ // input resolution. The input frame should first be cropped, then
+ // scaled to the final output resolution. Returns true if the frame
+ // should be adapted, and false if it should be dropped.
+ bool AdaptFrameResolution(int in_width,
int in_height,
int64_t in_timestamp_ns,
int* cropped_width,