OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 public sigslot::has_slots<> { | 57 public sigslot::has_slots<> { |
58 public: | 58 public: |
59 explicit PeerConnection(PeerConnectionFactory* factory); | 59 explicit PeerConnection(PeerConnectionFactory* factory); |
60 | 60 |
61 bool Initialize( | 61 bool Initialize( |
62 const PeerConnectionInterface::RTCConfiguration& configuration, | 62 const PeerConnectionInterface::RTCConfiguration& configuration, |
63 const MediaConstraintsInterface* constraints, | 63 const MediaConstraintsInterface* constraints, |
64 PortAllocatorFactoryInterface* allocator_factory, | 64 PortAllocatorFactoryInterface* allocator_factory, |
65 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 65 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
66 PeerConnectionObserver* observer); | 66 PeerConnectionObserver* observer); |
67 rtc::scoped_refptr<StreamCollectionInterface> local_streams() override; | 67 virtual rtc::scoped_refptr<StreamCollectionInterface> local_streams(); |
68 rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override; | 68 virtual rtc::scoped_refptr<StreamCollectionInterface> remote_streams(); |
69 bool AddStream(MediaStreamInterface* local_stream) override; | 69 virtual bool AddStream(MediaStreamInterface* local_stream); |
70 void RemoveStream(MediaStreamInterface* local_stream) override; | 70 virtual void RemoveStream(MediaStreamInterface* local_stream); |
71 | 71 |
72 rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender( | 72 virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender( |
73 AudioTrackInterface* track) override; | 73 AudioTrackInterface* track); |
74 | 74 |
75 rtc::scoped_refptr<DataChannelInterface> CreateDataChannel( | 75 virtual rtc::scoped_refptr<DataChannelInterface> CreateDataChannel( |
76 const std::string& label, | 76 const std::string& label, |
77 const DataChannelInit* config) override; | 77 const DataChannelInit* config); |
78 bool GetStats(StatsObserver* observer, | 78 virtual bool GetStats(StatsObserver* observer, |
79 webrtc::MediaStreamTrackInterface* track, | 79 webrtc::MediaStreamTrackInterface* track, |
80 StatsOutputLevel level) override; | 80 StatsOutputLevel level); |
81 | 81 |
82 SignalingState signaling_state() override; | 82 virtual SignalingState signaling_state(); |
83 | 83 |
84 // TODO(bemasc): Remove ice_state() when callers are removed. | 84 // TODO(bemasc): Remove ice_state() when callers are removed. |
85 IceState ice_state() override; | 85 virtual IceState ice_state(); |
86 IceConnectionState ice_connection_state() override; | 86 virtual IceConnectionState ice_connection_state(); |
87 IceGatheringState ice_gathering_state() override; | 87 virtual IceGatheringState ice_gathering_state(); |
88 | 88 |
89 const SessionDescriptionInterface* local_description() const override; | 89 virtual const SessionDescriptionInterface* local_description() const; |
90 const SessionDescriptionInterface* remote_description() const override; | 90 virtual const SessionDescriptionInterface* remote_description() const; |
91 | 91 |
92 // JSEP01 | 92 // JSEP01 |
93 void CreateOffer(CreateSessionDescriptionObserver* observer, | 93 virtual void CreateOffer(CreateSessionDescriptionObserver* observer, |
94 const MediaConstraintsInterface* constraints) override; | 94 const MediaConstraintsInterface* constraints); |
95 void CreateOffer(CreateSessionDescriptionObserver* observer, | 95 virtual void CreateOffer(CreateSessionDescriptionObserver* observer, |
96 const RTCOfferAnswerOptions& options) override; | 96 const RTCOfferAnswerOptions& options); |
97 void CreateAnswer(CreateSessionDescriptionObserver* observer, | 97 virtual void CreateAnswer(CreateSessionDescriptionObserver* observer, |
98 const MediaConstraintsInterface* constraints) override; | 98 const MediaConstraintsInterface* constraints); |
99 void SetLocalDescription(SetSessionDescriptionObserver* observer, | 99 virtual void SetLocalDescription(SetSessionDescriptionObserver* observer, |
100 SessionDescriptionInterface* desc) override; | 100 SessionDescriptionInterface* desc); |
101 void SetRemoteDescription(SetSessionDescriptionObserver* observer, | 101 virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer, |
102 SessionDescriptionInterface* desc) override; | 102 SessionDescriptionInterface* desc); |
103 // TODO(deadbeef) : Deprecated version, remove after all clients are updated. | 103 // TODO(mallinath) : Deprecated version, remove after all clients are updated. |
104 bool UpdateIce(const IceServers& configuration, | 104 virtual bool UpdateIce(const IceServers& configuration, |
105 const MediaConstraintsInterface* constraints) override; | 105 const MediaConstraintsInterface* constraints); |
106 bool SetConfiguration( | 106 virtual bool UpdateIce( |
107 const PeerConnectionInterface::RTCConfiguration& config) override; | 107 const PeerConnectionInterface::RTCConfiguration& config); |
108 bool AddIceCandidate(const IceCandidateInterface* candidate) override; | 108 virtual bool AddIceCandidate(const IceCandidateInterface* candidate); |
109 | 109 |
110 void RegisterUMAObserver(UMAObserver* observer) override; | 110 virtual void RegisterUMAObserver(UMAObserver* observer); |
111 | 111 |
112 void Close() override; | 112 virtual void Close(); |
113 | 113 |
114 protected: | 114 protected: |
115 ~PeerConnection() override; | 115 virtual ~PeerConnection(); |
116 | 116 |
117 private: | 117 private: |
118 // Implements MessageHandler. | 118 // Implements MessageHandler. |
119 void OnMessage(rtc::Message* msg) override; | 119 virtual void OnMessage(rtc::Message* msg); |
120 | 120 |
121 // Implements MediaStreamSignalingObserver. | 121 // Implements MediaStreamSignalingObserver. |
122 void OnAddRemoteStream(MediaStreamInterface* stream) override; | 122 void OnAddRemoteStream(MediaStreamInterface* stream) override; |
123 void OnRemoveRemoteStream(MediaStreamInterface* stream) override; | 123 void OnRemoveRemoteStream(MediaStreamInterface* stream) override; |
124 void OnAddDataChannel(DataChannelInterface* data_channel) override; | 124 void OnAddDataChannel(DataChannelInterface* data_channel) override; |
125 void OnAddRemoteAudioTrack(MediaStreamInterface* stream, | 125 void OnAddRemoteAudioTrack(MediaStreamInterface* stream, |
126 AudioTrackInterface* audio_track, | 126 AudioTrackInterface* audio_track, |
127 uint32 ssrc) override; | 127 uint32 ssrc) override; |
128 void OnAddRemoteVideoTrack(MediaStreamInterface* stream, | 128 void OnAddRemoteVideoTrack(MediaStreamInterface* stream, |
129 VideoTrackInterface* video_track, | 129 VideoTrackInterface* video_track, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 rtc::scoped_ptr<cricket::PortAllocator> port_allocator_; | 186 rtc::scoped_ptr<cricket::PortAllocator> port_allocator_; |
187 rtc::scoped_ptr<WebRtcSession> session_; | 187 rtc::scoped_ptr<WebRtcSession> session_; |
188 rtc::scoped_ptr<MediaStreamSignaling> mediastream_signaling_; | 188 rtc::scoped_ptr<MediaStreamSignaling> mediastream_signaling_; |
189 rtc::scoped_ptr<MediaStreamHandlerContainer> stream_handler_container_; | 189 rtc::scoped_ptr<MediaStreamHandlerContainer> stream_handler_container_; |
190 rtc::scoped_ptr<StatsCollector> stats_; | 190 rtc::scoped_ptr<StatsCollector> stats_; |
191 }; | 191 }; |
192 | 192 |
193 } // namespace webrtc | 193 } // namespace webrtc |
194 | 194 |
195 #endif // TALK_APP_WEBRTC_PEERCONNECTION_H_ | 195 #endif // TALK_APP_WEBRTC_PEERCONNECTION_H_ |
OLD | NEW |