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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 rtc::scoped_refptr<StreamCollectionInterface> local_streams() override; | 94 rtc::scoped_refptr<StreamCollectionInterface> local_streams() override; |
95 rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override; | 95 rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override; |
96 bool AddStream(MediaStreamInterface* local_stream) override; | 96 bool AddStream(MediaStreamInterface* local_stream) override; |
97 void RemoveStream(MediaStreamInterface* local_stream) override; | 97 void RemoveStream(MediaStreamInterface* local_stream) override; |
98 | 98 |
99 virtual WebRtcSession* session() { return session_.get(); } | 99 virtual WebRtcSession* session() { return session_.get(); } |
100 | 100 |
101 rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender( | 101 rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender( |
102 AudioTrackInterface* track) override; | 102 AudioTrackInterface* track) override; |
103 | 103 |
104 rtc::scoped_refptr<RtpSenderInterface> CreateSender( | |
105 const std::string& kind) override; | |
106 | |
107 std::vector<rtc::scoped_refptr<RtpSenderInterface>> GetSenders() | 104 std::vector<rtc::scoped_refptr<RtpSenderInterface>> GetSenders() |
108 const override; | 105 const override; |
109 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> GetReceivers() | 106 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> GetReceivers() |
110 const override; | 107 const override; |
111 | 108 |
112 rtc::scoped_refptr<DataChannelInterface> CreateDataChannel( | 109 rtc::scoped_refptr<DataChannelInterface> CreateDataChannel( |
113 const std::string& label, | 110 const std::string& label, |
114 const DataChannelInit* config) override; | 111 const DataChannelInit* config) override; |
115 bool GetStats(StatsObserver* observer, | 112 bool GetStats(StatsObserver* observer, |
116 webrtc::MediaStreamTrackInterface* track, | 113 webrtc::MediaStreamTrackInterface* track, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 void CreateAudioReceiver(MediaStreamInterface* stream, | 190 void CreateAudioReceiver(MediaStreamInterface* stream, |
194 AudioTrackInterface* audio_track, | 191 AudioTrackInterface* audio_track, |
195 uint32_t ssrc); | 192 uint32_t ssrc); |
196 void CreateVideoReceiver(MediaStreamInterface* stream, | 193 void CreateVideoReceiver(MediaStreamInterface* stream, |
197 VideoTrackInterface* video_track, | 194 VideoTrackInterface* video_track, |
198 uint32_t ssrc); | 195 uint32_t ssrc); |
199 void DestroyAudioReceiver(MediaStreamInterface* stream, | 196 void DestroyAudioReceiver(MediaStreamInterface* stream, |
200 AudioTrackInterface* audio_track); | 197 AudioTrackInterface* audio_track); |
201 void DestroyVideoReceiver(MediaStreamInterface* stream, | 198 void DestroyVideoReceiver(MediaStreamInterface* stream, |
202 VideoTrackInterface* video_track); | 199 VideoTrackInterface* video_track); |
| 200 void CreateAudioSender(MediaStreamInterface* stream, |
| 201 AudioTrackInterface* audio_track, |
| 202 uint32_t ssrc); |
| 203 void CreateVideoSender(MediaStreamInterface* stream, |
| 204 VideoTrackInterface* video_track, |
| 205 uint32_t ssrc); |
203 void DestroyAudioSender(MediaStreamInterface* stream, | 206 void DestroyAudioSender(MediaStreamInterface* stream, |
204 AudioTrackInterface* audio_track, | 207 AudioTrackInterface* audio_track, |
205 uint32_t ssrc); | 208 uint32_t ssrc); |
206 void DestroyVideoSender(MediaStreamInterface* stream, | 209 void DestroyVideoSender(MediaStreamInterface* stream, |
207 VideoTrackInterface* video_track); | 210 VideoTrackInterface* video_track); |
208 | 211 |
209 // Implements IceObserver | 212 // Implements IceObserver |
210 void OnIceConnectionChange(IceConnectionState new_state) override; | 213 void OnIceConnectionChange(IceConnectionState new_state) override; |
211 void OnIceGatheringChange(IceGatheringState new_state) override; | 214 void OnIceGatheringChange(IceGatheringState new_state) override; |
212 void OnIceCandidate(const IceCandidateInterface* candidate) override; | 215 void OnIceCandidate(const IceCandidateInterface* candidate) override; |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 // Notifications from WebRtcSession relating to BaseChannels. | 335 // Notifications from WebRtcSession relating to BaseChannels. |
333 void OnVoiceChannelDestroyed(); | 336 void OnVoiceChannelDestroyed(); |
334 void OnVideoChannelDestroyed(); | 337 void OnVideoChannelDestroyed(); |
335 void OnDataChannelCreated(); | 338 void OnDataChannelCreated(); |
336 void OnDataChannelDestroyed(); | 339 void OnDataChannelDestroyed(); |
337 // Called when the cricket::DataChannel receives a message indicating that a | 340 // Called when the cricket::DataChannel receives a message indicating that a |
338 // webrtc::DataChannel should be opened. | 341 // webrtc::DataChannel should be opened. |
339 void OnDataChannelOpenMessage(const std::string& label, | 342 void OnDataChannelOpenMessage(const std::string& label, |
340 const InternalDataChannelInit& config); | 343 const InternalDataChannelInit& config); |
341 | 344 |
342 RtpSenderInterface* FindSenderById(const std::string& id); | |
343 | |
344 std::vector<rtc::scoped_refptr<RtpSenderInterface>>::iterator | 345 std::vector<rtc::scoped_refptr<RtpSenderInterface>>::iterator |
345 FindSenderForTrack(MediaStreamTrackInterface* track); | 346 FindSenderForTrack(MediaStreamTrackInterface* track); |
346 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator | 347 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator |
347 FindReceiverForTrack(MediaStreamTrackInterface* track); | 348 FindReceiverForTrack(MediaStreamTrackInterface* track); |
348 | 349 |
349 TrackInfos* GetRemoteTracks(cricket::MediaType media_type); | 350 TrackInfos* GetRemoteTracks(cricket::MediaType media_type); |
350 TrackInfos* GetLocalTracks(cricket::MediaType media_type); | 351 TrackInfos* GetLocalTracks(cricket::MediaType media_type); |
351 const TrackInfo* FindTrackInfo(const TrackInfos& infos, | 352 const TrackInfo* FindTrackInfo(const TrackInfos& infos, |
352 const std::string& stream_label, | 353 const std::string& stream_label, |
353 const std::string track_id) const; | 354 const std::string track_id) const; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 // because its destruction fires signals (such as VoiceChannelDestroyed) | 401 // because its destruction fires signals (such as VoiceChannelDestroyed) |
401 // which will trigger some final actions in PeerConnection... | 402 // which will trigger some final actions in PeerConnection... |
402 rtc::scoped_ptr<WebRtcSession> session_; | 403 rtc::scoped_ptr<WebRtcSession> session_; |
403 // ... But stats_ depends on session_ so it should be destroyed even earlier. | 404 // ... But stats_ depends on session_ so it should be destroyed even earlier. |
404 rtc::scoped_ptr<StatsCollector> stats_; | 405 rtc::scoped_ptr<StatsCollector> stats_; |
405 }; | 406 }; |
406 | 407 |
407 } // namespace webrtc | 408 } // namespace webrtc |
408 | 409 |
409 #endif // TALK_APP_WEBRTC_PEERCONNECTION_H_ | 410 #endif // TALK_APP_WEBRTC_PEERCONNECTION_H_ |
OLD | NEW |