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

Side by Side Diff: webrtc/api/peerconnection.h

Issue 2023373002: Separating internal and external methods of RtpSender/RtpReceiver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | webrtc/api/peerconnection.cc » ('j') | webrtc/api/proxy.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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/dtlsidentitystore.h" 19 #include "webrtc/api/dtlsidentitystore.h"
20 #include "webrtc/api/peerconnectionfactory.h" 20 #include "webrtc/api/peerconnectionfactory.h"
21 #include "webrtc/api/peerconnectioninterface.h" 21 #include "webrtc/api/peerconnectioninterface.h"
22 #include "webrtc/api/rtpreceiverinterface.h" 22 #include "webrtc/api/rtpreceiver.h"
23 #include "webrtc/api/rtpsenderinterface.h" 23 #include "webrtc/api/rtpsender.h"
24 #include "webrtc/api/statscollector.h" 24 #include "webrtc/api/statscollector.h"
25 #include "webrtc/api/streamcollection.h" 25 #include "webrtc/api/streamcollection.h"
26 #include "webrtc/api/webrtcsession.h" 26 #include "webrtc/api/webrtcsession.h"
27 #include "webrtc/base/scoped_ptr.h" 27 #include "webrtc/base/scoped_ptr.h"
28 28
29 namespace webrtc { 29 namespace webrtc {
30 30
31 class MediaStreamObserver; 31 class MediaStreamObserver;
32 class VideoRtpReceiver; 32 class VideoRtpReceiver;
33 33
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 RtpSender* FindSenderById(const std::string& id);
338 338
339 std::vector<rtc::scoped_refptr<RtpSenderInterface>>::iterator 339 std::vector<rtc::scoped_refptr<RtpSenderProxyEx<RtpSender>>>::iterator
340 FindSenderForTrack(MediaStreamTrackInterface* track); 340 FindSenderForTrack(MediaStreamTrackInterface* track);
341 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator 341 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator
342 FindReceiverForTrack(const std::string& track_id); 342 FindReceiverForTrack(const std::string& track_id);
343 343
344 TrackInfos* GetRemoteTracks(cricket::MediaType media_type); 344 TrackInfos* GetRemoteTracks(cricket::MediaType media_type);
345 TrackInfos* GetLocalTracks(cricket::MediaType media_type); 345 TrackInfos* GetLocalTracks(cricket::MediaType media_type);
346 const TrackInfo* FindTrackInfo(const TrackInfos& infos, 346 const TrackInfo* FindTrackInfo(const TrackInfos& infos,
347 const std::string& stream_label, 347 const std::string& stream_label,
348 const std::string track_id) const; 348 const std::string track_id) const;
349 349
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 TrackInfos local_video_tracks_; 383 TrackInfos local_video_tracks_;
384 384
385 SctpSidAllocator sid_allocator_; 385 SctpSidAllocator sid_allocator_;
386 // label -> DataChannel 386 // label -> DataChannel
387 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_; 387 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_;
388 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_; 388 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_;
389 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_; 389 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_;
390 390
391 bool remote_peer_supports_msid_ = false; 391 bool remote_peer_supports_msid_ = false;
392 392
393 std::vector<rtc::scoped_refptr<RtpSenderInterface>> senders_; 393 std::vector<rtc::scoped_refptr<RtpSenderProxyEx<RtpSender>>> senders_;
394 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_; 394 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_;
395 395
396 // The session_ unique_ptr is declared at the bottom of PeerConnection 396 // The session_ unique_ptr is declared at the bottom of PeerConnection
397 // because its destruction fires signals (such as VoiceChannelDestroyed) 397 // because its destruction fires signals (such as VoiceChannelDestroyed)
398 // which will trigger some final actions in PeerConnection... 398 // which will trigger some final actions in PeerConnection...
399 std::unique_ptr<WebRtcSession> session_; 399 std::unique_ptr<WebRtcSession> session_;
400 // ... But stats_ depends on session_ so it should be destroyed even earlier. 400 // ... But stats_ depends on session_ so it should be destroyed even earlier.
401 std::unique_ptr<StatsCollector> stats_; 401 std::unique_ptr<StatsCollector> stats_;
402 }; 402 };
403 403
404 } // namespace webrtc 404 } // namespace webrtc
405 405
406 #endif // WEBRTC_API_PEERCONNECTION_H_ 406 #endif // WEBRTC_API_PEERCONNECTION_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/peerconnection.cc » ('j') | webrtc/api/proxy.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698