| Index: webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodecH264.mm
|
| diff --git a/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodecH264.mm b/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodecH264.mm
|
| index 7cd6a7f0d075deb3ad2c7567b0bffa1b8a2ef5a3..7b38ec047cec1dfd2f1ee3080e91b7982117f077 100644
|
| --- a/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodecH264.mm
|
| +++ b/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodecH264.mm
|
| @@ -27,6 +27,11 @@ const size_t kDefaultPayloadSize = 1440;
|
|
|
| const char kHighProfileExperiment[] = "WebRTC-H264HighProfile";
|
|
|
| +// These thresholds deviate from the default h264 QP thresholds, as they have been found to work
|
| +// better on devices that support VideoToolbox
|
| +const int kLowH264QpThreshold = 28;
|
| +const int kHighH264QpThreshold = 39;
|
| +
|
| bool IsHighProfileEnabled() {
|
| return webrtc::field_trial::IsEnabled(kHighProfileExperiment);
|
| }
|
| @@ -171,6 +176,11 @@ class H264VideoToolboxDecodeCompleteCallback : public webrtc::DecodedImageCallba
|
| return _videoToolboxEncoder->SetRates(bitrateKbit, framerate) == WEBRTC_VIDEO_CODEC_OK;
|
| }
|
|
|
| +- (RTCVideoEncoderQpThresholds *)scalingSettings {
|
| + return [[RTCVideoEncoderQpThresholds alloc] initWithThresholdsLow:kLowH264QpThreshold
|
| + high:kHighH264QpThreshold];
|
| +}
|
| +
|
| @end
|
|
|
| // Decoder.
|
|
|