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 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2442 } | 2442 } |
2443 | 2443 |
2444 void WebRtcVoiceMediaChannel::OnReadyToSend(bool ready) { | 2444 void WebRtcVoiceMediaChannel::OnReadyToSend(bool ready) { |
2445 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2445 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2446 LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready."); | 2446 LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready."); |
2447 call_->SignalChannelNetworkState( | 2447 call_->SignalChannelNetworkState( |
2448 webrtc::MediaType::AUDIO, | 2448 webrtc::MediaType::AUDIO, |
2449 ready ? webrtc::kNetworkUp : webrtc::kNetworkDown); | 2449 ready ? webrtc::kNetworkUp : webrtc::kNetworkDown); |
2450 } | 2450 } |
2451 | 2451 |
| 2452 void WebRtcVoiceMediaChannel::OnTransportOverheadChange( |
| 2453 int transport_overhead_per_packet) { |
| 2454 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 2455 call_->OnTransportOverheadChange(webrtc::MediaType::AUDIO, |
| 2456 transport_overhead_per_packet); |
| 2457 } |
| 2458 |
2452 bool WebRtcVoiceMediaChannel::GetStats(VoiceMediaInfo* info) { | 2459 bool WebRtcVoiceMediaChannel::GetStats(VoiceMediaInfo* info) { |
2453 TRACE_EVENT0("webrtc", "WebRtcVoiceMediaChannel::GetStats"); | 2460 TRACE_EVENT0("webrtc", "WebRtcVoiceMediaChannel::GetStats"); |
2454 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2461 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2455 RTC_DCHECK(info); | 2462 RTC_DCHECK(info); |
2456 | 2463 |
2457 // Get SSRC and stats for each sender. | 2464 // Get SSRC and stats for each sender. |
2458 RTC_DCHECK(info->senders.size() == 0); | 2465 RTC_DCHECK(info->senders.size() == 0); |
2459 for (const auto& stream : send_streams_) { | 2466 for (const auto& stream : send_streams_) { |
2460 webrtc::AudioSendStream::Stats stats = stream.second->GetStats(); | 2467 webrtc::AudioSendStream::Stats stats = stream.second->GetStats(); |
2461 VoiceSenderInfo sinfo; | 2468 VoiceSenderInfo sinfo; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2558 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2565 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2559 const auto it = send_streams_.find(ssrc); | 2566 const auto it = send_streams_.find(ssrc); |
2560 if (it != send_streams_.end()) { | 2567 if (it != send_streams_.end()) { |
2561 return it->second->channel(); | 2568 return it->second->channel(); |
2562 } | 2569 } |
2563 return -1; | 2570 return -1; |
2564 } | 2571 } |
2565 } // namespace cricket | 2572 } // namespace cricket |
2566 | 2573 |
2567 #endif // HAVE_WEBRTC_VOICE | 2574 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |