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

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

Issue 2794943002: Delete MediaController class, move Call ownership to PeerConnection. (Closed)
Patch Set: Revert DCHECK addition. Created 3 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
11 #ifndef WEBRTC_PC_WEBRTCSESSION_H_ 11 #ifndef WEBRTC_PC_WEBRTCSESSION_H_
12 #define WEBRTC_PC_WEBRTCSESSION_H_ 12 #define WEBRTC_PC_WEBRTCSESSION_H_
13 13
14 #include <memory> 14 #include <memory>
15 #include <set> 15 #include <set>
16 #include <string> 16 #include <string>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/api/peerconnectioninterface.h" 19 #include "webrtc/api/peerconnectioninterface.h"
20 #include "webrtc/api/statstypes.h" 20 #include "webrtc/api/statstypes.h"
21 #include "webrtc/base/constructormagic.h" 21 #include "webrtc/base/constructormagic.h"
22 #include "webrtc/base/optional.h" 22 #include "webrtc/base/optional.h"
23 #include "webrtc/base/sigslot.h" 23 #include "webrtc/base/sigslot.h"
24 #include "webrtc/base/sslidentity.h" 24 #include "webrtc/base/sslidentity.h"
25 #include "webrtc/base/thread.h" 25 #include "webrtc/base/thread.h"
26 #include "webrtc/media/base/mediachannel.h" 26 #include "webrtc/media/base/mediachannel.h"
27 #include "webrtc/p2p/base/candidate.h" 27 #include "webrtc/p2p/base/candidate.h"
28 #include "webrtc/p2p/base/transportcontroller.h" 28 #include "webrtc/p2p/base/transportcontroller.h"
29 #include "webrtc/pc/datachannel.h" 29 #include "webrtc/pc/datachannel.h"
30 #include "webrtc/pc/mediacontroller.h"
31 #include "webrtc/pc/mediasession.h" 30 #include "webrtc/pc/mediasession.h"
32 31
33 #ifdef HAVE_QUIC 32 #ifdef HAVE_QUIC
34 #include "webrtc/pc/quicdatatransport.h" 33 #include "webrtc/pc/quicdatatransport.h"
35 #endif // HAVE_QUIC 34 #endif // HAVE_QUIC
36 35
37 namespace cricket { 36 namespace cricket {
38 37
39 class ChannelManager; 38 class ChannelManager;
40 class RtpDataChannel; 39 class RtpDataChannel;
41 class SctpTransportInternal; 40 class SctpTransportInternal;
42 class SctpTransportInternalFactory; 41 class SctpTransportInternalFactory;
43 class StatsReport; 42 class StatsReport;
44 class VideoChannel; 43 class VideoChannel;
45 class VoiceChannel; 44 class VoiceChannel;
46 45
47 #ifdef HAVE_QUIC 46 #ifdef HAVE_QUIC
48 class QuicTransportChannel; 47 class QuicTransportChannel;
49 #endif // HAVE_QUIC 48 #endif // HAVE_QUIC
50 49
51 } // namespace cricket 50 } // namespace cricket
52 51
53 namespace webrtc { 52 namespace webrtc {
54 53
55 class IceRestartAnswerLatch; 54 class IceRestartAnswerLatch;
56 class JsepIceCandidate; 55 class JsepIceCandidate;
57 class MediaStreamSignaling; 56 class MediaStreamSignaling;
57 class RtcEventLog;
58 class WebRtcSessionDescriptionFactory; 58 class WebRtcSessionDescriptionFactory;
59 59
60 extern const char kBundleWithoutRtcpMux[]; 60 extern const char kBundleWithoutRtcpMux[];
61 extern const char kCreateChannelFailed[]; 61 extern const char kCreateChannelFailed[];
62 extern const char kInvalidCandidates[]; 62 extern const char kInvalidCandidates[];
63 extern const char kInvalidSdp[]; 63 extern const char kInvalidSdp[];
64 extern const char kMlineMismatch[]; 64 extern const char kMlineMismatch[];
65 extern const char kPushDownTDFailed[]; 65 extern const char kPushDownTDFailed[];
66 extern const char kSdpWithoutDtlsFingerprint[]; 66 extern const char kSdpWithoutDtlsFingerprint[];
67 extern const char kSdpWithoutSdesCrypto[]; 67 extern const char kSdpWithoutSdesCrypto[];
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 }; 152 };
153 153
154 enum Error { 154 enum Error {
155 ERROR_NONE = 0, // no error 155 ERROR_NONE = 0, // no error
156 ERROR_CONTENT = 1, // channel errors in SetLocalContent/SetRemoteContent 156 ERROR_CONTENT = 1, // channel errors in SetLocalContent/SetRemoteContent
157 ERROR_TRANSPORT = 2, // transport error of some kind 157 ERROR_TRANSPORT = 2, // transport error of some kind
158 }; 158 };
159 159
160 // |sctp_factory| may be null, in which case SCTP is treated as unsupported. 160 // |sctp_factory| may be null, in which case SCTP is treated as unsupported.
161 WebRtcSession( 161 WebRtcSession(
162 webrtc::MediaControllerInterface* media_controller, 162 Call* call,
163 cricket::ChannelManager* channel_manager,
164 const cricket::MediaConfig& media_config,
165 RtcEventLog* event_log,
163 rtc::Thread* network_thread, 166 rtc::Thread* network_thread,
164 rtc::Thread* worker_thread, 167 rtc::Thread* worker_thread,
165 rtc::Thread* signaling_thread, 168 rtc::Thread* signaling_thread,
166 cricket::PortAllocator* port_allocator, 169 cricket::PortAllocator* port_allocator,
167 std::unique_ptr<cricket::TransportController> transport_controller, 170 std::unique_ptr<cricket::TransportController> transport_controller,
168 std::unique_ptr<cricket::SctpTransportInternalFactory> sctp_factory); 171 std::unique_ptr<cricket::SctpTransportInternalFactory> sctp_factory);
169 virtual ~WebRtcSession(); 172 virtual ~WebRtcSession();
170 173
171 // These are const to allow them to be called from const methods. 174 // These are const to allow them to be called from const methods.
172 rtc::Thread* network_thread() const { return network_thread_; } 175 rtc::Thread* network_thread() const { return network_thread_; }
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 555
553 State state_ = STATE_INIT; 556 State state_ = STATE_INIT;
554 Error error_ = ERROR_NONE; 557 Error error_ = ERROR_NONE;
555 std::string error_desc_; 558 std::string error_desc_;
556 559
557 const std::string sid_; 560 const std::string sid_;
558 bool initial_offerer_ = false; 561 bool initial_offerer_ = false;
559 562
560 const std::unique_ptr<cricket::TransportController> transport_controller_; 563 const std::unique_ptr<cricket::TransportController> transport_controller_;
561 const std::unique_ptr<cricket::SctpTransportInternalFactory> sctp_factory_; 564 const std::unique_ptr<cricket::SctpTransportInternalFactory> sctp_factory_;
562 MediaControllerInterface* media_controller_; 565 const cricket::MediaConfig media_config_;
566 RtcEventLog* event_log_;
567 Call* call_;
563 std::unique_ptr<cricket::VoiceChannel> voice_channel_; 568 std::unique_ptr<cricket::VoiceChannel> voice_channel_;
564 std::unique_ptr<cricket::VideoChannel> video_channel_; 569 std::unique_ptr<cricket::VideoChannel> video_channel_;
565 // |rtp_data_channel_| is used if in RTP data channel mode, |sctp_transport_| 570 // |rtp_data_channel_| is used if in RTP data channel mode, |sctp_transport_|
566 // when using SCTP. 571 // when using SCTP.
567 std::unique_ptr<cricket::RtpDataChannel> rtp_data_channel_; 572 std::unique_ptr<cricket::RtpDataChannel> rtp_data_channel_;
568 573
569 std::unique_ptr<cricket::SctpTransportInternal> sctp_transport_; 574 std::unique_ptr<cricket::SctpTransportInternal> sctp_transport_;
570 // |sctp_transport_name_| keeps track of what DTLS transport the SCTP 575 // |sctp_transport_name_| keeps track of what DTLS transport the SCTP
571 // transport is using (which can change due to bundling). 576 // transport is using (which can change due to bundling).
572 rtc::Optional<std::string> sctp_transport_name_; 577 rtc::Optional<std::string> sctp_transport_name_;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 638
634 #ifdef HAVE_QUIC 639 #ifdef HAVE_QUIC
635 std::unique_ptr<QuicDataTransport> quic_data_transport_; 640 std::unique_ptr<QuicDataTransport> quic_data_transport_;
636 #endif // HAVE_QUIC 641 #endif // HAVE_QUIC
637 642
638 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); 643 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession);
639 }; 644 };
640 } // namespace webrtc 645 } // namespace webrtc
641 646
642 #endif // WEBRTC_PC_WEBRTCSESSION_H_ 647 #endif // WEBRTC_PC_WEBRTCSESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698