Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_ | 28 #ifndef TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_ |
| 29 #define TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_ | 29 #define TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_ |
| 30 | 30 |
| 31 #include "webrtc/base/basictypes.h" | 31 #include "webrtc/base/basictypes.h" |
| 32 #include "webrtc/base/scoped_ptr.h" | 32 #include "webrtc/base/scoped_ref_ptr.h" |
| 33 | 33 |
| 34 namespace cricket { | 34 namespace cricket { |
| 35 | 35 |
| 36 class AudioRenderer; | 36 class AudioRenderer; |
| 37 class VideoCapturer; | 37 class VideoCapturer; |
| 38 class VideoRenderer; | 38 class VideoRenderer; |
| 39 struct AudioOptions; | 39 struct AudioOptions; |
| 40 struct VideoOptions; | 40 struct VideoOptions; |
| 41 | 41 |
| 42 } // namespace cricket | 42 } // namespace cricket |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 68 | 68 |
| 69 // Sets the audio playout volume of a remote audio track with |ssrc|. | 69 // Sets the audio playout volume of a remote audio track with |ssrc|. |
| 70 // |volume| is in the range of [0, 10]. | 70 // |volume| is in the range of [0, 10]. |
| 71 virtual void SetAudioPlayoutVolume(uint32_t ssrc, double volume) = 0; | 71 virtual void SetAudioPlayoutVolume(uint32_t ssrc, double volume) = 0; |
| 72 | 72 |
| 73 // Allows for setting a direct audio sink for an incoming audio source. | 73 // Allows for setting a direct audio sink for an incoming audio source. |
| 74 // Only one audio sink is supported per ssrc and ownership of the sink is | 74 // Only one audio sink is supported per ssrc and ownership of the sink is |
| 75 // passed to the provider. | 75 // passed to the provider. |
| 76 virtual void SetRawAudioSink( | 76 virtual void SetRawAudioSink( |
| 77 uint32_t ssrc, | 77 uint32_t ssrc, |
| 78 rtc::scoped_ptr<webrtc::AudioSinkInterface> sink) = 0; | 78 rtc::scoped_refptr<webrtc::AudioSinkInterface> sink) = 0; |
|
the sun
2016/01/08 13:14:26
Assuming we'll be replacing this with shared_ptr o
Taylor Brandstetter
2016/01/08 19:46:58
const & would indeed save some unnecessary copying
the sun
2016/01/11 10:38:27
For scoped_ptr (and current scoped_ref_ptr) it won
tommi
2016/01/12 08:58:06
Passing scoped_refptr by value will trigger an ext
| |
| 79 | 79 |
| 80 protected: | 80 protected: |
| 81 virtual ~AudioProviderInterface() {} | 81 virtual ~AudioProviderInterface() {} |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 // This interface is called by VideoRtpSender/Receivers to change the settings | 84 // This interface is called by VideoRtpSender/Receivers to change the settings |
| 85 // of a video track connected to a certain PeerConnection. | 85 // of a video track connected to a certain PeerConnection. |
| 86 class VideoProviderInterface { | 86 class VideoProviderInterface { |
| 87 public: | 87 public: |
| 88 virtual bool SetCaptureDevice(uint32_t ssrc, | 88 virtual bool SetCaptureDevice(uint32_t ssrc, |
| 89 cricket::VideoCapturer* camera) = 0; | 89 cricket::VideoCapturer* camera) = 0; |
| 90 // Enable/disable the video playout of a remote video track with |ssrc|. | 90 // Enable/disable the video playout of a remote video track with |ssrc|. |
| 91 virtual void SetVideoPlayout(uint32_t ssrc, | 91 virtual void SetVideoPlayout(uint32_t ssrc, |
| 92 bool enable, | 92 bool enable, |
| 93 cricket::VideoRenderer* renderer) = 0; | 93 cricket::VideoRenderer* renderer) = 0; |
| 94 // Enable sending video on the local video track with |ssrc|. | 94 // Enable sending video on the local video track with |ssrc|. |
| 95 virtual void SetVideoSend(uint32_t ssrc, | 95 virtual void SetVideoSend(uint32_t ssrc, |
| 96 bool enable, | 96 bool enable, |
| 97 const cricket::VideoOptions* options) = 0; | 97 const cricket::VideoOptions* options) = 0; |
| 98 | 98 |
| 99 protected: | 99 protected: |
| 100 virtual ~VideoProviderInterface() {} | 100 virtual ~VideoProviderInterface() {} |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 } // namespace webrtc | 103 } // namespace webrtc |
| 104 | 104 |
| 105 #endif // TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_ | 105 #endif // TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_ |
| OLD | NEW |