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 2401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2412 if (bps < codec.rate) { | 2412 if (bps < codec.rate) { |
2413 LOG(LS_INFO) << "Failed to set codec " << codec.plname | 2413 LOG(LS_INFO) << "Failed to set codec " << codec.plname |
2414 << " to bitrate " << bps << " bps" | 2414 << " to bitrate " << bps << " bps" |
2415 << ", requires at least " << codec.rate << " bps."; | 2415 << ", requires at least " << codec.rate << " bps."; |
2416 return false; | 2416 return false; |
2417 } | 2417 } |
2418 return true; | 2418 return true; |
2419 } | 2419 } |
2420 } | 2420 } |
2421 | 2421 |
| 2422 void WebRtcVoiceMediaChannel::OnReadyToSend(bool ready) { |
| 2423 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 2424 LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready."); |
| 2425 call_->SignalChannelNetworkState( |
| 2426 webrtc::MediaType::AUDIO, |
| 2427 ready ? webrtc::kNetworkUp : webrtc::kNetworkDown); |
| 2428 } |
| 2429 |
2422 bool WebRtcVoiceMediaChannel::GetStats(VoiceMediaInfo* info) { | 2430 bool WebRtcVoiceMediaChannel::GetStats(VoiceMediaInfo* info) { |
2423 TRACE_EVENT0("webrtc", "WebRtcVoiceMediaChannel::GetStats"); | 2431 TRACE_EVENT0("webrtc", "WebRtcVoiceMediaChannel::GetStats"); |
2424 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2432 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2425 RTC_DCHECK(info); | 2433 RTC_DCHECK(info); |
2426 | 2434 |
2427 // Get SSRC and stats for each sender. | 2435 // Get SSRC and stats for each sender. |
2428 RTC_DCHECK(info->senders.size() == 0); | 2436 RTC_DCHECK(info->senders.size() == 0); |
2429 for (const auto& stream : send_streams_) { | 2437 for (const auto& stream : send_streams_) { |
2430 webrtc::AudioSendStream::Stats stats = stream.second->GetStats(); | 2438 webrtc::AudioSendStream::Stats stats = stream.second->GetStats(); |
2431 VoiceSenderInfo sinfo; | 2439 VoiceSenderInfo sinfo; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2540 } | 2548 } |
2541 } else { | 2549 } else { |
2542 LOG(LS_INFO) << "Stopping playout for channel #" << channel; | 2550 LOG(LS_INFO) << "Stopping playout for channel #" << channel; |
2543 engine()->voe()->base()->StopPlayout(channel); | 2551 engine()->voe()->base()->StopPlayout(channel); |
2544 } | 2552 } |
2545 return true; | 2553 return true; |
2546 } | 2554 } |
2547 } // namespace cricket | 2555 } // namespace cricket |
2548 | 2556 |
2549 #endif // HAVE_WEBRTC_VOICE | 2557 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |