Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm

Issue 2205763002: Disable encoder scaling on iPhone4S. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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);
mflodman 2016/08/03 10:54:49 Agree this is godo to have here, but in practice i
tkchin_webrtc 2016/08/03 18:03:34 Technically not needed, but will skip some checks
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698