OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 @class AVCaptureSession; | 30 @class AVCaptureSession; |
31 @class RTCMediaConstraints; | 31 @class RTCMediaConstraints; |
32 @class RTCPeerConnectionFactory; | 32 @class RTCPeerConnectionFactory; |
33 | 33 |
34 // RTCAVFoundationVideoSource is a video source that uses | 34 // RTCAVFoundationVideoSource is a video source that uses |
35 // webrtc::AVFoundationVideoCapturer. We do not currently provide a wrapper for | 35 // webrtc::AVFoundationVideoCapturer. We do not currently provide a wrapper for |
36 // that capturer because cricket::VideoCapturer is not ref counted and we cannot | 36 // that capturer because cricket::VideoCapturer is not ref counted and we cannot |
37 // guarantee its lifetime. Instead, we expose its properties through the ref | 37 // guarantee its lifetime. Instead, we expose its properties through the ref |
38 // counted video source interface. | 38 // counted video source interface. |
39 @interface RTCAVFoundationVideoSource : RTCVideoSource | 39 @interface RTCAVFoundationVideoSource : RTCVideoSource { |
| 40 // TODO(nisse): This is a crude hack, the pointer really is a |
| 41 // webrtc::AVFoundationVideoCapturer*, but using a proper |
| 42 // declaration with namespaces breaks inclusion from .m files, i.e. |
| 43 // files which are Objective-C but not Objective-C++. |
| 44 void *_capturer; |
| 45 } |
40 | 46 |
41 - (instancetype)initWithFactory:(RTCPeerConnectionFactory*)factory | 47 - (instancetype)initWithFactory:(RTCPeerConnectionFactory*)factory |
42 constraints:(RTCMediaConstraints*)constraints; | 48 constraints:(RTCMediaConstraints*)constraints; |
43 | 49 |
44 // Returns whether rear-facing camera is available for use. | 50 // Returns whether rear-facing camera is available for use. |
45 @property(nonatomic, readonly) BOOL canUseBackCamera; | 51 @property(nonatomic, readonly) BOOL canUseBackCamera; |
46 // Switches the camera being used (either front or back). | 52 // Switches the camera being used (either front or back). |
47 @property(nonatomic, assign) BOOL useBackCamera; | 53 @property(nonatomic, assign) BOOL useBackCamera; |
48 // Returns the active capture session. | 54 // Returns the active capture session. |
49 @property(nonatomic, readonly) AVCaptureSession* captureSession; | 55 @property(nonatomic, readonly) AVCaptureSession* captureSession; |
50 | 56 |
51 @end | 57 @end |
OLD | NEW |