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

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

Issue 1968393002: Propogate network-worker thread split to api (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 STATE_CLOSED, // Close() was called. 131 STATE_CLOSED, // Close() was called.
132 }; 132 };
133 133
134 enum Error { 134 enum Error {
135 ERROR_NONE = 0, // no error 135 ERROR_NONE = 0, // no error
136 ERROR_CONTENT = 1, // channel errors in SetLocalContent/SetRemoteContent 136 ERROR_CONTENT = 1, // channel errors in SetLocalContent/SetRemoteContent
137 ERROR_TRANSPORT = 2, // transport error of some kind 137 ERROR_TRANSPORT = 2, // transport error of some kind
138 }; 138 };
139 139
140 WebRtcSession(webrtc::MediaControllerInterface* media_controller, 140 WebRtcSession(webrtc::MediaControllerInterface* media_controller,
141 rtc::Thread* network_thread,
142 rtc::Thread* worker_thread,
141 rtc::Thread* signaling_thread, 143 rtc::Thread* signaling_thread,
142 rtc::Thread* worker_thread,
143 cricket::PortAllocator* port_allocator); 144 cricket::PortAllocator* port_allocator);
144 virtual ~WebRtcSession(); 145 virtual ~WebRtcSession();
145 146
146 // These are const to allow them to be called from const methods. 147 // These are const to allow them to be called from const methods.
148 rtc::Thread* worker_thread() const { return worker_thread_; }
147 rtc::Thread* signaling_thread() const { return signaling_thread_; } 149 rtc::Thread* signaling_thread() const { return signaling_thread_; }
148 rtc::Thread* worker_thread() const { return worker_thread_; }
149 cricket::PortAllocator* port_allocator() const { return port_allocator_; } 150 cricket::PortAllocator* port_allocator() const { return port_allocator_; }
150 151
151 // The ID of this session. 152 // The ID of this session.
152 const std::string& id() const { return sid_; } 153 const std::string& id() const { return sid_; }
153 154
154 bool Initialize( 155 bool Initialize(
155 const PeerConnectionFactoryInterface::Options& options, 156 const PeerConnectionFactoryInterface::Options& options,
156 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store, 157 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
157 const PeerConnectionInterface::RTCConfiguration& rtc_configuration); 158 const PeerConnectionInterface::RTCConfiguration& rtc_configuration);
158 // Deletes the voice, video and data channel and changes the session state 159 // Deletes the voice, video and data channel and changes the session state
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 // Reports stats for all transports in use. 461 // Reports stats for all transports in use.
461 void ReportTransportStats(); 462 void ReportTransportStats();
462 463
463 // Gather the usage of IPv4/IPv6 as best connection. 464 // Gather the usage of IPv4/IPv6 as best connection.
464 void ReportBestConnectionState(const cricket::TransportStats& stats); 465 void ReportBestConnectionState(const cricket::TransportStats& stats);
465 466
466 void ReportNegotiatedCiphers(const cricket::TransportStats& stats); 467 void ReportNegotiatedCiphers(const cricket::TransportStats& stats);
467 468
468 void OnSentPacket_w(const rtc::SentPacket& sent_packet); 469 void OnSentPacket_w(const rtc::SentPacket& sent_packet);
469 470
471 rtc::Thread* const worker_thread_;
470 rtc::Thread* const signaling_thread_; 472 rtc::Thread* const signaling_thread_;
471 rtc::Thread* const worker_thread_;
472 cricket::PortAllocator* const port_allocator_; 473 cricket::PortAllocator* const port_allocator_;
473 474
474 State state_ = STATE_INIT; 475 State state_ = STATE_INIT;
475 Error error_ = ERROR_NONE; 476 Error error_ = ERROR_NONE;
476 std::string error_desc_; 477 std::string error_desc_;
477 478
478 const std::string sid_; 479 const std::string sid_;
479 bool initial_offerer_ = false; 480 bool initial_offerer_ = false;
480 481
481 std::unique_ptr<cricket::TransportController> transport_controller_; 482 std::unique_ptr<cricket::TransportController> transport_controller_;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 PeerConnectionInterface::BundlePolicy bundle_policy_; 515 PeerConnectionInterface::BundlePolicy bundle_policy_;
515 516
516 // Declares the RTCP mux policy for the WebRTCSession. 517 // Declares the RTCP mux policy for the WebRTCSession.
517 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; 518 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_;
518 519
519 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); 520 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession);
520 }; 521 };
521 } // namespace webrtc 522 } // namespace webrtc
522 523
523 #endif // WEBRTC_API_WEBRTCSESSION_H_ 524 #endif // WEBRTC_API_WEBRTCSESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698