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

Side by Side Diff: webrtc/api/peerconnection.h

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: Ugly but implemented Created 4 years, 10 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 | « no previous file | webrtc/api/peerconnection.cc » ('j') | webrtc/api/peerconnection.cc » ('J')
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 rtc::Thread* signaling_thread() const { 189 rtc::Thread* signaling_thread() const {
190 return factory_->signaling_thread(); 190 return factory_->signaling_thread();
191 } 191 }
192 192
193 void PostSetSessionDescriptionFailure(SetSessionDescriptionObserver* observer, 193 void PostSetSessionDescriptionFailure(SetSessionDescriptionObserver* observer,
194 const std::string& error); 194 const std::string& error);
195 void PostCreateSessionDescriptionFailure( 195 void PostCreateSessionDescriptionFailure(
196 CreateSessionDescriptionObserver* observer, 196 CreateSessionDescriptionObserver* observer,
197 const std::string& error); 197 const std::string& error);
198 198
199 void LateInitialize();
200
199 bool IsClosed() const { 201 bool IsClosed() const {
200 return signaling_state_ == PeerConnectionInterface::kClosed; 202 return signaling_state_ == PeerConnectionInterface::kClosed;
201 } 203 }
202 204
203 // Returns a MediaSessionOptions struct with options decided by |options|, 205 // Returns a MediaSessionOptions struct with options decided by |options|,
204 // the local MediaStreams and DataChannels. 206 // the local MediaStreams and DataChannels.
205 virtual bool GetOptionsForOffer( 207 virtual bool GetOptionsForOffer(
206 const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options, 208 const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options,
207 cricket::MediaSessionOptions* session_options); 209 cricket::MediaSessionOptions* session_options);
208 210
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 370
369 std::vector<rtc::scoped_refptr<RtpSenderInterface>> senders_; 371 std::vector<rtc::scoped_refptr<RtpSenderInterface>> senders_;
370 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_; 372 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_;
371 373
372 // The session_ scoped_ptr is declared at the bottom of PeerConnection 374 // The session_ scoped_ptr is declared at the bottom of PeerConnection
373 // because its destruction fires signals (such as VoiceChannelDestroyed) 375 // because its destruction fires signals (such as VoiceChannelDestroyed)
374 // which will trigger some final actions in PeerConnection... 376 // which will trigger some final actions in PeerConnection...
375 rtc::scoped_ptr<WebRtcSession> session_; 377 rtc::scoped_ptr<WebRtcSession> session_;
376 // ... But stats_ depends on session_ so it should be destroyed even earlier. 378 // ... But stats_ depends on session_ so it should be destroyed even earlier.
377 rtc::scoped_ptr<StatsCollector> stats_; 379 rtc::scoped_ptr<StatsCollector> stats_;
380 cricket::MediaConfig media_config_;
378 }; 381 };
379 382
380 } // namespace webrtc 383 } // namespace webrtc
381 384
382 #endif // WEBRTC_API_PEERCONNECTION_H_ 385 #endif // WEBRTC_API_PEERCONNECTION_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/peerconnection.cc » ('j') | webrtc/api/peerconnection.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698