author Randell Jesup <>
Tue, 13 Jun 2017 01:54:13 -0400
changeset 414812 cbb06ea384e95b8e33886c0825bee14867a8851b
child 414875 b266a8d8fd595b84a7d6218d7b8c6b7af0b5027c
child 503469 622f78404b8a4cb44e05cb791a5bdc87000c5e9d
permissions -rw-r--r--
Bug 1341285: rollup of changes for webrtc after applying v57 update r=ng,jesup,pehrsons,drno,dminor,cpearce,jya,glandium,dmajor Includes re-importing gyp files removed from upstream in v56, and then updating them to match the file changes.

 *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.


#include <jni.h>

#include "webrtc/modules/video_capture/android/device_info_android.h"
#include "webrtc/modules/video_capture/video_capture_impl.h"

namespace webrtc {
namespace videocapturemodule {

class VideoCaptureAndroid : public VideoCaptureImpl {
  virtual int32_t Init(const char* deviceUniqueIdUTF8);

  virtual int32_t StartCapture(const VideoCaptureCapability& capability);
  virtual int32_t StopCapture();
  virtual bool CaptureStarted();
  virtual int32_t CaptureSettings(VideoCaptureCapability& settings);
  virtual int32_t SetCaptureRotation(VideoRotation rotation);

  int32_t OnIncomingFrame(uint8_t* videoFrame,
                          size_t videoFrameLength,
                          int32_t degrees,
                          int64_t captureTime = 0);

  virtual ~VideoCaptureAndroid();

  DeviceInfoAndroid _deviceInfo;
  jobject _jCapturer; // Global ref to Java VideoCaptureAndroid object.
  VideoCaptureCapability _captureCapability;
  VideoRotation _rotation;
  bool _captureStarted;

}  // namespace videocapturemodule
}  // namespace webrtc