Updating XTBs based on .GRDs from branch master
[chromium-blink-merge.git] / media / capture / video / android / video_capture_device_factory_android.h
blob5ca432a1122008736842fff94758fc1098a1e44d
1 // Copyright 2014 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.
5 #ifndef MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_FACTORY_ANDROID_H_
6 #define MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_FACTORY_ANDROID_H_
8 #include "media/capture/video/video_capture_device_factory.h"
10 #include <jni.h>
12 #include "base/android/scoped_java_ref.h"
13 #include "media/capture/video/video_capture_device.h"
15 namespace media {
17 // VideoCaptureDeviceFactory on Android. This class implements the static
18 // VideoCapture methods and the factory of VideoCaptureAndroid.
19 class MEDIA_EXPORT VideoCaptureDeviceFactoryAndroid
20 : public VideoCaptureDeviceFactory {
21 public:
22 static bool RegisterVideoCaptureDeviceFactory(JNIEnv* env);
23 static base::android::ScopedJavaLocalRef<jobject> createVideoCaptureAndroid(
24 int id,
25 jlong nativeVideoCaptureDeviceAndroid);
27 VideoCaptureDeviceFactoryAndroid() {}
28 ~VideoCaptureDeviceFactoryAndroid() override {}
30 scoped_ptr<VideoCaptureDevice> Create(
31 const VideoCaptureDevice::Name& device_name) override;
32 void GetDeviceNames(VideoCaptureDevice::Names* device_names) override;
33 void GetDeviceSupportedFormats(
34 const VideoCaptureDevice::Name& device,
35 VideoCaptureFormats* supported_formats) override;
37 private:
38 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceFactoryAndroid);
40 } // namespace media
42 #endif // MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_FACTORY_ANDROID_H_