| 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 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1852 // By default, the stream count for the codec configuration should match the | 1852 // By default, the stream count for the codec configuration should match the |
| 1853 // number of negotiated ssrcs. But if the codec is blacklisted for simulcast | 1853 // number of negotiated ssrcs. But if the codec is blacklisted for simulcast |
| 1854 // or a screencast (and not in simulcast screenshare experiment), only | 1854 // or a screencast (and not in simulcast screenshare experiment), only |
| 1855 // configure a single stream. | 1855 // configure a single stream. |
| 1856 encoder_config.number_of_streams = parameters_.config.rtp.ssrcs.size(); | 1856 encoder_config.number_of_streams = parameters_.config.rtp.ssrcs.size(); |
| 1857 if (IsCodecBlacklistedForSimulcast(codec.name) || | 1857 if (IsCodecBlacklistedForSimulcast(codec.name) || |
| 1858 (is_screencast && !UseSimulcastScreenshare())) { | 1858 (is_screencast && !UseSimulcastScreenshare())) { |
| 1859 encoder_config.number_of_streams = 1; | 1859 encoder_config.number_of_streams = 1; |
| 1860 } | 1860 } |
| 1861 | 1861 |
| 1862 int stream_max_bitrate = | 1862 int stream_max_bitrate = parameters_.max_bitrate_bps; |
| 1863 MinPositive(rtp_parameters_.encodings[0].max_bitrate_bps, | 1863 if (rtp_parameters_.encodings[0].max_bitrate_bps) { |
| 1864 parameters_.max_bitrate_bps); | 1864 stream_max_bitrate = |
| 1865 MinPositive(*(rtp_parameters_.encodings[0].max_bitrate_bps), |
| 1866 parameters_.max_bitrate_bps); |
| 1867 } |
| 1865 | 1868 |
| 1866 int codec_max_bitrate_kbps; | 1869 int codec_max_bitrate_kbps; |
| 1867 if (codec.GetParam(kCodecParamMaxBitrate, &codec_max_bitrate_kbps)) { | 1870 if (codec.GetParam(kCodecParamMaxBitrate, &codec_max_bitrate_kbps)) { |
| 1868 stream_max_bitrate = codec_max_bitrate_kbps * 1000; | 1871 stream_max_bitrate = codec_max_bitrate_kbps * 1000; |
| 1869 } | 1872 } |
| 1870 encoder_config.max_bitrate_bps = stream_max_bitrate; | 1873 encoder_config.max_bitrate_bps = stream_max_bitrate; |
| 1871 | 1874 |
| 1872 int max_qp = kDefaultQpMax; | 1875 int max_qp = kDefaultQpMax; |
| 1873 codec.GetParam(kCodecParamMaxQuantization, &max_qp); | 1876 codec.GetParam(kCodecParamMaxQuantization, &max_qp); |
| 1874 encoder_config.video_stream_factory = | 1877 encoder_config.video_stream_factory = |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2517 rtx_mapping[video_codecs[i].codec.id] != | 2520 rtx_mapping[video_codecs[i].codec.id] != |
| 2518 ulpfec_config.red_payload_type) { | 2521 ulpfec_config.red_payload_type) { |
| 2519 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2522 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2520 } | 2523 } |
| 2521 } | 2524 } |
| 2522 | 2525 |
| 2523 return video_codecs; | 2526 return video_codecs; |
| 2524 } | 2527 } |
| 2525 | 2528 |
| 2526 } // namespace cricket | 2529 } // namespace cricket |
| OLD | NEW |