OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 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 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1601 return media_channel()->SetRtpReceiveParameters(ssrc, parameters); | 1601 return media_channel()->SetRtpReceiveParameters(ssrc, parameters); |
1602 } | 1602 } |
1603 | 1603 |
1604 bool VoiceChannel::GetStats(VoiceMediaInfo* stats) { | 1604 bool VoiceChannel::GetStats(VoiceMediaInfo* stats) { |
1605 return InvokeOnWorker(RTC_FROM_HERE, Bind(&VoiceMediaChannel::GetStats, | 1605 return InvokeOnWorker(RTC_FROM_HERE, Bind(&VoiceMediaChannel::GetStats, |
1606 media_channel(), stats)); | 1606 media_channel(), stats)); |
1607 } | 1607 } |
1608 | 1608 |
1609 std::vector<webrtc::RtpSource> VoiceChannel::GetSources(uint32_t ssrc) const { | 1609 std::vector<webrtc::RtpSource> VoiceChannel::GetSources(uint32_t ssrc) const { |
1610 return worker_thread()->Invoke<std::vector<webrtc::RtpSource>>( | 1610 return worker_thread()->Invoke<std::vector<webrtc::RtpSource>>( |
1611 RTC_FROM_HERE, | 1611 RTC_FROM_HERE, Bind(&VoiceChannel::GetSources_w, this, ssrc)); |
1612 Bind(&WebRtcVoiceMediaChannel::GetSources, | 1612 } |
1613 static_cast<WebRtcVoiceMediaChannel*>(media_channel()), ssrc)); | 1613 |
| 1614 std::vector<webrtc::RtpSource> VoiceChannel::GetSources_w(uint32_t ssrc) const { |
| 1615 RTC_DCHECK(worker_thread()->IsCurrent()); |
| 1616 return media_channel()->GetSources(ssrc); |
1614 } | 1617 } |
1615 | 1618 |
1616 void VoiceChannel::StartMediaMonitor(int cms) { | 1619 void VoiceChannel::StartMediaMonitor(int cms) { |
1617 media_monitor_.reset(new VoiceMediaMonitor(media_channel(), worker_thread(), | 1620 media_monitor_.reset(new VoiceMediaMonitor(media_channel(), worker_thread(), |
1618 rtc::Thread::Current())); | 1621 rtc::Thread::Current())); |
1619 media_monitor_->SignalUpdate.connect( | 1622 media_monitor_->SignalUpdate.connect( |
1620 this, &VoiceChannel::OnMediaMonitorUpdate); | 1623 this, &VoiceChannel::OnMediaMonitorUpdate); |
1621 media_monitor_->Start(cms); | 1624 media_monitor_->Start(cms); |
1622 } | 1625 } |
1623 | 1626 |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2400 | 2403 |
2401 void RtpDataChannel::OnDataChannelReadyToSend(bool writable) { | 2404 void RtpDataChannel::OnDataChannelReadyToSend(bool writable) { |
2402 // This is usded for congestion control to indicate that the stream is ready | 2405 // This is usded for congestion control to indicate that the stream is ready |
2403 // to send by the MediaChannel, as opposed to OnReadyToSend, which indicates | 2406 // to send by the MediaChannel, as opposed to OnReadyToSend, which indicates |
2404 // that the transport channel is ready. | 2407 // that the transport channel is ready. |
2405 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_READYTOSENDDATA, | 2408 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_READYTOSENDDATA, |
2406 new DataChannelReadyToSendMessageData(writable)); | 2409 new DataChannelReadyToSendMessageData(writable)); |
2407 } | 2410 } |
2408 | 2411 |
2409 } // namespace cricket | 2412 } // namespace cricket |
OLD | NEW |