| 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.expectedCaptureDelay = | |
| 64 webrtc::videocapturemodule::kDefaultCaptureDelay; | |
| 65 capability.rawType = webrtc::kVideoNV12; | 63 capability.rawType = webrtc::kVideoNV12; |
| 66 capability.codecType = webrtc::kVideoCodecUnknown; | 64 capability.codecType = webrtc::kVideoCodecUnknown; |
| 67 capability.interlaced = false; | 65 capability.interlaced = false; |
| 68 } else if ([preset isEqualToString:AVCaptureSessionPreset640x480]) { | 66 } else if ([preset isEqualToString:AVCaptureSessionPreset640x480]) { |
| 69 capability.width = 640; | 67 capability.width = 640; |
| 70 capability.height = 480; | 68 capability.height = 480; |
| 71 capability.maxFPS = 30; | 69 capability.maxFPS = 30; |
| 72 capability.expectedCaptureDelay = | |
| 73 webrtc::videocapturemodule::kDefaultCaptureDelay; | |
| 74 capability.rawType = webrtc::kVideoNV12; | 70 capability.rawType = webrtc::kVideoNV12; |
| 75 capability.codecType = webrtc::kVideoCodecUnknown; | 71 capability.codecType = webrtc::kVideoCodecUnknown; |
| 76 capability.interlaced = false; | 72 capability.interlaced = false; |
| 77 } else if ([preset isEqualToString:AVCaptureSessionPreset1280x720]) { | 73 } else if ([preset isEqualToString:AVCaptureSessionPreset1280x720]) { |
| 78 capability.width = 1280; | 74 capability.width = 1280; |
| 79 capability.height = 720; | 75 capability.height = 720; |
| 80 capability.maxFPS = 30; | 76 capability.maxFPS = 30; |
| 81 capability.expectedCaptureDelay = | |
| 82 webrtc::videocapturemodule::kDefaultCaptureDelay; | |
| 83 capability.rawType = webrtc::kVideoNV12; | 77 capability.rawType = webrtc::kVideoNV12; |
| 84 capability.codecType = webrtc::kVideoCodecUnknown; | 78 capability.codecType = webrtc::kVideoCodecUnknown; |
| 85 capability.interlaced = false; | 79 capability.interlaced = false; |
| 86 } | 80 } |
| 87 | 81 |
| 88 return capability; | 82 return capability; |
| 89 } | 83 } |
| 90 | 84 |
| 91 @end | 85 @end |
| OLD | NEW |