Chromium Code Reviews| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 97 @property(nonatomic, assign) unsigned int maxBitrate; | 97 @property(nonatomic, assign) unsigned int maxBitrate; |
| 98 @property(nonatomic, assign) unsigned int minBitrate; | 98 @property(nonatomic, assign) unsigned int minBitrate; |
| 99 @property(nonatomic, assign) unsigned int targetBitrate; | 99 @property(nonatomic, assign) unsigned int targetBitrate; |
| 100 | 100 |
| 101 @property(nonatomic, assign) uint32_t maxFramerate; | 101 @property(nonatomic, assign) uint32_t maxFramerate; |
| 102 | 102 |
| 103 @property(nonatomic, assign) unsigned int qpMax; | 103 @property(nonatomic, assign) unsigned int qpMax; |
| 104 | 104 |
| 105 @end | 105 @end |
| 106 | 106 |
| 107 /** QP thresholds for encoder. Corresponds to webrtc::VideoEncoder::QpThresholds . */ | |
| 108 RTC_EXPORT | |
| 109 @interface RTCVideoEncoderQpThresholds : NSObject | |
| 110 | |
| 111 - (instancetype)initWithThresholdsLow:(NSInteger)low high:(NSInteger)high; | |
| 112 | |
| 113 @property(nonatomic, readonly) NSInteger low; | |
| 114 @property(nonatomic, readonly) NSInteger high; | |
| 115 | |
| 116 @end | |
| 117 | |
| 107 /** Protocol for encoder implementations. */ | 118 /** Protocol for encoder implementations. */ |
| 108 RTC_EXPORT | 119 RTC_EXPORT |
| 109 @protocol RTCVideoEncoder <NSObject> | 120 @protocol RTCVideoEncoder <NSObject> |
| 110 | 121 |
| 111 - (void)setCallback:(RTCVideoEncoderCallback)callback; | 122 - (void)setCallback:(RTCVideoEncoderCallback)callback; |
| 112 - (NSInteger)startEncodeWithSettings:(RTCVideoEncoderSettings *)settings | 123 - (NSInteger)startEncodeWithSettings:(RTCVideoEncoderSettings *)settings |
| 113 numberOfCores:(int)numberOfCores; | 124 numberOfCores:(int)numberOfCores; |
| 114 - (NSInteger)releaseEncoder; | 125 - (NSInteger)releaseEncoder; |
| 115 - (void)destroy; | 126 - (void)destroy; |
| 116 - (NSInteger)encode:(RTCVideoFrame *)frame | 127 - (NSInteger)encode:(RTCVideoFrame *)frame |
| 117 codecSpecificInfo:(id<RTCCodecSpecificInfo>)info | 128 codecSpecificInfo:(id<RTCCodecSpecificInfo>)info |
| 118 frameTypes:(NSArray<NSNumber *> *)frameTypes; | 129 frameTypes:(NSArray<NSNumber *> *)frameTypes; |
| 119 - (BOOL)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate; | 130 - (BOOL)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate; |
| 120 | 131 |
| 132 /** Returns QP scaling settings for encoder. The quality scaler adjusts the reso lution in order to | |
| 133 * keep the QP from the encoded images within the given range. Returning nil fr om this function | |
| 134 * disables quality scaling. */ | |
| 135 - (RTCVideoEncoderQpThresholds *)scalingSettings; | |
| 136 | |
| 137 // TODO(andersc): Add implementationName method. | |
|
andersc
2017/08/01 14:30:26
Is this related? I suppose it's a oneliner just re
magjed_webrtc
2017/08/01 15:04:55
It's not really related but it's another function
| |
| 138 | |
| 121 @end | 139 @end |
| 122 | 140 |
| 123 /** Protocol for decoder implementations. */ | 141 /** Protocol for decoder implementations. */ |
| 124 RTC_EXPORT | 142 RTC_EXPORT |
| 125 @protocol RTCVideoDecoder <NSObject> | 143 @protocol RTCVideoDecoder <NSObject> |
| 126 | 144 |
| 127 - (void)setCallback:(RTCVideoDecoderCallback)callback; | 145 - (void)setCallback:(RTCVideoDecoderCallback)callback; |
| 128 - (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings | 146 - (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings |
| 129 numberOfCores:(int)numberOfCores; | 147 numberOfCores:(int)numberOfCores; |
| 130 - (NSInteger)releaseDecoder; | 148 - (NSInteger)releaseDecoder; |
| 131 - (void)destroy; | 149 - (void)destroy; |
| 132 - (NSInteger)decode:(RTCEncodedImage *)encodedImage | 150 - (NSInteger)decode:(RTCEncodedImage *)encodedImage |
| 133 missingFrames:(BOOL)missingFrames | 151 missingFrames:(BOOL)missingFrames |
| 134 fragmentationHeader:(RTCRtpFragmentationHeader *)fragmentationHeader | 152 fragmentationHeader:(RTCRtpFragmentationHeader *)fragmentationHeader |
| 135 codecSpecificInfo:(__nullable id<RTCCodecSpecificInfo>)info | 153 codecSpecificInfo:(__nullable id<RTCCodecSpecificInfo>)info |
| 136 renderTimeMs:(int64_t)renderTimeMs; | 154 renderTimeMs:(int64_t)renderTimeMs; |
| 137 | 155 |
| 156 // TODO(andersc): Add implementationName method. | |
| 157 | |
| 138 @end | 158 @end |
| 139 | 159 |
| 140 NS_ASSUME_NONNULL_END | 160 NS_ASSUME_NONNULL_END |
| OLD | NEW |