OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_ | 11 #ifndef WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_ |
12 #define WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_ | 12 #define WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_ |
13 | 13 |
14 #import <AVFoundation/AVFoundation.h> | 14 #import <AVFoundation/AVFoundation.h> |
15 | 15 |
16 #include "webrtc/common_video/include/i420_buffer_pool.h" | 16 #include "webrtc/common_video/include/i420_buffer_pool.h" |
17 #include "webrtc/media/base/videocapturer.h" | 17 #include "webrtc/media/base/videocapturer.h" |
18 #include "webrtc/video_frame.h" | 18 #include "webrtc/video_frame.h" |
19 | 19 |
20 @class RTCAVFoundationVideoCapturerInternal; | 20 @class RTCAVFoundationVideoCapturerInternal; |
21 | 21 |
22 namespace rtc { | 22 namespace rtc { |
23 class Thread; | 23 class Thread; |
24 } // namespace rtc | 24 } // namespace rtc |
25 | 25 |
26 // Sets device format for the provided capture device. Returns YES/NO depending | |
27 // on success. | |
28 // TODO(denicija): When this file is split this static method should be | |
29 // reconsidered. | |
30 // Perhaps adding a category on AVCaptureDevice would be better. | |
31 BOOL SetFormatForCaptureDevice(AVCaptureDevice* device, | |
magjed_webrtc
2016/11/10 13:22:45
You are not allowed to add stuff to the global nam
daniela-webrtc
2016/11/11 13:23:10
Done.
| |
32 AVCaptureSession* session, | |
33 const cricket::VideoFormat& format); | |
34 | |
26 namespace webrtc { | 35 namespace webrtc { |
27 | 36 |
28 class AVFoundationVideoCapturer : public cricket::VideoCapturer { | 37 class AVFoundationVideoCapturer : public cricket::VideoCapturer { |
29 public: | 38 public: |
30 AVFoundationVideoCapturer(); | 39 AVFoundationVideoCapturer(); |
31 ~AVFoundationVideoCapturer(); | 40 ~AVFoundationVideoCapturer(); |
32 | 41 |
33 cricket::CaptureState Start(const cricket::VideoFormat& format) override; | 42 cricket::CaptureState Start(const cricket::VideoFormat& format) override; |
34 void Stop() override; | 43 void Stop() override; |
35 bool IsRunning() override; | 44 bool IsRunning() override; |
(...skipping 23 matching lines...) Expand all Loading... | |
59 webrtc::VideoRotation rotation); | 68 webrtc::VideoRotation rotation); |
60 | 69 |
61 private: | 70 private: |
62 RTCAVFoundationVideoCapturerInternal *_capturer; | 71 RTCAVFoundationVideoCapturerInternal *_capturer; |
63 webrtc::I420BufferPool _buffer_pool; | 72 webrtc::I420BufferPool _buffer_pool; |
64 }; // AVFoundationVideoCapturer | 73 }; // AVFoundationVideoCapturer |
65 | 74 |
66 } // namespace webrtc | 75 } // namespace webrtc |
67 | 76 |
68 #endif // WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_ | 77 #endif // WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_ |
OLD | NEW |