OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 + (webrtc::VideoCaptureCapability)capabilityForPreset:(NSString*)preset { | 54 + (webrtc::VideoCaptureCapability)capabilityForPreset:(NSString*)preset { |
55 webrtc::VideoCaptureCapability capability; | 55 webrtc::VideoCaptureCapability capability; |
56 | 56 |
57 // TODO(tkchin): Maybe query AVCaptureDevice for supported formats, and | 57 // TODO(tkchin): Maybe query AVCaptureDevice for supported formats, and |
58 // then get the dimensions / frame rate from each supported format | 58 // then get the dimensions / frame rate from each supported format |
59 if ([preset isEqualToString:AVCaptureSessionPreset352x288]) { | 59 if ([preset isEqualToString:AVCaptureSessionPreset352x288]) { |
60 capability.width = 352; | 60 capability.width = 352; |
61 capability.height = 288; | 61 capability.height = 288; |
62 capability.maxFPS = 30; | 62 capability.maxFPS = 30; |
63 capability.rawType = webrtc::kVideoNV12; | 63 capability.videoType = webrtc::VideoType::kNV12; |
64 capability.interlaced = false; | 64 capability.interlaced = false; |
65 } else if ([preset isEqualToString:AVCaptureSessionPreset640x480]) { | 65 } else if ([preset isEqualToString:AVCaptureSessionPreset640x480]) { |
66 capability.width = 640; | 66 capability.width = 640; |
67 capability.height = 480; | 67 capability.height = 480; |
68 capability.maxFPS = 30; | 68 capability.maxFPS = 30; |
69 capability.rawType = webrtc::kVideoNV12; | 69 capability.videoType = webrtc::VideoType::kNV12; |
70 capability.interlaced = false; | 70 capability.interlaced = false; |
71 } else if ([preset isEqualToString:AVCaptureSessionPreset1280x720]) { | 71 } else if ([preset isEqualToString:AVCaptureSessionPreset1280x720]) { |
72 capability.width = 1280; | 72 capability.width = 1280; |
73 capability.height = 720; | 73 capability.height = 720; |
74 capability.maxFPS = 30; | 74 capability.maxFPS = 30; |
75 capability.rawType = webrtc::kVideoNV12; | 75 capability.videoType = webrtc::VideoType::kNV12; |
76 capability.interlaced = false; | 76 capability.interlaced = false; |
77 } | 77 } |
78 | 78 |
79 return capability; | 79 return capability; |
80 } | 80 } |
81 | 81 |
82 @end | 82 @end |
OLD | NEW |