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 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2399 } | 2399 } |
2400 | 2400 |
2401 void WebRtcVoiceMediaChannel::OnReadyToSend(bool ready) { | 2401 void WebRtcVoiceMediaChannel::OnReadyToSend(bool ready) { |
2402 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2402 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2403 LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready."); | 2403 LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready."); |
2404 call_->SignalChannelNetworkState( | 2404 call_->SignalChannelNetworkState( |
2405 webrtc::MediaType::AUDIO, | 2405 webrtc::MediaType::AUDIO, |
2406 ready ? webrtc::kNetworkUp : webrtc::kNetworkDown); | 2406 ready ? webrtc::kNetworkUp : webrtc::kNetworkDown); |
2407 } | 2407 } |
2408 | 2408 |
| 2409 void WebRtcVoiceMediaChannel::OnTransportOverheadChange( |
| 2410 int transport_overhead_per_packet) { |
| 2411 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 2412 call_->SignalTransportOverheadChange(webrtc::MediaType::AUDIO, |
| 2413 transport_overhead_per_packet); |
| 2414 } |
| 2415 |
2409 bool WebRtcVoiceMediaChannel::GetStats(VoiceMediaInfo* info) { | 2416 bool WebRtcVoiceMediaChannel::GetStats(VoiceMediaInfo* info) { |
2410 TRACE_EVENT0("webrtc", "WebRtcVoiceMediaChannel::GetStats"); | 2417 TRACE_EVENT0("webrtc", "WebRtcVoiceMediaChannel::GetStats"); |
2411 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2418 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2412 RTC_DCHECK(info); | 2419 RTC_DCHECK(info); |
2413 | 2420 |
2414 // Get SSRC and stats for each sender. | 2421 // Get SSRC and stats for each sender. |
2415 RTC_DCHECK(info->senders.size() == 0); | 2422 RTC_DCHECK(info->senders.size() == 0); |
2416 for (const auto& stream : send_streams_) { | 2423 for (const auto& stream : send_streams_) { |
2417 webrtc::AudioSendStream::Stats stats = stream.second->GetStats(); | 2424 webrtc::AudioSendStream::Stats stats = stream.second->GetStats(); |
2418 VoiceSenderInfo sinfo; | 2425 VoiceSenderInfo sinfo; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2514 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2521 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2515 const auto it = send_streams_.find(ssrc); | 2522 const auto it = send_streams_.find(ssrc); |
2516 if (it != send_streams_.end()) { | 2523 if (it != send_streams_.end()) { |
2517 return it->second->channel(); | 2524 return it->second->channel(); |
2518 } | 2525 } |
2519 return -1; | 2526 return -1; |
2520 } | 2527 } |
2521 } // namespace cricket | 2528 } // namespace cricket |
2522 | 2529 |
2523 #endif // HAVE_WEBRTC_VOICE | 2530 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |