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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 int64_t capture_time; | 568 int64_t capture_time; |
569 }; | 569 }; |
570 | 570 |
571 AVFoundationVideoCapturer::AVFoundationVideoCapturer() | 571 AVFoundationVideoCapturer::AVFoundationVideoCapturer() |
572 : _capturer(nil), _startThread(nullptr) { | 572 : _capturer(nil), _startThread(nullptr) { |
573 // Set our supported formats. This matches kDefaultPreset. | 573 // Set our supported formats. This matches kDefaultPreset. |
574 std::vector<cricket::VideoFormat> supported_formats; | 574 std::vector<cricket::VideoFormat> supported_formats; |
575 #if TARGET_OS_IPHONE | 575 #if TARGET_OS_IPHONE |
576 if ([UIDevice deviceType] == RTCDeviceTypeIPhone4S) { | 576 if ([UIDevice deviceType] == RTCDeviceTypeIPhone4S) { |
577 supported_formats.push_back(cricket::VideoFormat(kIPhone4SFormat)); | 577 supported_formats.push_back(cricket::VideoFormat(kIPhone4SFormat)); |
| 578 set_enable_video_adapter(false); |
578 } else { | 579 } else { |
579 supported_formats.push_back(cricket::VideoFormat(kDefaultFormat)); | 580 supported_formats.push_back(cricket::VideoFormat(kDefaultFormat)); |
580 } | 581 } |
581 #else | 582 #else |
582 supported_formats.push_back(cricket::VideoFormat(kDefaultFormat)); | 583 supported_formats.push_back(cricket::VideoFormat(kDefaultFormat)); |
583 #endif | 584 #endif |
584 SetSupportedFormats(supported_formats); | 585 SetSupportedFormats(supported_formats); |
585 _capturer = | 586 _capturer = |
586 [[RTCAVFoundationVideoCapturerInternal alloc] initWithCapturer:this]; | 587 [[RTCAVFoundationVideoCapturerInternal alloc] initWithCapturer:this]; |
587 } | 588 } |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 } | 719 } |
719 | 720 |
720 OnFrame(cricket::WebRtcVideoFrame(buffer, webrtc::kVideoRotation_0, | 721 OnFrame(cricket::WebRtcVideoFrame(buffer, webrtc::kVideoRotation_0, |
721 translated_camera_time_us, 0), | 722 translated_camera_time_us, 0), |
722 captured_width, captured_height); | 723 captured_width, captured_height); |
723 | 724 |
724 CVBufferRelease(image_buffer); | 725 CVBufferRelease(image_buffer); |
725 } | 726 } |
726 | 727 |
727 } // namespace webrtc | 728 } // namespace webrtc |
OLD | NEW |