| OLD | NEW |
| 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 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1251 } | 1251 } |
| 1252 | 1252 |
| 1253 void WebRtcSession::SetAudioSend(uint32 ssrc, bool enable, | 1253 void WebRtcSession::SetAudioSend(uint32 ssrc, bool enable, |
| 1254 const cricket::AudioOptions& options, | 1254 const cricket::AudioOptions& options, |
| 1255 cricket::AudioRenderer* renderer) { | 1255 cricket::AudioRenderer* renderer) { |
| 1256 ASSERT(signaling_thread()->IsCurrent()); | 1256 ASSERT(signaling_thread()->IsCurrent()); |
| 1257 if (!voice_channel_) { | 1257 if (!voice_channel_) { |
| 1258 LOG(LS_ERROR) << "SetAudioSend: No audio channel exists."; | 1258 LOG(LS_ERROR) << "SetAudioSend: No audio channel exists."; |
| 1259 return; | 1259 return; |
| 1260 } | 1260 } |
| 1261 if (!voice_channel_->SetAudioSend(ssrc, !enable, &options, renderer)) { | 1261 if (!voice_channel_->SetAudioSend(ssrc, enable, &options, renderer)) { |
| 1262 LOG(LS_ERROR) << "SetAudioSend: ssrc is incorrect: " << ssrc; | 1262 LOG(LS_ERROR) << "SetAudioSend: ssrc is incorrect: " << ssrc; |
| 1263 } | 1263 } |
| 1264 } | 1264 } |
| 1265 | 1265 |
| 1266 void WebRtcSession::SetAudioPlayoutVolume(uint32 ssrc, double volume) { | 1266 void WebRtcSession::SetAudioPlayoutVolume(uint32 ssrc, double volume) { |
| 1267 ASSERT(signaling_thread()->IsCurrent()); | 1267 ASSERT(signaling_thread()->IsCurrent()); |
| 1268 ASSERT(volume >= 0 && volume <= 10); | 1268 ASSERT(volume >= 0 && volume <= 10); |
| 1269 if (!voice_channel_) { | 1269 if (!voice_channel_) { |
| 1270 LOG(LS_ERROR) << "SetAudioPlayoutVolume: No audio channel exists."; | 1270 LOG(LS_ERROR) << "SetAudioPlayoutVolume: No audio channel exists."; |
| 1271 return; | 1271 return; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 } | 1312 } |
| 1313 } | 1313 } |
| 1314 | 1314 |
| 1315 void WebRtcSession::SetVideoSend(uint32 ssrc, bool enable, | 1315 void WebRtcSession::SetVideoSend(uint32 ssrc, bool enable, |
| 1316 const cricket::VideoOptions* options) { | 1316 const cricket::VideoOptions* options) { |
| 1317 ASSERT(signaling_thread()->IsCurrent()); | 1317 ASSERT(signaling_thread()->IsCurrent()); |
| 1318 if (!video_channel_) { | 1318 if (!video_channel_) { |
| 1319 LOG(LS_WARNING) << "SetVideoSend: No video channel exists."; | 1319 LOG(LS_WARNING) << "SetVideoSend: No video channel exists."; |
| 1320 return; | 1320 return; |
| 1321 } | 1321 } |
| 1322 if (!video_channel_->SetVideoSend(ssrc, !enable, options)) { | 1322 if (!video_channel_->SetVideoSend(ssrc, enable, options)) { |
| 1323 // Allow that MuteStream fail if |enable| is false but assert otherwise. | 1323 // Allow that MuteStream fail if |enable| is false but assert otherwise. |
| 1324 // This in the normal case when the underlying media channel has already | 1324 // This in the normal case when the underlying media channel has already |
| 1325 // been deleted. | 1325 // been deleted. |
| 1326 ASSERT(enable == false); | 1326 ASSERT(enable == false); |
| 1327 } | 1327 } |
| 1328 } | 1328 } |
| 1329 | 1329 |
| 1330 bool WebRtcSession::CanInsertDtmf(const std::string& track_id) { | 1330 bool WebRtcSession::CanInsertDtmf(const std::string& track_id) { |
| 1331 ASSERT(signaling_thread()->IsCurrent()); | 1331 ASSERT(signaling_thread()->IsCurrent()); |
| 1332 if (!voice_channel_) { | 1332 if (!voice_channel_) { |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2173 if (!srtp_cipher.empty()) { | 2173 if (!srtp_cipher.empty()) { |
| 2174 metrics_observer_->IncrementSparseEnumCounter( | 2174 metrics_observer_->IncrementSparseEnumCounter( |
| 2175 srtp_counter_type, rtc::GetSrtpCryptoSuiteFromName(srtp_cipher)); | 2175 srtp_counter_type, rtc::GetSrtpCryptoSuiteFromName(srtp_cipher)); |
| 2176 } | 2176 } |
| 2177 if (ssl_cipher) { | 2177 if (ssl_cipher) { |
| 2178 metrics_observer_->IncrementSparseEnumCounter(ssl_counter_type, ssl_cipher); | 2178 metrics_observer_->IncrementSparseEnumCounter(ssl_counter_type, ssl_cipher); |
| 2179 } | 2179 } |
| 2180 } | 2180 } |
| 2181 | 2181 |
| 2182 } // namespace webrtc | 2182 } // namespace webrtc |
| OLD | NEW |