Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: webrtc/media/engine/webrtcvideoengine.cc

Issue 2924393002: Move MinPositive to call.h (Closed)
Patch Set: Rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/base/mediachannel.h ('k') | webrtc/media/engine/webrtcvoiceengine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/media/base/mediachannel.h ('k') | webrtc/media/engine/webrtcvoiceengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698