| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 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 "tango_client_api_glue.h" |
| 13 #include "video_capture_device_android.h" |
| 14 |
| 15 namespace media { |
| 16 |
| 17 class CAPTURE_EXPORT VideoCaptureDeviceTangoAndroid |
| 18 : public VideoCaptureDeviceAndroid { |
| 19 public: |
| 20 explicit VideoCaptureDeviceTangoAndroid( |
| 21 const VideoCaptureDeviceDescriptor& device_descriptor); |
| 22 ~VideoCaptureDeviceTangoAndroid() override; |
| 23 |
| 24 static void EnumerateDevices( |
| 25 VideoCaptureDeviceDescriptors* device_descriptors); |
| 26 static void EnumerateDeviceCapabilities( |
| 27 const VideoCaptureDeviceDescriptor& descriptor, |
| 28 VideoCaptureFormats* supported_formats); |
| 29 |
| 30 static bool RegisterVideoCaptureDevice(JNIEnv* env); |
| 31 |
| 32 void AllocateAndStart(const VideoCaptureParams& params, |
| 33 std::unique_ptr<Client> client) override; |
| 34 void StopAndDeAllocate() override; |
| 35 void GetPhotoState(GetPhotoStateCallback callback) override{}; |
| 36 void SetPhotoOptions(mojom::PhotoSettingsPtr settings, |
| 37 SetPhotoOptionsCallback callback) override{}; |
| 38 void TakePhoto(TakePhotoCallback callback) override{}; |
| 39 |
| 40 void OnPointCloudAvailable(uint32_t num_points, |
| 41 float* const points, |
| 42 double timestamp); |
| 43 |
| 44 // Implement |
| 45 // org.chromium.media.VideoCaptureTango.nativeOnTangoServiceConnected. |
| 46 void OnTangoServiceConnected(JNIEnv* env, jobject obj, jobject binder); |
| 47 |
| 48 // Implement org.chromium.media.VideoCaptureTango.nativeTangoDisconnect. |
| 49 void TangoDisconnect(JNIEnv* env, jobject obj); |
| 50 |
| 51 private: |
| 52 friend class VideoCaptureDeviceTangoAndroidTest; |
| 53 |
| 54 void Connect(const std::string& uuid); |
| 55 |
| 56 std::unique_ptr<TangoClientApiGlue::TangoCameraIntrinsics> intrinsics_; |
| 57 base::WeakPtrFactory<VideoCaptureDeviceTangoAndroid> weak_ptr_factory_; |
| 58 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceTangoAndroid); |
| 59 }; |
| 60 |
| 61 } // namespace media |
| 62 |
| 63 #endif // MEDIA_CAPTURE_VIDEO_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ |
| OLD | NEW |