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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 // function OnIceCandidate. Send these candidates to the remote peer. | 49 // function OnIceCandidate. Send these candidates to the remote peer. |
| 50 | 50 |
| 51 #ifndef WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 51 #ifndef WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
| 52 #define WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 52 #define WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
| 53 | 53 |
| 54 #include <memory> | 54 #include <memory> |
| 55 #include <string> | 55 #include <string> |
| 56 #include <utility> | 56 #include <utility> |
| 57 #include <vector> | 57 #include <vector> |
| 58 | 58 |
| 59 #include "webrtc/api/audio/audio_mixer.h" | |
| 59 #include "webrtc/api/datachannelinterface.h" | 60 #include "webrtc/api/datachannelinterface.h" |
| 60 #include "webrtc/api/dtmfsenderinterface.h" | 61 #include "webrtc/api/dtmfsenderinterface.h" |
| 61 #include "webrtc/api/jsep.h" | 62 #include "webrtc/api/jsep.h" |
| 62 #include "webrtc/api/mediastreaminterface.h" | 63 #include "webrtc/api/mediastreaminterface.h" |
| 63 #include "webrtc/api/rtcstatscollector.h" | 64 #include "webrtc/api/rtcstatscollector.h" |
| 64 #include "webrtc/api/rtpreceiverinterface.h" | 65 #include "webrtc/api/rtpreceiverinterface.h" |
| 65 #include "webrtc/api/rtpsenderinterface.h" | 66 #include "webrtc/api/rtpsenderinterface.h" |
| 66 #include "webrtc/api/statstypes.h" | 67 #include "webrtc/api/statstypes.h" |
| 67 #include "webrtc/api/umametrics.h" | 68 #include "webrtc/api/umametrics.h" |
| 68 #include "webrtc/base/fileutils.h" | 69 #include "webrtc/base/fileutils.h" |
| (...skipping 459 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 766 rtc::Thread* worker_and_network_thread, | 770 rtc::Thread* worker_and_network_thread, |
| 767 rtc::Thread* signaling_thread, | 771 rtc::Thread* signaling_thread, |
| 768 AudioDeviceModule* default_adm, | 772 AudioDeviceModule* default_adm, |
| 769 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 773 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
| 770 cricket::WebRtcVideoDecoderFactory* decoder_factory) { | 774 cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
| 771 return CreatePeerConnectionFactory( | 775 return CreatePeerConnectionFactory( |
| 772 worker_and_network_thread, worker_and_network_thread, signaling_thread, | 776 worker_and_network_thread, worker_and_network_thread, signaling_thread, |
| 773 default_adm, encoder_factory, decoder_factory); | 777 default_adm, encoder_factory, decoder_factory); |
| 774 } | 778 } |
| 775 | 779 |
| 780 // Create a new instance of PeerConnectionFactoryInterface with external audio | |
| 781 // mixer. | |
| 782 // | |
| 783 // |network_thread|, |worker_thread| and |signaling_thread| are | |
| 784 // the only mandatory parameters. | |
| 785 // | |
| 786 // If non-null, ownership of |default_adm|, |encoder_factory| and | |
| 787 // |decoder_factory| are transferred to the returned factory. | |
|
aleloi
2016/12/05 14:03:08
The comment should mention the new argument |audio
GeorgeZ
2016/12/05 17:56:18
Done.
| |
| 788 rtc::scoped_refptr<PeerConnectionFactoryInterface> | |
| 789 CreatePeerConnectionFactoryWithAudioMixer( | |
| 790 rtc::Thread* network_thread, | |
| 791 rtc::Thread* worker_thread, | |
| 792 rtc::Thread* signaling_thread, | |
| 793 AudioDeviceModule* default_adm, | |
| 794 cricket::WebRtcVideoEncoderFactory* encoder_factory, | |
| 795 cricket::WebRtcVideoDecoderFactory* decoder_factory, | |
| 796 rtc::scoped_refptr<AudioMixer> audio_mixer); | |
| 797 | |
| 776 } // namespace webrtc | 798 } // namespace webrtc |
| 777 | 799 |
| 778 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 800 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
| OLD | NEW |