OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2392 if (bps < codec.rate) { | 2392 if (bps < codec.rate) { |
2393 LOG(LS_INFO) << "Failed to set codec " << codec.plname | 2393 LOG(LS_INFO) << "Failed to set codec " << codec.plname |
2394 << " to bitrate " << bps << " bps" | 2394 << " to bitrate " << bps << " bps" |
2395 << ", requires at least " << codec.rate << " bps."; | 2395 << ", requires at least " << codec.rate << " bps."; |
2396 return false; | 2396 return false; |
2397 } | 2397 } |
2398 return true; | 2398 return true; |
2399 } | 2399 } |
2400 } | 2400 } |
2401 | 2401 |
2402 void WebRtcVoiceMediaChannel::OnReadyToSend(bool ready) | |
2403 { | |
2404 LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready."); | |
2405 call_->SignalChannelNetworkState( | |
2406 webrtc::MediaType::AUDIO, | |
the sun
2016/03/07 14:16:43
nit: indent + make the ternary a single line
skvlad
2016/03/07 19:20:56
Done.
| |
2407 ready ? | |
2408 webrtc::kNetworkUp : webrtc::kNetworkDown); | |
2409 } | |
2410 | |
2402 bool WebRtcVoiceMediaChannel::GetStats(VoiceMediaInfo* info) { | 2411 bool WebRtcVoiceMediaChannel::GetStats(VoiceMediaInfo* info) { |
2403 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2412 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2404 RTC_DCHECK(info); | 2413 RTC_DCHECK(info); |
2405 | 2414 |
2406 // Get SSRC and stats for each sender. | 2415 // Get SSRC and stats for each sender. |
2407 RTC_DCHECK(info->senders.size() == 0); | 2416 RTC_DCHECK(info->senders.size() == 0); |
2408 for (const auto& stream : send_streams_) { | 2417 for (const auto& stream : send_streams_) { |
2409 webrtc::AudioSendStream::Stats stats = stream.second->GetStats(); | 2418 webrtc::AudioSendStream::Stats stats = stream.second->GetStats(); |
2410 VoiceSenderInfo sinfo; | 2419 VoiceSenderInfo sinfo; |
2411 sinfo.add_ssrc(stats.local_ssrc); | 2420 sinfo.add_ssrc(stats.local_ssrc); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2520 } | 2529 } |
2521 } else { | 2530 } else { |
2522 LOG(LS_INFO) << "Stopping playout for channel #" << channel; | 2531 LOG(LS_INFO) << "Stopping playout for channel #" << channel; |
2523 engine()->voe()->base()->StopPlayout(channel); | 2532 engine()->voe()->base()->StopPlayout(channel); |
2524 } | 2533 } |
2525 return true; | 2534 return true; |
2526 } | 2535 } |
2527 } // namespace cricket | 2536 } // namespace cricket |
2528 | 2537 |
2529 #endif // HAVE_WEBRTC_VOICE | 2538 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |