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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 // Called when the cricket::DataChannel receives a message indicating that a | 326 // Called when the cricket::DataChannel receives a message indicating that a |
327 // webrtc::DataChannel should be opened. | 327 // webrtc::DataChannel should be opened. |
328 void OnDataChannelOpenMessage(const std::string& label, | 328 void OnDataChannelOpenMessage(const std::string& label, |
329 const InternalDataChannelInit& config); | 329 const InternalDataChannelInit& config); |
330 | 330 |
331 std::vector<rtc::scoped_refptr<RtpSenderInterface>>::iterator | 331 std::vector<rtc::scoped_refptr<RtpSenderInterface>>::iterator |
332 FindSenderForTrack(MediaStreamTrackInterface* track); | 332 FindSenderForTrack(MediaStreamTrackInterface* track); |
333 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator | 333 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator |
334 FindReceiverForTrack(MediaStreamTrackInterface* track); | 334 FindReceiverForTrack(MediaStreamTrackInterface* track); |
335 | 335 |
| 336 void ReconfigureSenders(cricket::MediaType media_type); |
| 337 void ReconfigureReceivers(cricket::MediaType media_type); |
| 338 |
336 TrackInfos* GetRemoteTracks(cricket::MediaType media_type); | 339 TrackInfos* GetRemoteTracks(cricket::MediaType media_type); |
337 TrackInfos* GetLocalTracks(cricket::MediaType media_type); | 340 TrackInfos* GetLocalTracks(cricket::MediaType media_type); |
338 const TrackInfo* FindTrackInfo(const TrackInfos& infos, | 341 const TrackInfo* FindTrackInfo(const TrackInfos& infos, |
339 const std::string& stream_label, | 342 const std::string& stream_label, |
340 const std::string track_id) const; | 343 const std::string track_id) const; |
341 | 344 |
342 // Returns the specified SCTP DataChannel in sctp_data_channels_, | 345 // Returns the specified SCTP DataChannel in sctp_data_channels_, |
343 // or nullptr if not found. | 346 // or nullptr if not found. |
344 DataChannel* FindDataChannelBySid(int sid) const; | 347 DataChannel* FindDataChannelBySid(int sid) const; |
345 | 348 |
(...skipping 19 matching lines...) Expand all Loading... |
365 rtc::scoped_refptr<StreamCollection> local_streams_; | 368 rtc::scoped_refptr<StreamCollection> local_streams_; |
366 // Streams created as a result of SetRemoteDescription. | 369 // Streams created as a result of SetRemoteDescription. |
367 rtc::scoped_refptr<StreamCollection> remote_streams_; | 370 rtc::scoped_refptr<StreamCollection> remote_streams_; |
368 | 371 |
369 // These lists store track info seen in local/remote descriptions. | 372 // These lists store track info seen in local/remote descriptions. |
370 TrackInfos remote_audio_tracks_; | 373 TrackInfos remote_audio_tracks_; |
371 TrackInfos remote_video_tracks_; | 374 TrackInfos remote_video_tracks_; |
372 TrackInfos local_audio_tracks_; | 375 TrackInfos local_audio_tracks_; |
373 TrackInfos local_video_tracks_; | 376 TrackInfos local_video_tracks_; |
374 | 377 |
| 378 // Flags indicating whether or not audio/video was rejected |
| 379 // in the last description set. |
| 380 bool audio_rejected_ = false; |
| 381 bool video_rejected_ = false; |
| 382 |
375 SctpSidAllocator sid_allocator_; | 383 SctpSidAllocator sid_allocator_; |
376 // label -> DataChannel | 384 // label -> DataChannel |
377 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_; | 385 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_; |
378 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_; | 386 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_; |
379 | 387 |
380 RemotePeerInfo remote_info_; | 388 RemotePeerInfo remote_info_; |
381 rtc::scoped_ptr<RemoteMediaStreamFactory> remote_stream_factory_; | 389 rtc::scoped_ptr<RemoteMediaStreamFactory> remote_stream_factory_; |
382 | 390 |
383 std::vector<rtc::scoped_refptr<RtpSenderInterface>> senders_; | 391 std::vector<rtc::scoped_refptr<RtpSenderInterface>> senders_; |
384 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_; | 392 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_; |
385 | 393 |
386 // The session_ scoped_ptr is declared at the bottom of PeerConnection | 394 // The session_ scoped_ptr is declared at the bottom of PeerConnection |
387 // because its destruction fires signals (such as VoiceChannelDestroyed) | 395 // because its destruction fires signals (such as VoiceChannelDestroyed) |
388 // which will trigger some final actions in PeerConnection... | 396 // which will trigger some final actions in PeerConnection... |
389 rtc::scoped_ptr<WebRtcSession> session_; | 397 rtc::scoped_ptr<WebRtcSession> session_; |
390 // ... But stats_ depends on session_ so it should be destroyed even earlier. | 398 // ... But stats_ depends on session_ so it should be destroyed even earlier. |
391 rtc::scoped_ptr<StatsCollector> stats_; | 399 rtc::scoped_ptr<StatsCollector> stats_; |
392 }; | 400 }; |
393 | 401 |
394 } // namespace webrtc | 402 } // namespace webrtc |
395 | 403 |
396 #endif // TALK_APP_WEBRTC_PEERCONNECTION_H_ | 404 #endif // TALK_APP_WEBRTC_PEERCONNECTION_H_ |
OLD | NEW |