| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 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 12 matching lines...) Expand all Loading... |
| 23 @synthesize maxBitrate = _maxBitrate; | 23 @synthesize maxBitrate = _maxBitrate; |
| 24 @synthesize minBitrate = _minBitrate; | 24 @synthesize minBitrate = _minBitrate; |
| 25 @synthesize targetBitrate = _targetBitrate; | 25 @synthesize targetBitrate = _targetBitrate; |
| 26 @synthesize maxFramerate = _maxFramerate; | 26 @synthesize maxFramerate = _maxFramerate; |
| 27 @synthesize qpMax = _qpMax; | 27 @synthesize qpMax = _qpMax; |
| 28 @synthesize mode = _mode; | 28 @synthesize mode = _mode; |
| 29 | 29 |
| 30 - (instancetype)initWithNativeVideoCodec:(const webrtc::VideoCodec *)videoCodec
{ | 30 - (instancetype)initWithNativeVideoCodec:(const webrtc::VideoCodec *)videoCodec
{ |
| 31 if (self = [super init]) { | 31 if (self = [super init]) { |
| 32 if (videoCodec) { | 32 if (videoCodec) { |
| 33 rtc::Optional<const char *> codecName = CodecTypeToPayloadName(videoCodec-
>codecType); | 33 const char *codecName = CodecTypeToPayloadString(videoCodec->codecType); |
| 34 if (codecName) { | 34 _name = [NSString stringWithUTF8String:codecName]; |
| 35 _name = [NSString stringWithUTF8String:codecName.value()]; | |
| 36 } | |
| 37 | 35 |
| 38 _width = videoCodec->width; | 36 _width = videoCodec->width; |
| 39 _height = videoCodec->height; | 37 _height = videoCodec->height; |
| 40 _startBitrate = videoCodec->startBitrate; | 38 _startBitrate = videoCodec->startBitrate; |
| 41 _maxBitrate = videoCodec->maxBitrate; | 39 _maxBitrate = videoCodec->maxBitrate; |
| 42 _minBitrate = videoCodec->minBitrate; | 40 _minBitrate = videoCodec->minBitrate; |
| 43 _targetBitrate = videoCodec->targetBitrate; | 41 _targetBitrate = videoCodec->targetBitrate; |
| 44 _maxFramerate = videoCodec->maxFramerate; | 42 _maxFramerate = videoCodec->maxFramerate; |
| 45 _qpMax = videoCodec->qpMax; | 43 _qpMax = videoCodec->qpMax; |
| 46 _mode = (RTCVideoCodecMode)videoCodec->mode; | 44 _mode = (RTCVideoCodecMode)videoCodec->mode; |
| 47 } | 45 } |
| 48 } | 46 } |
| 49 | 47 |
| 50 return self; | 48 return self; |
| 51 } | 49 } |
| 52 | 50 |
| 53 @end | 51 @end |
| OLD | NEW |