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

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: Comment 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
« webrtc/api/mediacontroller.cc ('K') | « 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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 650
651 return true; 651 return true;
652 } 652 }
653 653
654 void WebRtcSession::Close() { 654 void WebRtcSession::Close() {
655 SetState(STATE_CLOSED); 655 SetState(STATE_CLOSED);
656 RemoveUnusedChannels(nullptr); 656 RemoveUnusedChannels(nullptr);
657 ASSERT(!voice_channel_); 657 ASSERT(!voice_channel_);
658 ASSERT(!video_channel_); 658 ASSERT(!video_channel_);
659 ASSERT(!data_channel_); 659 ASSERT(!data_channel_);
660 media_controller_->Close();
660 } 661 }
661 662
662 cricket::BaseChannel* WebRtcSession::GetChannel( 663 cricket::BaseChannel* WebRtcSession::GetChannel(
663 const std::string& content_name) { 664 const std::string& content_name) {
664 if (voice_channel() && voice_channel()->content_name() == content_name) { 665 if (voice_channel() && voice_channel()->content_name() == content_name) {
665 return voice_channel(); 666 return voice_channel();
666 } 667 }
667 if (video_channel() && video_channel()->content_name() == content_name) { 668 if (video_channel() && video_channel()->content_name() == content_name) {
668 return video_channel(); 669 return video_channel();
669 } 670 }
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
2119 } 2120 }
2120 } 2121 }
2121 2122
2122 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, 2123 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel,
2123 const rtc::SentPacket& sent_packet) { 2124 const rtc::SentPacket& sent_packet) {
2124 RTC_DCHECK(worker_thread()->IsCurrent()); 2125 RTC_DCHECK(worker_thread()->IsCurrent());
2125 media_controller_->call_w()->OnSentPacket(sent_packet); 2126 media_controller_->call_w()->OnSentPacket(sent_packet);
2126 } 2127 }
2127 2128
2128 } // namespace webrtc 2129 } // namespace webrtc
OLDNEW
« webrtc/api/mediacontroller.cc ('K') | « webrtc/api/statscollector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698