OLD | NEW |
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 21 matching lines...) Expand all Loading... |
32 #include "webrtc/pc/mediasession.h" | 32 #include "webrtc/pc/mediasession.h" |
33 | 33 |
34 namespace cricket { | 34 namespace cricket { |
35 | 35 |
36 class ChannelManager; | 36 class ChannelManager; |
37 class DataChannel; | 37 class DataChannel; |
38 class StatsReport; | 38 class StatsReport; |
39 class VideoChannel; | 39 class VideoChannel; |
40 class VoiceChannel; | 40 class VoiceChannel; |
41 | 41 |
| 42 #ifdef HAVE_QUIC |
| 43 class QuicTransportChannel; |
| 44 #endif // HAVE_QUIC |
| 45 |
42 } // namespace cricket | 46 } // namespace cricket |
43 | 47 |
44 namespace webrtc { | 48 namespace webrtc { |
45 | 49 |
46 class IceRestartAnswerLatch; | 50 class IceRestartAnswerLatch; |
47 class JsepIceCandidate; | 51 class JsepIceCandidate; |
48 class MediaStreamSignaling; | 52 class MediaStreamSignaling; |
49 class WebRtcSessionDescriptionFactory; | 53 class WebRtcSessionDescriptionFactory; |
50 | 54 |
51 extern const char kBundleWithoutRtcpMux[]; | 55 extern const char kBundleWithoutRtcpMux[]; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 }; | 142 }; |
139 | 143 |
140 WebRtcSession(webrtc::MediaControllerInterface* media_controller, | 144 WebRtcSession(webrtc::MediaControllerInterface* media_controller, |
141 rtc::Thread* network_thread, | 145 rtc::Thread* network_thread, |
142 rtc::Thread* worker_thread, | 146 rtc::Thread* worker_thread, |
143 rtc::Thread* signaling_thread, | 147 rtc::Thread* signaling_thread, |
144 cricket::PortAllocator* port_allocator); | 148 cricket::PortAllocator* port_allocator); |
145 virtual ~WebRtcSession(); | 149 virtual ~WebRtcSession(); |
146 | 150 |
147 // These are const to allow them to be called from const methods. | 151 // These are const to allow them to be called from const methods. |
| 152 rtc::Thread* network_thread() const { return network_thread_; } |
148 rtc::Thread* worker_thread() const { return worker_thread_; } | 153 rtc::Thread* worker_thread() const { return worker_thread_; } |
149 rtc::Thread* signaling_thread() const { return signaling_thread_; } | 154 rtc::Thread* signaling_thread() const { return signaling_thread_; } |
150 | 155 |
151 // The ID of this session. | 156 // The ID of this session. |
152 const std::string& id() const { return sid_; } | 157 const std::string& id() const { return sid_; } |
153 | 158 |
154 bool Initialize( | 159 bool Initialize( |
155 const PeerConnectionFactoryInterface::Options& options, | 160 const PeerConnectionFactoryInterface::Options& options, |
156 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator, | 161 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator, |
157 const PeerConnectionInterface::RTCConfiguration& rtc_configuration); | 162 const PeerConnectionInterface::RTCConfiguration& rtc_configuration); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 sigslot::signal0<> SignalVideoChannelDestroyed; | 335 sigslot::signal0<> SignalVideoChannelDestroyed; |
331 sigslot::signal0<> SignalDataChannelCreated; | 336 sigslot::signal0<> SignalDataChannelCreated; |
332 sigslot::signal0<> SignalDataChannelDestroyed; | 337 sigslot::signal0<> SignalDataChannelDestroyed; |
333 // Called when the whole session is destroyed. | 338 // Called when the whole session is destroyed. |
334 sigslot::signal0<> SignalDestroyed; | 339 sigslot::signal0<> SignalDestroyed; |
335 | 340 |
336 // Called when a valid data channel OPEN message is received. | 341 // Called when a valid data channel OPEN message is received. |
337 // std::string represents the data channel label. | 342 // std::string represents the data channel label. |
338 sigslot::signal2<const std::string&, const InternalDataChannelInit&> | 343 sigslot::signal2<const std::string&, const InternalDataChannelInit&> |
339 SignalDataChannelOpenMessage; | 344 SignalDataChannelOpenMessage; |
| 345 #ifdef HAVE_QUIC |
| 346 sigslot::signal1<cricket::QuicTransportChannel*> |
| 347 SignalQuicTransportChannelCreated; |
| 348 #endif // HAVE_QUIC |
340 | 349 |
341 private: | 350 private: |
342 // Indicates the type of SessionDescription in a call to SetLocalDescription | 351 // Indicates the type of SessionDescription in a call to SetLocalDescription |
343 // and SetRemoteDescription. | 352 // and SetRemoteDescription. |
344 enum Action { | 353 enum Action { |
345 kOffer, | 354 kOffer, |
346 kPrAnswer, | 355 kPrAnswer, |
347 kAnswer, | 356 kAnswer, |
348 }; | 357 }; |
349 | 358 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 // Reports stats for all transports in use. | 483 // Reports stats for all transports in use. |
475 void ReportTransportStats(); | 484 void ReportTransportStats(); |
476 | 485 |
477 // Gather the usage of IPv4/IPv6 as best connection. | 486 // Gather the usage of IPv4/IPv6 as best connection. |
478 void ReportBestConnectionState(const cricket::TransportStats& stats); | 487 void ReportBestConnectionState(const cricket::TransportStats& stats); |
479 | 488 |
480 void ReportNegotiatedCiphers(const cricket::TransportStats& stats); | 489 void ReportNegotiatedCiphers(const cricket::TransportStats& stats); |
481 | 490 |
482 void OnSentPacket_w(const rtc::SentPacket& sent_packet); | 491 void OnSentPacket_w(const rtc::SentPacket& sent_packet); |
483 | 492 |
| 493 rtc::Thread* const network_thread_; |
484 rtc::Thread* const worker_thread_; | 494 rtc::Thread* const worker_thread_; |
485 rtc::Thread* const signaling_thread_; | 495 rtc::Thread* const signaling_thread_; |
486 | 496 |
487 State state_ = STATE_INIT; | 497 State state_ = STATE_INIT; |
488 Error error_ = ERROR_NONE; | 498 Error error_ = ERROR_NONE; |
489 std::string error_desc_; | 499 std::string error_desc_; |
490 | 500 |
491 const std::string sid_; | 501 const std::string sid_; |
492 bool initial_offerer_ = false; | 502 bool initial_offerer_ = false; |
493 | 503 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 535 |
526 // Declares the bundle policy for the WebRTCSession. | 536 // Declares the bundle policy for the WebRTCSession. |
527 PeerConnectionInterface::BundlePolicy bundle_policy_; | 537 PeerConnectionInterface::BundlePolicy bundle_policy_; |
528 | 538 |
529 // Declares the RTCP mux policy for the WebRTCSession. | 539 // Declares the RTCP mux policy for the WebRTCSession. |
530 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; | 540 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; |
531 | 541 |
532 bool received_first_video_packet_ = false; | 542 bool received_first_video_packet_ = false; |
533 bool received_first_audio_packet_ = false; | 543 bool received_first_audio_packet_ = false; |
534 | 544 |
| 545 #ifdef HAVE_QUIC |
| 546 cricket::QuicTransportChannel* quic_transport_channel_ = nullptr; |
| 547 #endif // HAVE_QUIC |
| 548 |
535 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); | 549 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); |
536 }; | 550 }; |
537 } // namespace webrtc | 551 } // namespace webrtc |
538 | 552 |
539 #endif // WEBRTC_API_WEBRTCSESSION_H_ | 553 #endif // WEBRTC_API_WEBRTCSESSION_H_ |
OLD | NEW |