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

Side by Side Diff: talk/media/base/rtpdataengine.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 unified diff | Download patch
« no previous file with comments | « talk/media/base/rtpdataengine.h ('k') | talk/media/base/rtpdataengine_unittest.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 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 if (!known_codec) { 148 if (!known_codec) {
149 LOG(LS_WARNING) << 149 LOG(LS_WARNING) <<
150 "Failed to SetSendCodecs because there is no known codec."; 150 "Failed to SetSendCodecs because there is no known codec.";
151 return false; 151 return false;
152 } 152 }
153 153
154 send_codecs_ = codecs; 154 send_codecs_ = codecs;
155 return true; 155 return true;
156 } 156 }
157 157
158 bool RtpDataMediaChannel::SetSendParameters(const DataSendParameters& params) {
159 return (SetSendCodecs(params.codecs) &&
160 SetMaxSendBandwidth(params.max_bandwidth_bps));
161 }
162
163 bool RtpDataMediaChannel::SetRecvParameters(const DataRecvParameters& params) {
164 return SetRecvCodecs(params.codecs);
165 }
166
158 bool RtpDataMediaChannel::AddSendStream(const StreamParams& stream) { 167 bool RtpDataMediaChannel::AddSendStream(const StreamParams& stream) {
159 if (!stream.has_ssrcs()) { 168 if (!stream.has_ssrcs()) {
160 return false; 169 return false;
161 } 170 }
162 171
163 if (GetStreamBySsrc(send_streams_, stream.first_ssrc())) { 172 if (GetStreamBySsrc(send_streams_, stream.first_ssrc())) {
164 LOG(LS_WARNING) << "Not adding data send stream '" << stream.id 173 LOG(LS_WARNING) << "Not adding data send stream '" << stream.id
165 << "' with ssrc=" << stream.first_ssrc() 174 << "' with ssrc=" << stream.first_ssrc()
166 << " because stream already exists."; 175 << " because stream already exists.";
167 return false; 176 return false;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 362
354 MediaChannel::SendPacket(&packet); 363 MediaChannel::SendPacket(&packet);
355 send_limiter_->Use(packet_len, now); 364 send_limiter_->Use(packet_len, now);
356 if (result) { 365 if (result) {
357 *result = SDR_SUCCESS; 366 *result = SDR_SUCCESS;
358 } 367 }
359 return true; 368 return true;
360 } 369 }
361 370
362 } // namespace cricket 371 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/media/base/rtpdataengine.h ('k') | talk/media/base/rtpdataengine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698