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

Side by Side Diff: webrtc/api/peerconnectioninterface.h

Issue 2632203003: Delete deprecated PeerConnection methods, and corresponding using declarations. (Closed)
Patch Set: Rebase. Created 3 years, 10 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/pc/peerconnection_unittest.cc » ('j') | no next file with comments »
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
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 // Add a new MediaStream to be sent on this PeerConnection. 431 // Add a new MediaStream to be sent on this PeerConnection.
432 // Note that a SessionDescription negotiation is needed before the 432 // Note that a SessionDescription negotiation is needed before the
433 // remote peer can receive the stream. 433 // remote peer can receive the stream.
434 virtual bool AddStream(MediaStreamInterface* stream) = 0; 434 virtual bool AddStream(MediaStreamInterface* stream) = 0;
435 435
436 // Remove a MediaStream from this PeerConnection. 436 // Remove a MediaStream from this PeerConnection.
437 // Note that a SessionDescription negotiation is need before the 437 // Note that a SessionDescription negotiation is need before the
438 // remote peer is notified. 438 // remote peer is notified.
439 virtual void RemoveStream(MediaStreamInterface* stream) = 0; 439 virtual void RemoveStream(MediaStreamInterface* stream) = 0;
440 440
441 // TODO(deadbeef): Make the following two methods pure virtual once
442 // implemented by all subclasses of PeerConnectionInterface.
443 // Add a new MediaStreamTrack to be sent on this PeerConnection. 441 // Add a new MediaStreamTrack to be sent on this PeerConnection.
444 // |streams| indicates which stream labels the track should be associated 442 // |streams| indicates which stream labels the track should be associated
445 // with. 443 // with.
446 virtual rtc::scoped_refptr<RtpSenderInterface> AddTrack( 444 virtual rtc::scoped_refptr<RtpSenderInterface> AddTrack(
447 MediaStreamTrackInterface* track, 445 MediaStreamTrackInterface* track,
448 std::vector<MediaStreamInterface*> streams) { 446 std::vector<MediaStreamInterface*> streams) = 0;
449 return nullptr;
450 }
451 447
452 // Remove an RtpSender from this PeerConnection. 448 // Remove an RtpSender from this PeerConnection.
453 // Returns true on success. 449 // Returns true on success.
454 virtual bool RemoveTrack(RtpSenderInterface* sender) { 450 virtual bool RemoveTrack(RtpSenderInterface* sender) = 0;
455 return false;
456 }
457 451
458 // Returns pointer to the created DtmfSender on success. 452 // Returns pointer to the created DtmfSender on success.
459 // Otherwise returns NULL. 453 // Otherwise returns NULL.
460 virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender( 454 virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
461 AudioTrackInterface* track) = 0; 455 AudioTrackInterface* track) = 0;
462 456
463 // TODO(deadbeef): Make these pure virtual once all subclasses implement them. 457 // TODO(deadbeef): Make these pure virtual once all subclasses implement them.
464 // |kind| must be "audio" or "video". 458 // |kind| must be "audio" or "video".
465 // |stream_id| is used to populate the msid attribute; if empty, one will 459 // |stream_id| is used to populate the msid attribute; if empty, one will
466 // be generated automatically. 460 // be generated automatically.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 643
650 // Triggered when the SignalingState changed. 644 // Triggered when the SignalingState changed.
651 virtual void OnSignalingChange( 645 virtual void OnSignalingChange(
652 PeerConnectionInterface::SignalingState new_state) = 0; 646 PeerConnectionInterface::SignalingState new_state) = 0;
653 647
654 // TODO(deadbeef): Once all subclasses override the scoped_refptr versions 648 // TODO(deadbeef): Once all subclasses override the scoped_refptr versions
655 // of the below three methods, make them pure virtual and remove the raw 649 // of the below three methods, make them pure virtual and remove the raw
656 // pointer version. 650 // pointer version.
657 651
658 // Triggered when media is received on a new stream from remote peer. 652 // Triggered when media is received on a new stream from remote peer.
659 virtual void OnAddStream(rtc::scoped_refptr<MediaStreamInterface> stream) {} 653 virtual void OnAddStream(rtc::scoped_refptr<MediaStreamInterface> stream) = 0;
660 // Deprecated; please use the version that uses a scoped_refptr.
661 virtual void OnAddStream(MediaStreamInterface* stream) {}
nisse-webrtc 2017/01/30 15:54:47 This change breaks tests. Unclear why, I'll try ad
662 654
663 // Triggered when a remote peer close a stream. 655 // Triggered when a remote peer close a stream.
664 virtual void OnRemoveStream(rtc::scoped_refptr<MediaStreamInterface> stream) { 656 virtual void OnRemoveStream(
665 } 657 rtc::scoped_refptr<MediaStreamInterface> stream) = 0;
666 // Deprecated; please use the version that uses a scoped_refptr.
667 virtual void OnRemoveStream(MediaStreamInterface* stream) {}
668 658
669 // Triggered when a remote peer opens a data channel. 659 // Triggered when a remote peer opens a data channel.
670 virtual void OnDataChannel( 660 virtual void OnDataChannel(
671 rtc::scoped_refptr<DataChannelInterface> data_channel){}; 661 rtc::scoped_refptr<DataChannelInterface> data_channel) = 0;
672 // Deprecated; please use the version that uses a scoped_refptr.
673 virtual void OnDataChannel(DataChannelInterface* data_channel) {}
674 662
675 // Triggered when renegotiation is needed. For example, an ICE restart 663 // Triggered when renegotiation is needed. For example, an ICE restart
676 // has begun. 664 // has begun.
677 virtual void OnRenegotiationNeeded() = 0; 665 virtual void OnRenegotiationNeeded() = 0;
678 666
679 // Called any time the IceConnectionState changes. 667 // Called any time the IceConnectionState changes.
680 virtual void OnIceConnectionChange( 668 virtual void OnIceConnectionChange(
681 PeerConnectionInterface::IceConnectionState new_state) = 0; 669 PeerConnectionInterface::IceConnectionState new_state) = 0;
682 670
683 // Called any time the IceGatheringState changes. 671 // Called any time the IceGatheringState changes.
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 cricket::WebRtcVideoEncoderFactory* encoder_factory, 870 cricket::WebRtcVideoEncoderFactory* encoder_factory,
883 cricket::WebRtcVideoDecoderFactory* decoder_factory) { 871 cricket::WebRtcVideoDecoderFactory* decoder_factory) {
884 return CreatePeerConnectionFactory( 872 return CreatePeerConnectionFactory(
885 worker_and_network_thread, worker_and_network_thread, signaling_thread, 873 worker_and_network_thread, worker_and_network_thread, signaling_thread,
886 default_adm, encoder_factory, decoder_factory); 874 default_adm, encoder_factory, decoder_factory);
887 } 875 }
888 876
889 } // namespace webrtc 877 } // namespace webrtc
890 878
891 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ 879 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/pc/peerconnection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698