Chromium Code Reviews| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 class Thread; | 79 class Thread; |
| 80 } | 80 } |
| 81 | 81 |
| 82 namespace cricket { | 82 namespace cricket { |
| 83 class WebRtcVideoDecoderFactory; | 83 class WebRtcVideoDecoderFactory; |
| 84 class WebRtcVideoEncoderFactory; | 84 class WebRtcVideoEncoderFactory; |
| 85 } | 85 } |
| 86 | 86 |
| 87 namespace webrtc { | 87 namespace webrtc { |
| 88 class AudioDeviceModule; | 88 class AudioDeviceModule; |
| 89 class AudioMixer; | |
| 89 class MediaConstraintsInterface; | 90 class MediaConstraintsInterface; |
| 90 | 91 |
| 91 // MediaStream container interface. | 92 // MediaStream container interface. |
| 92 class StreamCollectionInterface : public rtc::RefCountInterface { | 93 class StreamCollectionInterface : public rtc::RefCountInterface { |
| 93 public: | 94 public: |
| 94 // TODO(ronghuawu): Update the function names to c++ style, e.g. find -> Find. | 95 // TODO(ronghuawu): Update the function names to c++ style, e.g. find -> Find. |
| 95 virtual size_t count() = 0; | 96 virtual size_t count() = 0; |
| 96 virtual MediaStreamInterface* at(size_t index) = 0; | 97 virtual MediaStreamInterface* at(size_t index) = 0; |
| 97 virtual MediaStreamInterface* find(const std::string& label) = 0; | 98 virtual MediaStreamInterface* find(const std::string& label) = 0; |
| 98 virtual MediaStreamTrackInterface* FindAudioTrack( | 99 virtual MediaStreamTrackInterface* FindAudioTrack( |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 528 return false; | 529 return false; |
| 529 } | 530 } |
| 530 | 531 |
| 531 // Stops logging the RtcEventLog. | 532 // Stops logging the RtcEventLog. |
| 532 // TODO(ivoc): Make this pure virtual when Chrome is updated. | 533 // TODO(ivoc): Make this pure virtual when Chrome is updated. |
| 533 virtual void StopRtcEventLog() {} | 534 virtual void StopRtcEventLog() {} |
| 534 | 535 |
| 535 // Terminates all media and closes the transport. | 536 // Terminates all media and closes the transport. |
| 536 virtual void Close() = 0; | 537 virtual void Close() = 0; |
| 537 | 538 |
| 539 // Get remote audio tracks' ssrcs. | |
| 540 virtual std::vector<uint32_t> GetRemoteAudioTrackSsrcs() = 0; | |
| 541 | |
| 538 protected: | 542 protected: |
| 539 // Dtor protected as objects shouldn't be deleted via this interface. | 543 // Dtor protected as objects shouldn't be deleted via this interface. |
| 540 ~PeerConnectionInterface() {} | 544 ~PeerConnectionInterface() {} |
| 541 }; | 545 }; |
| 542 | 546 |
| 543 // PeerConnection callback interface. Application should implement these | 547 // PeerConnection callback interface. Application should implement these |
| 544 // methods. | 548 // methods. |
| 545 class PeerConnectionObserver { | 549 class PeerConnectionObserver { |
| 546 public: | 550 public: |
| 547 enum StateType { | 551 enum StateType { |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 752 // If non-null, ownership of |default_adm|, |encoder_factory| and | 756 // If non-null, ownership of |default_adm|, |encoder_factory| and |
| 753 // |decoder_factory| are transferred to the returned factory. | 757 // |decoder_factory| are transferred to the returned factory. |
| 754 rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory( | 758 rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory( |
| 755 rtc::Thread* network_thread, | 759 rtc::Thread* network_thread, |
| 756 rtc::Thread* worker_thread, | 760 rtc::Thread* worker_thread, |
| 757 rtc::Thread* signaling_thread, | 761 rtc::Thread* signaling_thread, |
| 758 AudioDeviceModule* default_adm, | 762 AudioDeviceModule* default_adm, |
| 759 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 763 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
| 760 cricket::WebRtcVideoDecoderFactory* decoder_factory); | 764 cricket::WebRtcVideoDecoderFactory* decoder_factory); |
| 761 | 765 |
| 766 // Create a new instance of PeerConnectionFactoryInterface with external audio | |
| 767 // mixer. | |
| 768 // | |
| 769 // If |audio_mixer| is null, an internal audio mixer will be created and used. | |
| 770 rtc::scoped_refptr<PeerConnectionFactoryInterface> | |
| 771 CreatePeerConnectionFactoryWithAudioMixer( | |
| 772 rtc::Thread* network_thread, | |
| 773 rtc::Thread* worker_thread, | |
| 774 rtc::Thread* signaling_thread, | |
| 775 AudioDeviceModule* default_adm, | |
| 776 cricket::WebRtcVideoEncoderFactory* encoder_factory, | |
| 777 cricket::WebRtcVideoDecoderFactory* decoder_factory, | |
| 778 rtc::scoped_refptr<AudioMixer> audio_mixer); | |
| 779 | |
| 762 // Create a new instance of PeerConnectionFactoryInterface. | 780 // Create a new instance of PeerConnectionFactoryInterface. |
| 763 // Same thread is used as worker and network thread. | 781 // Same thread is used as worker and network thread. |
| 764 inline rtc::scoped_refptr<PeerConnectionFactoryInterface> | 782 inline rtc::scoped_refptr<PeerConnectionFactoryInterface> |
| 765 CreatePeerConnectionFactory( | 783 CreatePeerConnectionFactory( |
| 766 rtc::Thread* worker_and_network_thread, | 784 rtc::Thread* worker_and_network_thread, |
| 767 rtc::Thread* signaling_thread, | 785 rtc::Thread* signaling_thread, |
| 768 AudioDeviceModule* default_adm, | 786 AudioDeviceModule* default_adm, |
| 769 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 787 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
| 770 cricket::WebRtcVideoDecoderFactory* decoder_factory) { | 788 cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
| 771 return CreatePeerConnectionFactory( | 789 return CreatePeerConnectionFactory( |
| 772 worker_and_network_thread, worker_and_network_thread, signaling_thread, | 790 worker_and_network_thread, worker_and_network_thread, signaling_thread, |
| 773 default_adm, encoder_factory, decoder_factory); | 791 default_adm, encoder_factory, decoder_factory); |
| 774 } | 792 } |
| 775 | 793 |
| 794 | |
|
the sun
2016/12/07 15:56:08
remove space
GeorgeZ
2016/12/07 18:28:17
Done.
| |
| 795 | |
| 776 } // namespace webrtc | 796 } // namespace webrtc |
| 777 | 797 |
| 778 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 798 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
| OLD | NEW |