1 /* 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 3 * 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 11 #ifndef WEBRTC_VIDEO_ENGINE_VIE_CAPTURE_IMPL_H_ 12 #define WEBRTC_VIDEO_ENGINE_VIE_CAPTURE_IMPL_H_ 13 14 #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" 18 19 namespace webrtc { 20 21 class ViESharedData; 22 23 class ViECaptureImpl 24 : public ViECapture, 25 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); 37 virtual int AllocateCaptureDevice( 38 VideoCaptureModule& capture_module, int& capture_id); // NOLINT 39 virtual int AllocateExternalCaptureDevice( 40 int& capture_id, ViEExternalCapture *&external_capture); 41 virtual int ReleaseCaptureDevice(const int capture_id); 42 43 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, 48 const CaptureCapability& capture_capability = CaptureCapability()); 49 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); 70 71 protected: 72 explicit ViECaptureImpl(ViESharedData* shared_data); 73 virtual ~ViECaptureImpl(); 74 75 private: 76 ViESharedData* shared_data_; 77 }; 78 79 } // namespace webrtc 80 81 #endif // WEBRTC_VIDEO_ENGINE_VIE_CAPTURE_IMPL_H_ 82