| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 // Starts stream activity. | 111 // Starts stream activity. |
| 112 // When a stream is active, it can receive, process and deliver packets. | 112 // When a stream is active, it can receive, process and deliver packets. |
| 113 virtual void Start() = 0; | 113 virtual void Start() = 0; |
| 114 // Stops stream activity. | 114 // Stops stream activity. |
| 115 // When a stream is stopped, it can't receive, process or deliver packets. | 115 // When a stream is stopped, it can't receive, process or deliver packets. |
| 116 virtual void Stop() = 0; | 116 virtual void Stop() = 0; |
| 117 | 117 |
| 118 virtual Stats GetStats() const = 0; | 118 virtual Stats GetStats() const = 0; |
| 119 // TODO(solenberg): Remove, once AudioMonitor is gone. |
| 120 virtual int GetOutputLevel() const = 0; |
| 119 | 121 |
| 120 // Sets an audio sink that receives unmixed audio from the receive stream. | 122 // Sets an audio sink that receives unmixed audio from the receive stream. |
| 121 // Ownership of the sink is passed to the stream and can be used by the | 123 // Ownership of the sink is passed to the stream and can be used by the |
| 122 // caller to do lifetime management (i.e. when the sink's dtor is called). | 124 // caller to do lifetime management (i.e. when the sink's dtor is called). |
| 123 // Only one sink can be set and passing a null sink clears an existing one. | 125 // Only one sink can be set and passing a null sink clears an existing one. |
| 124 // NOTE: Audio must still somehow be pulled through AudioTransport for audio | 126 // NOTE: Audio must still somehow be pulled through AudioTransport for audio |
| 125 // to stream through this sink. In practice, this happens if mixed audio | 127 // to stream through this sink. In practice, this happens if mixed audio |
| 126 // is being pulled+rendered and/or if audio is being pulled for the purposes | 128 // is being pulled+rendered and/or if audio is being pulled for the purposes |
| 127 // of feeding to the AEC. | 129 // of feeding to the AEC. |
| 128 virtual void SetSink(std::unique_ptr<AudioSinkInterface> sink) = 0; | 130 virtual void SetSink(std::unique_ptr<AudioSinkInterface> sink) = 0; |
| 129 | 131 |
| 130 // Sets playback gain of the stream, applied when mixing, and thus after it | 132 // Sets playback gain of the stream, applied when mixing, and thus after it |
| 131 // is potentially forwarded to any attached AudioSinkInterface implementation. | 133 // is potentially forwarded to any attached AudioSinkInterface implementation. |
| 132 virtual void SetGain(float gain) = 0; | 134 virtual void SetGain(float gain) = 0; |
| 133 | 135 |
| 134 protected: | 136 protected: |
| 135 virtual ~AudioReceiveStream() {} | 137 virtual ~AudioReceiveStream() {} |
| 136 }; | 138 }; |
| 137 } // namespace webrtc | 139 } // namespace webrtc |
| 138 | 140 |
| 139 #endif // WEBRTC_CALL_AUDIO_RECEIVE_STREAM_H_ | 141 #endif // WEBRTC_CALL_AUDIO_RECEIVE_STREAM_H_ |
| OLD | NEW |