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

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

Issue 1428243005: Fix for scenario where m-line is revived after being set to port 0. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month 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 | talk/app/webrtc/peerconnection.cc » ('j') | talk/app/webrtc/peerconnection.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/peerconnection.cc » ('j') | talk/app/webrtc/peerconnection.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698