Chromium Code Reviews| Index: media/capture/video/android/video_capture_device_android.h |
| diff --git a/media/capture/video/android/video_capture_device_android.h b/media/capture/video/android/video_capture_device_android.h |
| index 09a2c8ea62e01f7fb0146e31893d6f40c10413ac..362207fcd687ea0652079a1abe7ab19e0cce3619 100644 |
| --- a/media/capture/video/android/video_capture_device_android.h |
| +++ b/media/capture/video/android/video_capture_device_android.h |
| @@ -41,6 +41,7 @@ class CAPTURE_EXPORT VideoCaptureDeviceAndroid : public VideoCaptureDevice { |
| enum AndroidImageFormat { |
| // Android graphics ImageFormat mapping, see reference in: |
| // http://developer.android.com/reference/android/graphics/ImageFormat.html |
| + ANDROID_IMAGE_FORMAT_DEPTH16 = 0x44363159, |
| ANDROID_IMAGE_FORMAT_NV21 = 17, |
| ANDROID_IMAGE_FORMAT_YUV_420_888 = 35, |
| ANDROID_IMAGE_FORMAT_YV12 = 842094169, |
| @@ -90,6 +91,13 @@ class CAPTURE_EXPORT VideoCaptureDeviceAndroid : public VideoCaptureDevice { |
| jint rotation, |
| jlong timestamp); |
| + // Implement org.chromium.media.VideoCapture.nativePointCloudAvailable. |
| + virtual void OnPointCloudAvailable(JNIEnv* env, |
| + jobject obj, |
| + jobject points_buffer, |
| + jint num_points, |
| + jdouble timestamp); |
| + |
| // Implement org.chromium.media.VideoCapture.nativeOnError. |
| void OnError(JNIEnv* env, |
| const base::android::JavaParamRef<jobject>& obj, |
| @@ -106,6 +114,28 @@ class CAPTURE_EXPORT VideoCaptureDeviceAndroid : public VideoCaptureDevice { |
| void ConfigureForTesting(); |
| + protected: |
|
mcasas
2017/07/15 00:12:36
Can we make a CL just for these small extractions?
|
| + // Helper code executed when the frame is available; if it is the first frame, |
| + // setup time fluctuation control and process any pending photo requests. |
| + void ProcessFirstFrameAvailable(base::TimeTicks current_time); |
| + |
| + // Check if there is client and if the state is valid. |
| + bool IsClientConfiguredForIncomingData(); |
| + |
| + // Check if the incoming frame didn't arrived too, advance the next frame |
| + // expectation time and return true; |
| + bool AdvanceToNextFrameTime(base::TimeTicks current_time); |
| + |
| + void SendIncomingDataToClient(const uint8_t* data, |
| + int length, |
| + int rotation, |
| + base::TimeTicks reference_time, |
| + base::TimeDelta timestamp); |
| + |
| + VideoCaptureFormat capture_format_; |
| + // Java VideoCaptureAndroid instance. |
| + base::android::ScopedJavaLocalRef<jobject> j_capture_; |
| + |
| private: |
| enum InternalState { |
| kIdle, // The device is opened but not in use. |
| @@ -143,10 +173,6 @@ class CAPTURE_EXPORT VideoCaptureDeviceAndroid : public VideoCaptureDevice { |
| std::list<std::unique_ptr<TakePhotoCallback>> photo_callbacks_; |
| const VideoCaptureDeviceDescriptor device_descriptor_; |
| - VideoCaptureFormat capture_format_; |
| - |
| - // Java VideoCaptureAndroid instance. |
| - base::android::ScopedJavaLocalRef<jobject> j_capture_; |
| base::WeakPtrFactory<VideoCaptureDeviceAndroid> weak_ptr_factory_; |