blob: 541f7a24734ddfc161a10e129974d3dcfc34ed31 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
mflodman@webrtc.org9ba151b2012-06-21 10:02:13 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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.
9 */
10
mflodman@webrtc.orge06ca3c2012-06-29 13:20:14 +000011#ifndef WEBRTC_VIDEO_ENGINE_VIE_CAPTURE_IMPL_H_
12#define WEBRTC_VIDEO_ENGINE_VIE_CAPTURE_IMPL_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
pbos@webrtc.orgf5d4cb12013-05-17 13:44:48 +000014#include "webrtc/typedefs.h"
15#include "webrtc/video_engine/include/vie_capture.h"
16#include "webrtc/video_engine/vie_defines.h"
17#include "webrtc/video_engine/vie_ref_count.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000018
mflodman@webrtc.org605972e2011-12-16 08:59:24 +000019namespace webrtc {
niklase@google.com470e71d2011-07-07 08:21:25 +000020
mflodman@webrtc.orgb11424b2012-01-25 13:42:03 +000021class ViESharedData;
22
mflodman@webrtc.org605972e2011-12-16 08:59:24 +000023class ViECaptureImpl
mflodman@webrtc.orgb11424b2012-01-25 13:42:03 +000024 : public ViECapture,
mflodman@webrtc.org605972e2011-12-16 08:59:24 +000025 public ViERefCount {
26 public:
27 // Implements ViECapture.
28 virtual int Release();
29 virtual int NumberOfCaptureDevices();
30 virtual int GetCaptureDevice(unsigned int list_number, char* device_nameUTF8,
31 const unsigned int device_nameUTF8Length,
32 char* unique_idUTF8,
33 const unsigned int unique_idUTF8Length);
34 virtual int AllocateCaptureDevice(const char* unique_idUTF8,
35 const unsigned int unique_idUTF8Length,
36 int& capture_id);
mflodman@webrtc.org9ba151b2012-06-21 10:02:13 +000037 virtual int AllocateCaptureDevice(
38 VideoCaptureModule& capture_module, int& capture_id); // NOLINT
mflodman@webrtc.org605972e2011-12-16 08:59:24 +000039 virtual int AllocateExternalCaptureDevice(
40 int& capture_id, ViEExternalCapture *&external_capture);
41 virtual int ReleaseCaptureDevice(const int capture_id);
niklase@google.com470e71d2011-07-07 08:21:25 +000042
mflodman@webrtc.org605972e2011-12-16 08:59:24 +000043 virtual int ConnectCaptureDevice(const int capture_id,
44 const int video_channel);
45 virtual int DisconnectCaptureDevice(const int video_channel);
46 virtual int StartCapture(
47 const int capture_id,
mflodman@webrtc.orge5297d22012-01-17 12:44:41 +000048 const CaptureCapability& capture_capability = CaptureCapability());
mflodman@webrtc.org605972e2011-12-16 08:59:24 +000049 virtual int StopCapture(const int capture_id);
50 virtual int SetRotateCapturedFrames(const int capture_id,
51 const RotateCapturedFrame rotation);
52 virtual int SetCaptureDelay(const int capture_id,
53 const unsigned int capture_delay_ms);
54 virtual int NumberOfCapabilities(const char* unique_idUTF8,
55 const unsigned int unique_idUTF8Length);
56 virtual int GetCaptureCapability(const char* unique_idUTF8,
57 const unsigned int unique_idUTF8Length,
58 const unsigned int capability_number,
59 CaptureCapability& capability);
60 virtual int ShowCaptureSettingsDialogBox(
61 const char* unique_idUTF8, const unsigned int unique_idUTF8Length,
62 const char* dialog_title, void* parent_window = NULL,
63 const unsigned int x = 200, const unsigned int y = 200);
64 virtual int GetOrientation(const char* unique_idUTF8,
65 RotateCapturedFrame& orientation);
66 virtual int EnableBrightnessAlarm(const int capture_id, const bool enable);
67 virtual int RegisterObserver(const int capture_id,
68 ViECaptureObserver& observer);
69 virtual int DeregisterObserver(const int capture_id);
niklase@google.com470e71d2011-07-07 08:21:25 +000070
mflodman@webrtc.org605972e2011-12-16 08:59:24 +000071 protected:
mflodman@webrtc.org9ba151b2012-06-21 10:02:13 +000072 explicit ViECaptureImpl(ViESharedData* shared_data);
mflodman@webrtc.org605972e2011-12-16 08:59:24 +000073 virtual ~ViECaptureImpl();
mflodman@webrtc.orgb11424b2012-01-25 13:42:03 +000074
75 private:
76 ViESharedData* shared_data_;
niklase@google.com470e71d2011-07-07 08:21:25 +000077};
mflodman@webrtc.org605972e2011-12-16 08:59:24 +000078
79} // namespace webrtc
80
mflodman@webrtc.orge06ca3c2012-06-29 13:20:14 +000081#endif // WEBRTC_VIDEO_ENGINE_VIE_CAPTURE_IMPL_H_