| 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 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // Returns whether the rear-facing camera can be used. | 49 // Returns whether the rear-facing camera can be used. |
| 50 // e.g. It can't be used because it doesn't exist. | 50 // e.g. It can't be used because it doesn't exist. |
| 51 bool CanUseBackCamera() const; | 51 bool CanUseBackCamera() const; |
| 52 | 52 |
| 53 // Switches the camera being used (either front or back). | 53 // Switches the camera being used (either front or back). |
| 54 void SetUseBackCamera(bool useBackCamera); | 54 void SetUseBackCamera(bool useBackCamera); |
| 55 bool GetUseBackCamera() const; | 55 bool GetUseBackCamera() const; |
| 56 | 56 |
| 57 // Converts the sample buffer into a cricket::CapturedFrame and signals the | 57 // Converts the sample buffer into a cricket::CapturedFrame and signals the |
| 58 // frame for capture. | 58 // frame for capture. |
| 59 void CaptureSampleBuffer(CMSampleBufferRef sampleBuffer); | 59 void CaptureSampleBuffer(CMSampleBufferRef sample_buffer, |
| 60 webrtc::VideoRotation rotation); |
| 60 | 61 |
| 61 // Handles messages from posts. | 62 // Handles messages from posts. |
| 62 void OnMessage(rtc::Message *msg) override; | 63 void OnMessage(rtc::Message *msg) override; |
| 63 | 64 |
| 64 private: | 65 private: |
| 65 void OnFrameMessage(CVImageBufferRef image_buffer, int64_t capture_time_ns); | 66 void OnFrameMessage(CVImageBufferRef image_buffer, |
| 67 webrtc::VideoRotation rotation, |
| 68 int64_t capture_time_ns); |
| 66 | 69 |
| 67 RTCAVFoundationVideoCapturerInternal *_capturer; | 70 RTCAVFoundationVideoCapturerInternal *_capturer; |
| 68 rtc::Thread *_startThread; // Set in Start(), unset in Stop(). | 71 rtc::Thread *_startThread; // Set in Start(), unset in Stop(). |
| 69 webrtc::I420BufferPool _buffer_pool; | 72 webrtc::I420BufferPool _buffer_pool; |
| 70 }; // AVFoundationVideoCapturer | 73 }; // AVFoundationVideoCapturer |
| 71 | 74 |
| 72 } // namespace webrtc | 75 } // namespace webrtc |
| 73 | 76 |
| 74 #endif // WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_ | 77 #endif // WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_ |
| OLD | NEW |