| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // |volume| is in the range of [0, 10]. | 57 // |volume| is in the range of [0, 10]. |
| 58 virtual void SetAudioPlayoutVolume(uint32_t ssrc, double volume) = 0; | 58 virtual void SetAudioPlayoutVolume(uint32_t ssrc, double volume) = 0; |
| 59 | 59 |
| 60 // Allows for setting a direct audio sink for an incoming audio source. | 60 // Allows for setting a direct audio sink for an incoming audio source. |
| 61 // Only one audio sink is supported per ssrc and ownership of the sink is | 61 // Only one audio sink is supported per ssrc and ownership of the sink is |
| 62 // passed to the provider. | 62 // passed to the provider. |
| 63 virtual void SetRawAudioSink( | 63 virtual void SetRawAudioSink( |
| 64 uint32_t ssrc, | 64 uint32_t ssrc, |
| 65 std::unique_ptr<webrtc::AudioSinkInterface> sink) = 0; | 65 std::unique_ptr<webrtc::AudioSinkInterface> sink) = 0; |
| 66 | 66 |
| 67 virtual RtpParameters GetAudioRtpParameters(uint32_t ssrc) const = 0; | 67 virtual RtpParameters GetAudioRtpSendParameters(uint32_t ssrc) const = 0; |
| 68 virtual bool SetAudioRtpParameters(uint32_t ssrc, | 68 virtual bool SetAudioRtpSendParameters(uint32_t ssrc, |
| 69 const RtpParameters& parameters) = 0; | 69 const RtpParameters& parameters) = 0; |
| 70 |
| 71 virtual RtpParameters GetAudioRtpReceiveParameters(uint32_t ssrc) const = 0; |
| 72 virtual bool SetAudioRtpReceiveParameters( |
| 73 uint32_t ssrc, |
| 74 const RtpParameters& parameters) = 0; |
| 70 | 75 |
| 71 protected: | 76 protected: |
| 72 virtual ~AudioProviderInterface() {} | 77 virtual ~AudioProviderInterface() {} |
| 73 }; | 78 }; |
| 74 | 79 |
| 75 // This interface is called by VideoRtpSender/Receivers to change the settings | 80 // This interface is called by VideoRtpSender/Receivers to change the settings |
| 76 // of a video track connected to a certain PeerConnection. | 81 // of a video track connected to a certain PeerConnection. |
| 77 class VideoProviderInterface { | 82 class VideoProviderInterface { |
| 78 public: | 83 public: |
| 79 virtual bool SetSource( | 84 virtual bool SetSource( |
| 80 uint32_t ssrc, | 85 uint32_t ssrc, |
| 81 rtc::VideoSourceInterface<cricket::VideoFrame>* source) = 0; | 86 rtc::VideoSourceInterface<cricket::VideoFrame>* source) = 0; |
| 82 // Enable/disable the video playout of a remote video track with |ssrc|. | 87 // Enable/disable the video playout of a remote video track with |ssrc|. |
| 83 virtual void SetVideoPlayout( | 88 virtual void SetVideoPlayout( |
| 84 uint32_t ssrc, | 89 uint32_t ssrc, |
| 85 bool enable, | 90 bool enable, |
| 86 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) = 0; | 91 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) = 0; |
| 87 // Enable sending video on the local video track with |ssrc|. | 92 // Enable sending video on the local video track with |ssrc|. |
| 88 virtual void SetVideoSend(uint32_t ssrc, | 93 virtual void SetVideoSend(uint32_t ssrc, |
| 89 bool enable, | 94 bool enable, |
| 90 const cricket::VideoOptions* options) = 0; | 95 const cricket::VideoOptions* options) = 0; |
| 91 | 96 |
| 92 virtual RtpParameters GetVideoRtpParameters(uint32_t ssrc) const = 0; | 97 virtual RtpParameters GetVideoRtpSendParameters(uint32_t ssrc) const = 0; |
| 93 virtual bool SetVideoRtpParameters(uint32_t ssrc, | 98 virtual bool SetVideoRtpSendParameters(uint32_t ssrc, |
| 94 const RtpParameters& parameters) = 0; | 99 const RtpParameters& parameters) = 0; |
| 100 |
| 101 virtual RtpParameters GetVideoRtpReceiveParameters(uint32_t ssrc) const = 0; |
| 102 virtual bool SetVideoRtpReceiveParameters( |
| 103 uint32_t ssrc, |
| 104 const RtpParameters& parameters) = 0; |
| 95 | 105 |
| 96 protected: | 106 protected: |
| 97 virtual ~VideoProviderInterface() {} | 107 virtual ~VideoProviderInterface() {} |
| 98 }; | 108 }; |
| 99 | 109 |
| 100 } // namespace webrtc | 110 } // namespace webrtc |
| 101 | 111 |
| 102 #endif // WEBRTC_API_MEDIASTREAMPROVIDER_H_ | 112 #endif // WEBRTC_API_MEDIASTREAMPROVIDER_H_ |
| OLD | NEW |