OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 1963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1974 encoder_config.number_of_streams = parameters_.config.rtp.ssrcs.size(); | 1974 encoder_config.number_of_streams = parameters_.config.rtp.ssrcs.size(); |
1975 if (IsCodecBlacklistedForSimulcast(codec.name) || | 1975 if (IsCodecBlacklistedForSimulcast(codec.name) || |
1976 (is_screencast && | 1976 (is_screencast && |
1977 (!UseSimulcastScreenshare() || !parameters_.conference_mode))) { | 1977 (!UseSimulcastScreenshare() || !parameters_.conference_mode))) { |
1978 encoder_config.number_of_streams = 1; | 1978 encoder_config.number_of_streams = 1; |
1979 } | 1979 } |
1980 | 1980 |
1981 int stream_max_bitrate = parameters_.max_bitrate_bps; | 1981 int stream_max_bitrate = parameters_.max_bitrate_bps; |
1982 if (rtp_parameters_.encodings[0].max_bitrate_bps) { | 1982 if (rtp_parameters_.encodings[0].max_bitrate_bps) { |
1983 stream_max_bitrate = | 1983 stream_max_bitrate = |
1984 MinPositive(*(rtp_parameters_.encodings[0].max_bitrate_bps), | 1984 webrtc::MinPositive(*(rtp_parameters_.encodings[0].max_bitrate_bps), |
1985 parameters_.max_bitrate_bps); | 1985 parameters_.max_bitrate_bps); |
1986 } | 1986 } |
1987 | 1987 |
1988 int codec_max_bitrate_kbps; | 1988 int codec_max_bitrate_kbps; |
1989 if (codec.GetParam(kCodecParamMaxBitrate, &codec_max_bitrate_kbps)) { | 1989 if (codec.GetParam(kCodecParamMaxBitrate, &codec_max_bitrate_kbps)) { |
1990 stream_max_bitrate = codec_max_bitrate_kbps * 1000; | 1990 stream_max_bitrate = codec_max_bitrate_kbps * 1000; |
1991 } | 1991 } |
1992 encoder_config.max_bitrate_bps = stream_max_bitrate; | 1992 encoder_config.max_bitrate_bps = stream_max_bitrate; |
1993 | 1993 |
1994 int max_qp = kDefaultQpMax; | 1994 int max_qp = kDefaultQpMax; |
1995 codec.GetParam(kCodecParamMaxQuantization, &max_qp); | 1995 codec.GetParam(kCodecParamMaxQuantization, &max_qp); |
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2669 rtx_mapping[video_codecs[i].codec.id] != | 2669 rtx_mapping[video_codecs[i].codec.id] != |
2670 ulpfec_config.red_payload_type) { | 2670 ulpfec_config.red_payload_type) { |
2671 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2671 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2672 } | 2672 } |
2673 } | 2673 } |
2674 | 2674 |
2675 return video_codecs; | 2675 return video_codecs; |
2676 } | 2676 } |
2677 | 2677 |
2678 } // namespace cricket | 2678 } // namespace cricket |
OLD | NEW |