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

Side by Side Diff: webrtc/api/webrtcsession.cc

Issue 1713043002: Late initialize MediaController, for less resource i.e. ProcessThread, usage by PeerConnection. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 9 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
« no previous file with comments | « webrtc/api/statscollector.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 641
642 return true; 642 return true;
643 } 643 }
644 644
645 void WebRtcSession::Close() { 645 void WebRtcSession::Close() {
646 SetState(STATE_CLOSED); 646 SetState(STATE_CLOSED);
647 RemoveUnusedChannels(nullptr); 647 RemoveUnusedChannels(nullptr);
648 ASSERT(!voice_channel_); 648 ASSERT(!voice_channel_);
649 ASSERT(!video_channel_); 649 ASSERT(!video_channel_);
650 ASSERT(!data_channel_); 650 ASSERT(!data_channel_);
651 media_controller_->Close();
651 } 652 }
652 653
653 cricket::BaseChannel* WebRtcSession::GetChannel( 654 cricket::BaseChannel* WebRtcSession::GetChannel(
654 const std::string& content_name) { 655 const std::string& content_name) {
655 if (voice_channel() && voice_channel()->content_name() == content_name) { 656 if (voice_channel() && voice_channel()->content_name() == content_name) {
656 return voice_channel(); 657 return voice_channel();
657 } 658 }
658 if (video_channel() && video_channel()->content_name() == content_name) { 659 if (video_channel() && video_channel()->content_name() == content_name) {
659 return video_channel(); 660 return video_channel();
660 } 661 }
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 } 2111 }
2111 } 2112 }
2112 2113
2113 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, 2114 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel,
2114 const rtc::SentPacket& sent_packet) { 2115 const rtc::SentPacket& sent_packet) {
2115 RTC_DCHECK(worker_thread()->IsCurrent()); 2116 RTC_DCHECK(worker_thread()->IsCurrent());
2116 media_controller_->call_w()->OnSentPacket(sent_packet); 2117 media_controller_->call_w()->OnSentPacket(sent_packet);
2117 } 2118 }
2118 2119
2119 } // namespace webrtc 2120 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/statscollector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698