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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 #include <string> | 71 #include <string> |
72 #include <vector> | 72 #include <vector> |
73 | 73 |
74 #include "talk/app/webrtc/datachannelinterface.h" | 74 #include "talk/app/webrtc/datachannelinterface.h" |
75 #include "talk/app/webrtc/dtlsidentitystore.h" | 75 #include "talk/app/webrtc/dtlsidentitystore.h" |
76 #include "talk/app/webrtc/dtmfsenderinterface.h" | 76 #include "talk/app/webrtc/dtmfsenderinterface.h" |
77 #include "talk/app/webrtc/dtlsidentitystore.h" | 77 #include "talk/app/webrtc/dtlsidentitystore.h" |
78 #include "talk/app/webrtc/jsep.h" | 78 #include "talk/app/webrtc/jsep.h" |
79 #include "talk/app/webrtc/mediastreaminterface.h" | 79 #include "talk/app/webrtc/mediastreaminterface.h" |
| 80 #include "talk/app/webrtc/rtpreceiverinterface.h" |
| 81 #include "talk/app/webrtc/rtpsenderinterface.h" |
80 #include "talk/app/webrtc/statstypes.h" | 82 #include "talk/app/webrtc/statstypes.h" |
81 #include "talk/app/webrtc/umametrics.h" | 83 #include "talk/app/webrtc/umametrics.h" |
82 #include "webrtc/base/fileutils.h" | 84 #include "webrtc/base/fileutils.h" |
83 #include "webrtc/base/network.h" | 85 #include "webrtc/base/network.h" |
84 #include "webrtc/base/rtccertificate.h" | 86 #include "webrtc/base/rtccertificate.h" |
85 #include "webrtc/base/sslstreamadapter.h" | 87 #include "webrtc/base/sslstreamadapter.h" |
86 #include "webrtc/base/socketaddress.h" | 88 #include "webrtc/base/socketaddress.h" |
87 | 89 |
88 namespace rtc { | 90 namespace rtc { |
89 class SSLIdentity; | 91 class SSLIdentity; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 int value) = 0; | 141 int value) = 0; |
140 // TODO(jbauch): Make method abstract when it is implemented by Chromium. | 142 // TODO(jbauch): Make method abstract when it is implemented by Chromium. |
141 virtual void AddHistogramSample(PeerConnectionMetricsName type, | 143 virtual void AddHistogramSample(PeerConnectionMetricsName type, |
142 const std::string& value) {} | 144 const std::string& value) {} |
143 | 145 |
144 protected: | 146 protected: |
145 virtual ~MetricsObserverInterface() {} | 147 virtual ~MetricsObserverInterface() {} |
146 }; | 148 }; |
147 | 149 |
148 typedef MetricsObserverInterface UMAObserver; | 150 typedef MetricsObserverInterface UMAObserver; |
| 151 typedef std::vector<rtc::scoped_refptr<RtpSenderInterface>> RtpSenderRefptrs; |
| 152 typedef std::vector<rtc::scoped_refptr<RtpReceiverInterface>> |
| 153 RtpReceiverRefptrs; |
149 | 154 |
150 class PeerConnectionInterface : public rtc::RefCountInterface { | 155 class PeerConnectionInterface : public rtc::RefCountInterface { |
151 public: | 156 public: |
152 // See http://dev.w3.org/2011/webrtc/editor/webrtc.html#state-definitions . | 157 // See http://dev.w3.org/2011/webrtc/editor/webrtc.html#state-definitions . |
153 enum SignalingState { | 158 enum SignalingState { |
154 kStable, | 159 kStable, |
155 kHaveLocalOffer, | 160 kHaveLocalOffer, |
156 kHaveLocalPrAnswer, | 161 kHaveLocalPrAnswer, |
157 kHaveRemoteOffer, | 162 kHaveRemoteOffer, |
158 kHaveRemotePrAnswer, | 163 kHaveRemotePrAnswer, |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 // Remove a MediaStream from this PeerConnection. | 320 // Remove a MediaStream from this PeerConnection. |
316 // Note that a SessionDescription negotiation is need before the | 321 // Note that a SessionDescription negotiation is need before the |
317 // remote peer is notified. | 322 // remote peer is notified. |
318 virtual void RemoveStream(MediaStreamInterface* stream) = 0; | 323 virtual void RemoveStream(MediaStreamInterface* stream) = 0; |
319 | 324 |
320 // Returns pointer to the created DtmfSender on success. | 325 // Returns pointer to the created DtmfSender on success. |
321 // Otherwise returns NULL. | 326 // Otherwise returns NULL. |
322 virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender( | 327 virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender( |
323 AudioTrackInterface* track) = 0; | 328 AudioTrackInterface* track) = 0; |
324 | 329 |
| 330 virtual RtpSenderRefptrs GetSenders() const = 0; |
| 331 |
| 332 virtual RtpReceiverRefptrs GetReceivers() const = 0; |
| 333 |
325 virtual bool GetStats(StatsObserver* observer, | 334 virtual bool GetStats(StatsObserver* observer, |
326 MediaStreamTrackInterface* track, | 335 MediaStreamTrackInterface* track, |
327 StatsOutputLevel level) = 0; | 336 StatsOutputLevel level) = 0; |
328 | 337 |
329 virtual rtc::scoped_refptr<DataChannelInterface> CreateDataChannel( | 338 virtual rtc::scoped_refptr<DataChannelInterface> CreateDataChannel( |
330 const std::string& label, | 339 const std::string& label, |
331 const DataChannelInit* config) = 0; | 340 const DataChannelInit* config) = 0; |
332 | 341 |
333 virtual const SessionDescriptionInterface* local_description() const = 0; | 342 virtual const SessionDescriptionInterface* local_description() const = 0; |
334 virtual const SessionDescriptionInterface* remote_description() const = 0; | 343 virtual const SessionDescriptionInterface* remote_description() const = 0; |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 CreatePeerConnectionFactory( | 607 CreatePeerConnectionFactory( |
599 rtc::Thread* worker_thread, | 608 rtc::Thread* worker_thread, |
600 rtc::Thread* signaling_thread, | 609 rtc::Thread* signaling_thread, |
601 AudioDeviceModule* default_adm, | 610 AudioDeviceModule* default_adm, |
602 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 611 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
603 cricket::WebRtcVideoDecoderFactory* decoder_factory); | 612 cricket::WebRtcVideoDecoderFactory* decoder_factory); |
604 | 613 |
605 } // namespace webrtc | 614 } // namespace webrtc |
606 | 615 |
607 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ | 616 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ |
OLD | NEW |