OLD | NEW |
---|---|
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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
586 | 586 |
587 // Ice candidates have been removed. | 587 // Ice candidates have been removed. |
588 // TODO(honghaiz): Make this a pure virtual method when all its subclasses | 588 // TODO(honghaiz): Make this a pure virtual method when all its subclasses |
589 // implement it. | 589 // implement it. |
590 virtual void OnIceCandidatesRemoved( | 590 virtual void OnIceCandidatesRemoved( |
591 const std::vector<cricket::Candidate>& candidates) {} | 591 const std::vector<cricket::Candidate>& candidates) {} |
592 | 592 |
593 // Called when the ICE connection receiving status changes. | 593 // Called when the ICE connection receiving status changes. |
594 virtual void OnIceConnectionReceivingChange(bool receiving) {} | 594 virtual void OnIceConnectionReceivingChange(bool receiving) {} |
595 | 595 |
596 // Called when a track is added to streams. | |
597 // TODO(zhihuang) Make this a pure virtual method when all its subclasses | |
598 // implement it. | |
599 virtual void OnAddTrack( | |
honghaiz3
2016/11/17 01:19:02
Should we also Add OnRemoveTrack?
If users expect
Zhi Huang
2016/11/17 01:42:06
According to spec https://www.w3.org/TR/webrtc/#ev
| |
600 rtc::scoped_refptr<RtpReceiverInterface> receiver, | |
601 std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams) {} | |
602 | |
596 protected: | 603 protected: |
597 // Dtor protected as objects shouldn't be deleted via this interface. | 604 // Dtor protected as objects shouldn't be deleted via this interface. |
598 ~PeerConnectionObserver() {} | 605 ~PeerConnectionObserver() {} |
599 }; | 606 }; |
600 | 607 |
601 // PeerConnectionFactoryInterface is the factory interface use for creating | 608 // PeerConnectionFactoryInterface is the factory interface use for creating |
602 // PeerConnection, MediaStream and media tracks. | 609 // PeerConnection, MediaStream and media tracks. |
603 // PeerConnectionFactoryInterface will create required libjingle threads, | 610 // PeerConnectionFactoryInterface will create required libjingle threads, |
604 // socket and network manager factory classes for networking. | 611 // socket and network manager factory classes for networking. |
605 // If an application decides to provide its own threads and network | 612 // If an application decides to provide its own threads and network |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
757 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 764 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
758 cricket::WebRtcVideoDecoderFactory* decoder_factory) { | 765 cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
759 return CreatePeerConnectionFactory( | 766 return CreatePeerConnectionFactory( |
760 worker_and_network_thread, worker_and_network_thread, signaling_thread, | 767 worker_and_network_thread, worker_and_network_thread, signaling_thread, |
761 default_adm, encoder_factory, decoder_factory); | 768 default_adm, encoder_factory, decoder_factory); |
762 } | 769 } |
763 | 770 |
764 } // namespace webrtc | 771 } // namespace webrtc |
765 | 772 |
766 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 773 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
OLD | NEW |