Index: webrtc/api/android/java/src/org/webrtc/VideoSource.java |
diff --git a/webrtc/api/android/java/src/org/webrtc/VideoSource.java b/webrtc/api/android/java/src/org/webrtc/VideoSource.java |
index f664f19d2c6842ffc313c729dab05b6d4dc8eda0..f07f3060171896d3c65ab6d913a9ca424c5a6da8 100644 |
--- a/webrtc/api/android/java/src/org/webrtc/VideoSource.java |
+++ b/webrtc/api/android/java/src/org/webrtc/VideoSource.java |
@@ -22,4 +22,15 @@ public class VideoSource extends MediaSource { |
public VideoSource(long nativeSource) { |
super(nativeSource); |
} |
+ |
+ // Calling this function will cause frames to be scaled down to the requested resolution. Also, |
sakal
2016/09/20 11:55:03
nit: Can you use the javadoc comment syntax? It is
magjed_webrtc
2016/09/20 12:27:40
Done.
|
+ // frames will be cropped to match the requested aspect ratio, and frames will be dropped to match |
+ // the requested fps. The requested aspect ratio is orientation agnostic and will be adjusted to |
+ // maintain the input orientation, so it doesn't matter if e.g. 1280x720 or 720x1280 is requested. |
+ public void adaptOutputFormat(int width, int height, int fps) { |
+ nativeAdaptOutputFormat(nativeSource, width, height, fps); |
+ } |
+ |
+ private static native void nativeAdaptOutputFormat( |
+ long nativeSource, int width, int height, int fps); |
} |