| 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 std::vector<MediaStreamInterface*> streams) { | 525 std::vector<MediaStreamInterface*> streams) { |
| 526 return nullptr; | 526 return nullptr; |
| 527 } | 527 } |
| 528 | 528 |
| 529 // Remove an RtpSender from this PeerConnection. | 529 // Remove an RtpSender from this PeerConnection. |
| 530 // Returns true on success. | 530 // Returns true on success. |
| 531 virtual bool RemoveTrack(RtpSenderInterface* sender) { | 531 virtual bool RemoveTrack(RtpSenderInterface* sender) { |
| 532 return false; | 532 return false; |
| 533 } | 533 } |
| 534 | 534 |
| 535 // Returns pointer to a DtmfSender on success. Otherwise returns NULL. | 535 // Returns pointer to a DtmfSender on success. Otherwise returns null. |
| 536 // | 536 // |
| 537 // This API is no longer part of the standard; instead DtmfSenders are | 537 // This API is no longer part of the standard; instead DtmfSenders are |
| 538 // obtained from RtpSenders. Which is what the implementation does; it finds | 538 // obtained from RtpSenders. Which is what the implementation does; it finds |
| 539 // an RtpSender for |track| and just returns its DtmfSender. | 539 // an RtpSender for |track| and just returns its DtmfSender. |
| 540 virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender( | 540 virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender( |
| 541 AudioTrackInterface* track) = 0; | 541 AudioTrackInterface* track) = 0; |
| 542 | 542 |
| 543 // TODO(deadbeef): Make these pure virtual once all subclasses implement them. | 543 // TODO(deadbeef): Make these pure virtual once all subclasses implement them. |
| 544 | 544 |
| 545 // Creates a sender without a track. Can be used for "early media"/"warmup" | 545 // Creates a sender without a track. Can be used for "early media"/"warmup" |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 // platform-specific capturers, but these should be refactored to use | 915 // platform-specific capturers, but these should be refactored to use |
| 916 // VideoTrackSourceInterface directly. | 916 // VideoTrackSourceInterface directly. |
| 917 // TODO(deadbeef): Make pure virtual once downstream mock PC factory classes | 917 // TODO(deadbeef): Make pure virtual once downstream mock PC factory classes |
| 918 // are updated. | 918 // are updated. |
| 919 virtual rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource( | 919 virtual rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource( |
| 920 std::unique_ptr<cricket::VideoCapturer> capturer) { | 920 std::unique_ptr<cricket::VideoCapturer> capturer) { |
| 921 return nullptr; | 921 return nullptr; |
| 922 } | 922 } |
| 923 | 923 |
| 924 // A video source creator that allows selection of resolution and frame rate. | 924 // A video source creator that allows selection of resolution and frame rate. |
| 925 // |constraints| decides video resolution and frame rate but can be NULL. | 925 // |constraints| decides video resolution and frame rate but can be null. |
| 926 // In the NULL case, use the version above. | 926 // In the null case, use the version above. |
| 927 // | 927 // |
| 928 // |constraints| is only used for the invocation of this method, and can | 928 // |constraints| is only used for the invocation of this method, and can |
| 929 // safely be destroyed afterwards. | 929 // safely be destroyed afterwards. |
| 930 virtual rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource( | 930 virtual rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource( |
| 931 std::unique_ptr<cricket::VideoCapturer> capturer, | 931 std::unique_ptr<cricket::VideoCapturer> capturer, |
| 932 const MediaConstraintsInterface* constraints) { | 932 const MediaConstraintsInterface* constraints) { |
| 933 return nullptr; | 933 return nullptr; |
| 934 } | 934 } |
| 935 | 935 |
| 936 // Deprecated; please use the versions that take unique_ptrs above. | 936 // Deprecated; please use the versions that take unique_ptrs above. |
| 937 // TODO(deadbeef): Remove these once safe to do so. | 937 // TODO(deadbeef): Remove these once safe to do so. |
| 938 virtual rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource( | 938 virtual rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource( |
| 939 cricket::VideoCapturer* capturer) { | 939 cricket::VideoCapturer* capturer) { |
| 940 return CreateVideoSource(std::unique_ptr<cricket::VideoCapturer>(capturer)); | 940 return CreateVideoSource(std::unique_ptr<cricket::VideoCapturer>(capturer)); |
| 941 } | 941 } |
| 942 virtual rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource( | 942 virtual rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource( |
| 943 cricket::VideoCapturer* capturer, | 943 cricket::VideoCapturer* capturer, |
| 944 const MediaConstraintsInterface* constraints) { | 944 const MediaConstraintsInterface* constraints) { |
| 945 return CreateVideoSource(std::unique_ptr<cricket::VideoCapturer>(capturer), | 945 return CreateVideoSource(std::unique_ptr<cricket::VideoCapturer>(capturer), |
| 946 constraints); | 946 constraints); |
| 947 } | 947 } |
| 948 | 948 |
| 949 // Creates a new local VideoTrack. The same |source| can be used in several | 949 // Creates a new local VideoTrack. The same |source| can be used in several |
| 950 // tracks. | 950 // tracks. |
| 951 virtual rtc::scoped_refptr<VideoTrackInterface> CreateVideoTrack( | 951 virtual rtc::scoped_refptr<VideoTrackInterface> CreateVideoTrack( |
| 952 const std::string& label, | 952 const std::string& label, |
| 953 VideoTrackSourceInterface* source) = 0; | 953 VideoTrackSourceInterface* source) = 0; |
| 954 | 954 |
| 955 // Creates an new AudioTrack. At the moment |source| can be NULL. | 955 // Creates an new AudioTrack. At the moment |source| can be null. |
| 956 virtual rtc::scoped_refptr<AudioTrackInterface> | 956 virtual rtc::scoped_refptr<AudioTrackInterface> |
| 957 CreateAudioTrack(const std::string& label, | 957 CreateAudioTrack(const std::string& label, |
| 958 AudioSourceInterface* source) = 0; | 958 AudioSourceInterface* source) = 0; |
| 959 | 959 |
| 960 // Starts AEC dump using existing file. Takes ownership of |file| and passes | 960 // Starts AEC dump using existing file. Takes ownership of |file| and passes |
| 961 // it on to VoiceEngine (via other objects) immediately, which will take | 961 // it on to VoiceEngine (via other objects) immediately, which will take |
| 962 // the ownerhip. If the operation fails, the file will be closed. | 962 // the ownerhip. If the operation fails, the file will be closed. |
| 963 // A maximum file size in bytes can be specified. When the file size limit is | 963 // A maximum file size in bytes can be specified. When the file size limit is |
| 964 // reached, logging is stopped automatically. If max_size_bytes is set to a | 964 // reached, logging is stopped automatically. If max_size_bytes is set to a |
| 965 // value <= 0, no limit will be used, and logging will continue until the | 965 // value <= 0, no limit will be used, and logging will continue until the |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1103 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 1103 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
| 1104 cricket::WebRtcVideoDecoderFactory* decoder_factory) { | 1104 cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
| 1105 return CreatePeerConnectionFactory( | 1105 return CreatePeerConnectionFactory( |
| 1106 worker_and_network_thread, worker_and_network_thread, signaling_thread, | 1106 worker_and_network_thread, worker_and_network_thread, signaling_thread, |
| 1107 default_adm, encoder_factory, decoder_factory); | 1107 default_adm, encoder_factory, decoder_factory); |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 } // namespace webrtc | 1110 } // namespace webrtc |
| 1111 | 1111 |
| 1112 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 1112 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
| OLD | NEW |