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

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: Giving RtpReceiver the same treatment and fixing formatting. 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/peerconnection.cc » ('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/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
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);
pthatcher1 2016/06/03 00:23:50 Can you call this RtpSenderInternalInterface?
Taylor Brandstetter 2016/06/03 22:48:39 I'll probably move code to it in a future CL, in w
pthatcher1 2016/06/03 23:05:49 The purpose of that would be to share code between
338 338
339 std::vector<rtc::scoped_refptr<RtpSenderInterface>>::iterator 339 std::vector<rtc::scoped_refptr<RtpSenderProxyEx<RtpSenderInternal>>>::iterator
pthatcher1 2016/06/03 00:23:50 How about RtpSenderInternalProxy?
Taylor Brandstetter 2016/06/03 22:48:39 So RtpSenderInternalProxy<RtpSenderInternal>? That
pthatcher1 2016/06/03 23:05:49 I think FooInternalProxy is a good shortening of F
340 FindSenderForTrack(MediaStreamTrackInterface* track); 340 FindSenderForTrack(MediaStreamTrackInterface* track);
341 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator 341 std::vector<
342 rtc::scoped_refptr<RtpReceiverProxyEx<RtpReceiverInternal>>>::iterator
pthatcher1 2016/06/01 22:18:57 I think I need to chat with you next to a whiteboa
Taylor Brandstetter 2016/06/01 23:13:02 It's an iterator to a refptr to a RtpReceiverInter
342 FindReceiverForTrack(const std::string& track_id); 343 FindReceiverForTrack(const std::string& track_id);
343 344
344 TrackInfos* GetRemoteTracks(cricket::MediaType media_type); 345 TrackInfos* GetRemoteTracks(cricket::MediaType media_type);
345 TrackInfos* GetLocalTracks(cricket::MediaType media_type); 346 TrackInfos* GetLocalTracks(cricket::MediaType media_type);
346 const TrackInfo* FindTrackInfo(const TrackInfos& infos, 347 const TrackInfo* FindTrackInfo(const TrackInfos& infos,
347 const std::string& stream_label, 348 const std::string& stream_label,
348 const std::string track_id) const; 349 const std::string track_id) const;
349 350
350 // Returns the specified SCTP DataChannel in sctp_data_channels_, 351 // Returns the specified SCTP DataChannel in sctp_data_channels_,
351 // or nullptr if not found. 352 // or nullptr if not found.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 TrackInfos local_video_tracks_; 394 TrackInfos local_video_tracks_;
394 395
395 SctpSidAllocator sid_allocator_; 396 SctpSidAllocator sid_allocator_;
396 // label -> DataChannel 397 // label -> DataChannel
397 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_; 398 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_;
398 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_; 399 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_;
399 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_; 400 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_;
400 401
401 bool remote_peer_supports_msid_ = false; 402 bool remote_peer_supports_msid_ = false;
402 403
403 std::vector<rtc::scoped_refptr<RtpSenderInterface>> senders_; 404 std::vector<rtc::scoped_refptr<RtpSenderProxyEx<RtpSenderInternal>>> senders_;
404 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_; 405 std::vector<rtc::scoped_refptr<RtpReceiverProxyEx<RtpReceiverInternal>>>
406 receivers_;
405 407
406 std::unique_ptr<WebRtcSession> session_; 408 std::unique_ptr<WebRtcSession> session_;
407 std::unique_ptr<StatsCollector> stats_; 409 std::unique_ptr<StatsCollector> stats_;
408 }; 410 };
409 411
410 } // namespace webrtc 412 } // namespace webrtc
411 413
412 #endif // WEBRTC_API_PEERCONNECTION_H_ 414 #endif // WEBRTC_API_PEERCONNECTION_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/peerconnection.cc » ('j') | webrtc/api/peerconnection.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698