Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(894)

Side by Side Diff: webrtc/pc/channel.cc

Issue 2854123003: Build WebRTC with data channel only. (Closed)
Patch Set: CR comments. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 webrtc::RtpParameters parameters) { 1600 webrtc::RtpParameters parameters) {
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 #if defined(HAVE_WEBRTC_VOICE) && defined(HAVE_WEBRTC_VIDEO)
Taylor Brandstetter 2017/05/11 04:43:11 Only need HAVE_WEBRTC_VOICE, technically.
Zhi Huang 2017/05/12 20:05:33 Done.
1610 return worker_thread()->Invoke<std::vector<webrtc::RtpSource>>( 1611 return worker_thread()->Invoke<std::vector<webrtc::RtpSource>>(
1611 RTC_FROM_HERE, 1612 RTC_FROM_HERE,
1612 Bind(&WebRtcVoiceMediaChannel::GetSources, 1613 Bind(&WebRtcVoiceMediaChannel::GetSources,
1613 static_cast<WebRtcVoiceMediaChannel*>(media_channel()), ssrc)); 1614 static_cast<WebRtcVoiceMediaChannel*>(media_channel()), ssrc));
1615 #else
1616 return std::vector<webrtc::RtpSource>();
1617 #endif
1614 } 1618 }
1615 1619
1616 void VoiceChannel::StartMediaMonitor(int cms) { 1620 void VoiceChannel::StartMediaMonitor(int cms) {
1617 media_monitor_.reset(new VoiceMediaMonitor(media_channel(), worker_thread(), 1621 media_monitor_.reset(new VoiceMediaMonitor(media_channel(), worker_thread(),
1618 rtc::Thread::Current())); 1622 rtc::Thread::Current()));
1619 media_monitor_->SignalUpdate.connect( 1623 media_monitor_->SignalUpdate.connect(
1620 this, &VoiceChannel::OnMediaMonitorUpdate); 1624 this, &VoiceChannel::OnMediaMonitorUpdate);
1621 media_monitor_->Start(cms); 1625 media_monitor_->Start(cms);
1622 } 1626 }
1623 1627
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
2400 2404
2401 void RtpDataChannel::OnDataChannelReadyToSend(bool writable) { 2405 void RtpDataChannel::OnDataChannelReadyToSend(bool writable) {
2402 // This is usded for congestion control to indicate that the stream is ready 2406 // 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 2407 // to send by the MediaChannel, as opposed to OnReadyToSend, which indicates
2404 // that the transport channel is ready. 2408 // that the transport channel is ready.
2405 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_READYTOSENDDATA, 2409 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_READYTOSENDDATA,
2406 new DataChannelReadyToSendMessageData(writable)); 2410 new DataChannelReadyToSendMessageData(writable));
2407 } 2411 }
2408 2412
2409 } // namespace cricket 2413 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698