Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | |
|
mcasas
2017/07/15 00:12:37
No (c) anymore, and 2017 in VideoCaptureTango.java
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_CAPTURE_VIDEO_ANDROID_VIDEO_CAPTURE_DEVICE_TANGO_ANDROID_H_ | |
| 6 #define MEDIA_CAPTURE_VIDEO_ANDROID_VIDEO_CAPTURE_DEVICE_TANGO_ANDROID_H_ | |
| 7 | |
| 8 #include <jni.h> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "base/memory/weak_ptr.h" | |
| 12 #include "video_capture_device_android.h" | |
| 13 | |
| 14 namespace media { | |
| 15 | |
| 16 class CAPTURE_EXPORT VideoCaptureDeviceTangoAndroid | |
| 17 : public VideoCaptureDeviceAndroid { | |
| 18 public: | |
| 19 explicit VideoCaptureDeviceTangoAndroid( | |
| 20 const VideoCaptureDeviceDescriptor& device_descriptor); | |
| 21 ~VideoCaptureDeviceTangoAndroid() override; | |
| 22 | |
| 23 void GetPhotoState(GetPhotoStateCallback callback) override{}; | |
| 24 void SetPhotoOptions(mojom::PhotoSettingsPtr settings, | |
| 25 SetPhotoOptionsCallback callback) override{}; | |
| 26 void TakePhoto(TakePhotoCallback callback) override{}; | |
| 27 | |
| 28 // Implement org.chromium.media.VideoCapture.nativePointCloudAvailable. | |
| 29 void OnPointCloudAvailable(JNIEnv* env, | |
| 30 jobject obj, | |
| 31 jobject points_buffer, | |
| 32 jint num_points, | |
| 33 jdouble timestamp) override; | |
| 34 | |
| 35 private: | |
| 36 friend class VideoCaptureDeviceTangoAndroidTest; | |
| 37 struct TangoIntrinsics { | |
| 38 // Fields naming and the description is the same as for struct | |
| 39 // TangoCameraIntrinsic at | |
| 40 // https://developers.google.com/tango/apis/c/reference/struct/tango-camera- intrinsics. | |
| 41 float fx = 0; | |
| 42 float fy = 0; | |
| 43 float cx = 0; | |
| 44 float cy = 0; | |
| 45 }; | |
| 46 | |
| 47 static std::unique_ptr<TangoIntrinsics> GetIntrinsics(JNIEnv* env, | |
| 48 jobject obj); | |
| 49 | |
| 50 std::unique_ptr<TangoIntrinsics> intrinsics_; | |
| 51 base::WeakPtrFactory<VideoCaptureDeviceTangoAndroid> weak_ptr_factory_; | |
| 52 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceTangoAndroid); | |
| 53 }; | |
| 54 | |
| 55 } // namespace media | |
| 56 | |
| 57 #endif // MEDIA_CAPTURE_VIDEO_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ | |
| OLD | NEW |