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 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2305 | 2305 |
2306 // SR may continue RR and any RR entry may correspond to any one of the send | 2306 // SR may continue RR and any RR entry may correspond to any one of the send |
2307 // channels. So all RTCP packets must be forwarded all send channels. VoE | 2307 // channels. So all RTCP packets must be forwarded all send channels. VoE |
2308 // will filter out RR internally. | 2308 // will filter out RR internally. |
2309 for (const auto& ch : send_streams_) { | 2309 for (const auto& ch : send_streams_) { |
2310 engine()->voe()->network()->ReceivedRTCPPacket( | 2310 engine()->voe()->network()->ReceivedRTCPPacket( |
2311 ch.second->channel(), packet->data(), packet->size()); | 2311 ch.second->channel(), packet->data(), packet->size()); |
2312 } | 2312 } |
2313 } | 2313 } |
2314 | 2314 |
| 2315 void WebRtcVoiceMediaChannel::OnReadyToSend(bool ready) { |
| 2316 LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready."); |
| 2317 call_->SignalNetworkState(ready ? webrtc::kNetworkUp : webrtc::kNetworkDown); |
| 2318 } |
| 2319 |
2315 bool WebRtcVoiceMediaChannel::MuteStream(uint32_t ssrc, bool muted) { | 2320 bool WebRtcVoiceMediaChannel::MuteStream(uint32_t ssrc, bool muted) { |
2316 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2321 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2317 int channel = GetSendChannelId(ssrc); | 2322 int channel = GetSendChannelId(ssrc); |
2318 if (channel == -1) { | 2323 if (channel == -1) { |
2319 LOG(LS_WARNING) << "The specified ssrc " << ssrc << " is not in use."; | 2324 LOG(LS_WARNING) << "The specified ssrc " << ssrc << " is not in use."; |
2320 return false; | 2325 return false; |
2321 } | 2326 } |
2322 if (engine()->voe()->volume()->SetInputMute(channel, muted) == -1) { | 2327 if (engine()->voe()->volume()->SetInputMute(channel, muted) == -1) { |
2323 LOG_RTCERR2(SetInputMute, channel, muted); | 2328 LOG_RTCERR2(SetInputMute, channel, muted); |
2324 return false; | 2329 return false; |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2520 } | 2525 } |
2521 } else { | 2526 } else { |
2522 LOG(LS_INFO) << "Stopping playout for channel #" << channel; | 2527 LOG(LS_INFO) << "Stopping playout for channel #" << channel; |
2523 engine()->voe()->base()->StopPlayout(channel); | 2528 engine()->voe()->base()->StopPlayout(channel); |
2524 } | 2529 } |
2525 return true; | 2530 return true; |
2526 } | 2531 } |
2527 } // namespace cricket | 2532 } // namespace cricket |
2528 | 2533 |
2529 #endif // HAVE_WEBRTC_VOICE | 2534 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |