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 |
11 #ifndef WEBRTC_API_PEERCONNECTION_H_ | 11 #ifndef WEBRTC_API_PEERCONNECTION_H_ |
12 #define WEBRTC_API_PEERCONNECTION_H_ | 12 #define WEBRTC_API_PEERCONNECTION_H_ |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 #include <map> | 15 #include <map> |
16 #include <memory> | 16 #include <memory> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "webrtc/api/peerconnectionfactory.h" | 19 #include "webrtc/api/peerconnectionfactory.h" |
20 #include "webrtc/api/peerconnectioninterface.h" | 20 #include "webrtc/api/peerconnectioninterface.h" |
21 #include "webrtc/api/rtpreceiverinterface.h" | 21 #include "webrtc/api/rtpreceiver.h" |
22 #include "webrtc/api/rtpsenderinterface.h" | 22 #include "webrtc/api/rtpsender.h" |
23 #include "webrtc/api/statscollector.h" | 23 #include "webrtc/api/statscollector.h" |
24 #include "webrtc/api/streamcollection.h" | 24 #include "webrtc/api/streamcollection.h" |
25 #include "webrtc/api/webrtcsession.h" | 25 #include "webrtc/api/webrtcsession.h" |
26 | 26 |
27 namespace webrtc { | 27 namespace webrtc { |
28 | 28 |
29 class MediaStreamObserver; | 29 class MediaStreamObserver; |
30 class VideoRtpReceiver; | 30 class VideoRtpReceiver; |
31 | 31 |
32 // Populates |session_options| from |rtc_options|, and returns true if options | 32 // Populates |session_options| from |rtc_options|, and returns true if options |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 // Notifications from WebRtcSession relating to BaseChannels. | 327 // Notifications from WebRtcSession relating to BaseChannels. |
328 void OnVoiceChannelDestroyed(); | 328 void OnVoiceChannelDestroyed(); |
329 void OnVideoChannelDestroyed(); | 329 void OnVideoChannelDestroyed(); |
330 void OnDataChannelCreated(); | 330 void OnDataChannelCreated(); |
331 void OnDataChannelDestroyed(); | 331 void OnDataChannelDestroyed(); |
332 // Called when the cricket::DataChannel receives a message indicating that a | 332 // Called when the cricket::DataChannel receives a message indicating that a |
333 // webrtc::DataChannel should be opened. | 333 // webrtc::DataChannel should be opened. |
334 void OnDataChannelOpenMessage(const std::string& label, | 334 void OnDataChannelOpenMessage(const std::string& label, |
335 const InternalDataChannelInit& config); | 335 const InternalDataChannelInit& config); |
336 | 336 |
337 RtpSenderInterface* FindSenderById(const std::string& id); | 337 RtpSenderInternal* FindSenderById(const std::string& id); |
338 | 338 |
339 std::vector<rtc::scoped_refptr<RtpSenderInterface>>::iterator | 339 std::vector<rtc::scoped_refptr< |
| 340 RtpSenderProxyWithInternal<RtpSenderInternal>>>::iterator |
340 FindSenderForTrack(MediaStreamTrackInterface* track); | 341 FindSenderForTrack(MediaStreamTrackInterface* track); |
341 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator | 342 std::vector<rtc::scoped_refptr< |
| 343 RtpReceiverProxyWithInternal<RtpReceiverInternal>>>::iterator |
342 FindReceiverForTrack(const std::string& track_id); | 344 FindReceiverForTrack(const std::string& track_id); |
343 | 345 |
344 TrackInfos* GetRemoteTracks(cricket::MediaType media_type); | 346 TrackInfos* GetRemoteTracks(cricket::MediaType media_type); |
345 TrackInfos* GetLocalTracks(cricket::MediaType media_type); | 347 TrackInfos* GetLocalTracks(cricket::MediaType media_type); |
346 const TrackInfo* FindTrackInfo(const TrackInfos& infos, | 348 const TrackInfo* FindTrackInfo(const TrackInfos& infos, |
347 const std::string& stream_label, | 349 const std::string& stream_label, |
348 const std::string track_id) const; | 350 const std::string track_id) const; |
349 | 351 |
350 // Returns the specified SCTP DataChannel in sctp_data_channels_, | 352 // Returns the specified SCTP DataChannel in sctp_data_channels_, |
351 // or nullptr if not found. | 353 // or nullptr if not found. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 TrackInfos local_video_tracks_; | 395 TrackInfos local_video_tracks_; |
394 | 396 |
395 SctpSidAllocator sid_allocator_; | 397 SctpSidAllocator sid_allocator_; |
396 // label -> DataChannel | 398 // label -> DataChannel |
397 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_; | 399 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_; |
398 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_; | 400 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_; |
399 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_; | 401 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_; |
400 | 402 |
401 bool remote_peer_supports_msid_ = false; | 403 bool remote_peer_supports_msid_ = false; |
402 | 404 |
403 std::vector<rtc::scoped_refptr<RtpSenderInterface>> senders_; | 405 std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>> |
404 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_; | 406 senders_; |
| 407 std::vector< |
| 408 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>> |
| 409 receivers_; |
405 | 410 |
406 std::unique_ptr<WebRtcSession> session_; | 411 std::unique_ptr<WebRtcSession> session_; |
407 std::unique_ptr<StatsCollector> stats_; | 412 std::unique_ptr<StatsCollector> stats_; |
408 }; | 413 }; |
409 | 414 |
410 } // namespace webrtc | 415 } // namespace webrtc |
411 | 416 |
412 #endif // WEBRTC_API_PEERCONNECTION_H_ | 417 #endif // WEBRTC_API_PEERCONNECTION_H_ |
OLD | NEW |