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 |
| 11 #ifndef WEBRTC_API_MEDIASTREAMPROVIDER_H_ | 11 #ifndef WEBRTC_API_MEDIASTREAMPROVIDER_H_ |
| 12 #define WEBRTC_API_MEDIASTREAMPROVIDER_H_ | 12 #define WEBRTC_API_MEDIASTREAMPROVIDER_H_ |
| 13 | 13 |
| 14 #include "webrtc/api/rtpsenderinterface.h" | |
| 14 #include "webrtc/base/basictypes.h" | 15 #include "webrtc/base/basictypes.h" |
| 15 #include "webrtc/base/scoped_ptr.h" | 16 #include "webrtc/base/scoped_ptr.h" |
| 16 #include "webrtc/media/base/videosinkinterface.h" | 17 #include "webrtc/media/base/videosinkinterface.h" |
| 17 | 18 |
| 18 namespace cricket { | 19 namespace cricket { |
| 19 | 20 |
| 20 class AudioRenderer; | 21 class AudioRenderer; |
| 21 class VideoCapturer; | 22 class VideoCapturer; |
| 22 class VideoFrame; | 23 class VideoFrame; |
| 23 class VideoRenderer; | 24 class VideoRenderer; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 // |volume| is in the range of [0, 10]. | 56 // |volume| is in the range of [0, 10]. |
| 56 virtual void SetAudioPlayoutVolume(uint32_t ssrc, double volume) = 0; | 57 virtual void SetAudioPlayoutVolume(uint32_t ssrc, double volume) = 0; |
| 57 | 58 |
| 58 // Allows for setting a direct audio sink for an incoming audio source. | 59 // Allows for setting a direct audio sink for an incoming audio source. |
| 59 // Only one audio sink is supported per ssrc and ownership of the sink is | 60 // Only one audio sink is supported per ssrc and ownership of the sink is |
| 60 // passed to the provider. | 61 // passed to the provider. |
| 61 virtual void SetRawAudioSink( | 62 virtual void SetRawAudioSink( |
| 62 uint32_t ssrc, | 63 uint32_t ssrc, |
| 63 rtc::scoped_ptr<webrtc::AudioSinkInterface> sink) = 0; | 64 rtc::scoped_ptr<webrtc::AudioSinkInterface> sink) = 0; |
| 64 | 65 |
| 66 virtual RTCRtpParameters GetAudioRtpParameters(uint32_t ssrc) = 0; | |
|
Taylor Brandstetter
2016/03/12 01:57:06
Can probably make this const.
skvlad
2016/03/15 21:18:17
Done.
| |
| 67 virtual bool SetAudioRtpParameters(uint32_t ssrc, | |
| 68 const RTCRtpParameters& parameters) = 0; | |
| 69 | |
| 65 protected: | 70 protected: |
| 66 virtual ~AudioProviderInterface() {} | 71 virtual ~AudioProviderInterface() {} |
| 67 }; | 72 }; |
| 68 | 73 |
| 69 // This interface is called by VideoRtpSender/Receivers to change the settings | 74 // This interface is called by VideoRtpSender/Receivers to change the settings |
| 70 // of a video track connected to a certain PeerConnection. | 75 // of a video track connected to a certain PeerConnection. |
| 71 class VideoProviderInterface { | 76 class VideoProviderInterface { |
| 72 public: | 77 public: |
| 73 virtual bool SetCaptureDevice(uint32_t ssrc, | 78 virtual bool SetCaptureDevice(uint32_t ssrc, |
| 74 cricket::VideoCapturer* camera) = 0; | 79 cricket::VideoCapturer* camera) = 0; |
| 75 // Enable/disable the video playout of a remote video track with |ssrc|. | 80 // Enable/disable the video playout of a remote video track with |ssrc|. |
| 76 virtual void SetVideoPlayout( | 81 virtual void SetVideoPlayout( |
| 77 uint32_t ssrc, | 82 uint32_t ssrc, |
| 78 bool enable, | 83 bool enable, |
| 79 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) = 0; | 84 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) = 0; |
| 80 // Enable sending video on the local video track with |ssrc|. | 85 // Enable sending video on the local video track with |ssrc|. |
| 81 virtual void SetVideoSend(uint32_t ssrc, | 86 virtual void SetVideoSend(uint32_t ssrc, |
| 82 bool enable, | 87 bool enable, |
| 83 const cricket::VideoOptions* options) = 0; | 88 const cricket::VideoOptions* options) = 0; |
| 84 | 89 |
| 90 virtual RTCRtpParameters GetVideoRtpParameters(uint32_t ssrc) = 0; | |
|
Taylor Brandstetter
2016/03/12 01:57:06
This too.
skvlad
2016/03/15 21:18:17
Done.
| |
| 91 virtual bool SetVideoRtpParameters(uint32_t ssrc, | |
| 92 const RTCRtpParameters& parameters) = 0; | |
| 93 | |
| 85 protected: | 94 protected: |
| 86 virtual ~VideoProviderInterface() {} | 95 virtual ~VideoProviderInterface() {} |
| 87 }; | 96 }; |
| 88 | 97 |
| 89 } // namespace webrtc | 98 } // namespace webrtc |
| 90 | 99 |
| 91 #endif // WEBRTC_API_MEDIASTREAMPROVIDER_H_ | 100 #endif // WEBRTC_API_MEDIASTREAMPROVIDER_H_ |
| OLD | NEW |