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

Unified Diff: talk/media/webrtc/webrtcvideoengine2.cc

Issue 1327933002: Full impl of NnChannel::SetSendParameters and NnChannel::SetRecvParameters (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2.h ('k') | talk/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvideoengine2.cc
diff --git a/talk/media/webrtc/webrtcvideoengine2.cc b/talk/media/webrtc/webrtcvideoengine2.cc
index 85e67c4c6c418fbb434e4e0451c3bd4d9f175aef..7cd5c0622e7991c491dd270d00afcf854bb0a13d 100644
--- a/talk/media/webrtc/webrtcvideoengine2.cc
+++ b/talk/media/webrtc/webrtcvideoengine2.cc
@@ -602,10 +602,8 @@ WebRtcVideoChannel2* WebRtcVideoEngine2::CreateChannel(
const VideoOptions& options) {
RTC_DCHECK(initialized_);
LOG(LS_INFO) << "CreateChannel. Options: " << options.ToString();
- WebRtcVideoChannel2* channel = new WebRtcVideoChannel2(call, options,
+ return new WebRtcVideoChannel2(call, options, video_codecs_,
external_encoder_factory_, external_decoder_factory_);
- channel->SetRecvCodecs(video_codecs_);
- return channel;
}
const std::vector<VideoCodec>& WebRtcVideoEngine2::codecs() const {
@@ -764,6 +762,7 @@ std::vector<VideoCodec> WebRtcVideoEngine2::GetSupportedCodecs() const {
WebRtcVideoChannel2::WebRtcVideoChannel2(
webrtc::Call* call,
const VideoOptions& options,
+ const std::vector<VideoCodec>& recv_codecs,
WebRtcVideoEncoderFactory* external_encoder_factory,
WebRtcVideoDecoderFactory* external_decoder_factory)
: call_(call),
@@ -777,6 +776,7 @@ WebRtcVideoChannel2::WebRtcVideoChannel2(
rtcp_receiver_report_ssrc_ = kDefaultRtcpReceiverReportSsrc;
sending_ = false;
default_send_ssrc_ = 0;
+ SetRecvCodecs(recv_codecs);
}
void WebRtcVideoChannel2::SetDefaultOptions() {
@@ -1574,7 +1574,11 @@ bool WebRtcVideoChannel2::SetMaxSendBandwidth(int max_bitrate_bps) {
if (max_bitrate_bps == bitrate_config_.max_bitrate_bps)
return true;
- if (max_bitrate_bps <= 0) {
+ if (max_bitrate_bps < 0) {
+ // Option not set.
+ return true;
+ }
+ if (max_bitrate_bps == 0) {
// Unsetting max bitrate.
max_bitrate_bps = -1;
}
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2.h ('k') | talk/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698