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

Side by Side Diff: talk/app/webrtc/peerconnection.h

Issue 1413713003: Adding the ability to create an RtpSender without a track. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding some unit tests for new methods on the sender. Created 5 years, 2 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
OLDNEW
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 rtc::scoped_refptr<StreamCollectionInterface> local_streams() override; 86 rtc::scoped_refptr<StreamCollectionInterface> local_streams() override;
87 rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override; 87 rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override;
88 bool AddStream(MediaStreamInterface* local_stream) override; 88 bool AddStream(MediaStreamInterface* local_stream) override;
89 void RemoveStream(MediaStreamInterface* local_stream) override; 89 void RemoveStream(MediaStreamInterface* local_stream) override;
90 90
91 virtual WebRtcSession* session() { return session_.get(); } 91 virtual WebRtcSession* session() { return session_.get(); }
92 92
93 rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender( 93 rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
94 AudioTrackInterface* track) override; 94 AudioTrackInterface* track) override;
95 95
96 rtc::scoped_refptr<RtpSenderInterface> CreateSender(
97 const std::string& kind) override;
98
96 std::vector<rtc::scoped_refptr<RtpSenderInterface>> GetSenders() 99 std::vector<rtc::scoped_refptr<RtpSenderInterface>> GetSenders()
97 const override; 100 const override;
98 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> GetReceivers() 101 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> GetReceivers()
99 const override; 102 const override;
100 103
101 rtc::scoped_refptr<DataChannelInterface> CreateDataChannel( 104 rtc::scoped_refptr<DataChannelInterface> CreateDataChannel(
102 const std::string& label, 105 const std::string& label,
103 const DataChannelInit* config) override; 106 const DataChannelInit* config) override;
104 bool GetStats(StatsObserver* observer, 107 bool GetStats(StatsObserver* observer,
105 webrtc::MediaStreamTrackInterface* track, 108 webrtc::MediaStreamTrackInterface* track,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 void CreateAudioReceiver(MediaStreamInterface* stream, 185 void CreateAudioReceiver(MediaStreamInterface* stream,
183 AudioTrackInterface* audio_track, 186 AudioTrackInterface* audio_track,
184 uint32_t ssrc); 187 uint32_t ssrc);
185 void CreateVideoReceiver(MediaStreamInterface* stream, 188 void CreateVideoReceiver(MediaStreamInterface* stream,
186 VideoTrackInterface* video_track, 189 VideoTrackInterface* video_track,
187 uint32_t ssrc); 190 uint32_t ssrc);
188 void DestroyAudioReceiver(MediaStreamInterface* stream, 191 void DestroyAudioReceiver(MediaStreamInterface* stream,
189 AudioTrackInterface* audio_track); 192 AudioTrackInterface* audio_track);
190 void DestroyVideoReceiver(MediaStreamInterface* stream, 193 void DestroyVideoReceiver(MediaStreamInterface* stream,
191 VideoTrackInterface* video_track); 194 VideoTrackInterface* video_track);
192 void CreateAudioSender(MediaStreamInterface* stream,
193 AudioTrackInterface* audio_track,
194 uint32_t ssrc);
195 void CreateVideoSender(MediaStreamInterface* stream,
196 VideoTrackInterface* video_track,
197 uint32_t ssrc);
198 void DestroyAudioSender(MediaStreamInterface* stream, 195 void DestroyAudioSender(MediaStreamInterface* stream,
199 AudioTrackInterface* audio_track, 196 AudioTrackInterface* audio_track,
200 uint32_t ssrc); 197 uint32_t ssrc);
201 void DestroyVideoSender(MediaStreamInterface* stream, 198 void DestroyVideoSender(MediaStreamInterface* stream,
202 VideoTrackInterface* video_track); 199 VideoTrackInterface* video_track);
203 200
204 // Implements IceObserver 201 // Implements IceObserver
205 void OnIceConnectionChange(IceConnectionState new_state) override; 202 void OnIceConnectionChange(IceConnectionState new_state) override;
206 void OnIceGatheringChange(IceGatheringState new_state) override; 203 void OnIceGatheringChange(IceGatheringState new_state) override;
207 void OnIceCandidate(const IceCandidateInterface* candidate) override; 204 void OnIceCandidate(const IceCandidateInterface* candidate) override;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 // Notifications from WebRtcSession relating to BaseChannels. 320 // Notifications from WebRtcSession relating to BaseChannels.
324 void OnVoiceChannelDestroyed(); 321 void OnVoiceChannelDestroyed();
325 void OnVideoChannelDestroyed(); 322 void OnVideoChannelDestroyed();
326 void OnDataChannelCreated(); 323 void OnDataChannelCreated();
327 void OnDataChannelDestroyed(); 324 void OnDataChannelDestroyed();
328 // Called when the cricket::DataChannel receives a message indicating that a 325 // Called when the cricket::DataChannel receives a message indicating that a
329 // webrtc::DataChannel should be opened. 326 // webrtc::DataChannel should be opened.
330 void OnDataChannelOpenMessage(const std::string& label, 327 void OnDataChannelOpenMessage(const std::string& label,
331 const InternalDataChannelInit& config); 328 const InternalDataChannelInit& config);
332 329
330 RtpSenderInterface* FindSenderById(const std::string& id);
331
333 std::vector<rtc::scoped_refptr<RtpSenderInterface>>::iterator 332 std::vector<rtc::scoped_refptr<RtpSenderInterface>>::iterator
334 FindSenderForTrack(MediaStreamTrackInterface* track); 333 FindSenderForTrack(MediaStreamTrackInterface* track);
335 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator 334 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator
336 FindReceiverForTrack(MediaStreamTrackInterface* track); 335 FindReceiverForTrack(MediaStreamTrackInterface* track);
337 336
338 TrackInfos* GetRemoteTracks(cricket::MediaType media_type); 337 TrackInfos* GetRemoteTracks(cricket::MediaType media_type);
339 TrackInfos* GetLocalTracks(cricket::MediaType media_type); 338 TrackInfos* GetLocalTracks(cricket::MediaType media_type);
340 const TrackInfo* FindTrackInfo(const TrackInfos& infos, 339 const TrackInfo* FindTrackInfo(const TrackInfos& infos,
341 const std::string& stream_label, 340 const std::string& stream_label,
342 const std::string track_id) const; 341 const std::string track_id) const;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 // because its destruction fires signals (such as VoiceChannelDestroyed) 388 // because its destruction fires signals (such as VoiceChannelDestroyed)
390 // which will trigger some final actions in PeerConnection... 389 // which will trigger some final actions in PeerConnection...
391 rtc::scoped_ptr<WebRtcSession> session_; 390 rtc::scoped_ptr<WebRtcSession> session_;
392 // ... But stats_ depends on session_ so it should be destroyed even earlier. 391 // ... But stats_ depends on session_ so it should be destroyed even earlier.
393 rtc::scoped_ptr<StatsCollector> stats_; 392 rtc::scoped_ptr<StatsCollector> stats_;
394 }; 393 };
395 394
396 } // namespace webrtc 395 } // namespace webrtc
397 396
398 #endif // TALK_APP_WEBRTC_PEERCONNECTION_H_ 397 #endif // TALK_APP_WEBRTC_PEERCONNECTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698