2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_ANDROID_VIDEO_CAPTURE_ANDROID_H_
12 #define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_ANDROID_VIDEO_CAPTURE_ANDROID_H_
16 #include "webrtc/modules/video_capture/android/device_info_android.h"
17 #include "webrtc/modules/video_capture/video_capture_impl.h"
20 namespace videocapturemodule {
22 class VideoCaptureAndroid : public VideoCaptureImpl {
24 VideoCaptureAndroid(const int32_t id);
25 virtual int32_t Init(const int32_t id, const char* deviceUniqueIdUTF8);
27 virtual int32_t StartCapture(const VideoCaptureCapability& capability);
28 virtual int32_t StopCapture();
29 virtual bool CaptureStarted();
30 virtual int32_t CaptureSettings(VideoCaptureCapability& settings);
31 virtual int32_t SetCaptureRotation(VideoCaptureRotation rotation);
33 int32_t OnIncomingFrame(uint8_t* videoFrame,
34 int32_t videoFrameLength,
36 int64_t captureTime = 0);
39 virtual ~VideoCaptureAndroid();
41 DeviceInfoAndroid _deviceInfo;
42 jobject _jCapturer; // Global ref to Java VideoCaptureAndroid object.
43 VideoCaptureCapability _captureCapability;
44 VideoCaptureRotation _rotation;
48 } // namespace videocapturemodule
50 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_ANDROID_VIDEO_CAPTURE_ANDROID_H_