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

Unified Diff: webrtc/api/java/jni/native_handle_impl.h

Issue 1973873003: Delete AndroidVideoCapturer::FrameFactory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address nits. 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
« no previous file with comments | « webrtc/api/java/jni/androidvideocapturer_jni.cc ('k') | webrtc/api/java/jni/native_handle_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/java/jni/native_handle_impl.h
diff --git a/webrtc/api/java/jni/native_handle_impl.h b/webrtc/api/java/jni/native_handle_impl.h
index b781815718dfd89f2d175060b3ef69a4b4e88e7e..cd2fc9e0532785c3fdd0b5012f0bfde079334f66 100644
--- a/webrtc/api/java/jni/native_handle_impl.h
+++ b/webrtc/api/java/jni/native_handle_impl.h
@@ -20,12 +20,37 @@ namespace webrtc_jni {
// Wrapper for texture object.
struct NativeHandleImpl {
+ // Open gl textre matrix, in column-major order. Operations are
+ // in-place.
+ struct Matrix {
magjed_webrtc 2016/05/18 11:41:59 struct's are not allowed to have complex methods.
nisse-webrtc 2016/05/18 12:17:52 I'll make it a class, then. Can it still use the n
+ float elem[16];
+ // Crop arguments are relative to original size.
+ void Crop(float cropped_width,
+ float cropped_height,
+ float crop_x,
+ float crop_y);
+
+ void Rotate(webrtc::VideoRotation rotation);
+ static void Multiply(const Matrix& a, const Matrix& b, Matrix* result);
+ };
+
NativeHandleImpl(JNIEnv* jni,
jint j_oes_texture_id,
jfloatArray j_transform_matrix);
+ NativeHandleImpl(int id, const Matrix& matrix);
+
const int oes_texture_id;
- float sampling_matrix[16];
+ Matrix sampling_matrix;
+
+ NativeHandleImpl Crop(
magjed_webrtc 2016/05/18 11:41:59 Do we really need Crop and Rotate for NativeHandle
nisse-webrtc 2016/05/18 12:17:52 No, these are leftovers and should be deleted.
+ // Relative to original size.
+ float cropped_width,
+ float cropped_height,
+ float crop_x,
+ float crop_y) const;
+
+ NativeHandleImpl Rotate(webrtc::VideoRotation rotation) const;
};
class AndroidTextureBuffer : public webrtc::NativeHandleBuffer {
@@ -42,6 +67,8 @@ class AndroidTextureBuffer : public webrtc::NativeHandleBuffer {
rtc::scoped_refptr<AndroidTextureBuffer> CropScaleAndRotate(
int cropped_width,
int cropped_height,
+ int crop_x,
+ int crop_y,
int dst_width,
int dst_height,
webrtc::VideoRotation rotation);
« no previous file with comments | « webrtc/api/java/jni/androidvideocapturer_jni.cc ('k') | webrtc/api/java/jni/native_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698