OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 127 matching lines...) Loading... |
138 virtual ~NetEq() {} | 138 virtual ~NetEq() {} |
139 | 139 |
140 // Inserts a new packet into NetEq. The |receive_timestamp| is an indication | 140 // Inserts a new packet into NetEq. The |receive_timestamp| is an indication |
141 // of the time when the packet was received, and should be measured with | 141 // of the time when the packet was received, and should be measured with |
142 // the same tick rate as the RTP timestamp of the current payload. | 142 // the same tick rate as the RTP timestamp of the current payload. |
143 // Returns 0 on success, -1 on failure. | 143 // Returns 0 on success, -1 on failure. |
144 virtual int InsertPacket(const RTPHeader& rtp_header, | 144 virtual int InsertPacket(const RTPHeader& rtp_header, |
145 rtc::ArrayView<const uint8_t> payload, | 145 rtc::ArrayView<const uint8_t> payload, |
146 uint32_t receive_timestamp) = 0; | 146 uint32_t receive_timestamp) = 0; |
147 | 147 |
| 148 // Lets NetEq know that a packet arrived with an empty payload. This typically |
| 149 // happens when empty packets are used for probing the network channel, and |
| 150 // these packets use RTP sequence numbers from the same series as the actual |
| 151 // audio packets. |
| 152 virtual void InsertEmptyPacket(const RTPHeader& rtp_header) = 0; |
| 153 |
148 // Instructs NetEq to deliver 10 ms of audio data. The data is written to | 154 // Instructs NetEq to deliver 10 ms of audio data. The data is written to |
149 // |audio_frame|. All data in |audio_frame| is wiped; |data_|, |speech_type_|, | 155 // |audio_frame|. All data in |audio_frame| is wiped; |data_|, |speech_type_|, |
150 // |num_channels_|, |sample_rate_hz_|, |samples_per_channel_|, and | 156 // |num_channels_|, |sample_rate_hz_|, |samples_per_channel_|, and |
151 // |vad_activity_| are updated upon success. If an error is returned, some | 157 // |vad_activity_| are updated upon success. If an error is returned, some |
152 // fields may not have been updated, or may contain inconsistent values. | 158 // fields may not have been updated, or may contain inconsistent values. |
153 // If muted state is enabled (through Config::enable_muted_state), |muted| | 159 // If muted state is enabled (through Config::enable_muted_state), |muted| |
154 // may be set to true after a prolonged expand period. When this happens, the | 160 // may be set to true after a prolonged expand period. When this happens, the |
155 // |data_| in |audio_frame| is not written, but should be interpreted as being | 161 // |data_| in |audio_frame| is not written, but should be interpreted as being |
156 // all zeros. | 162 // all zeros. |
157 // Returns kOK on success, or kFail in case of an error. | 163 // Returns kOK on success, or kFail in case of an error. |
(...skipping 158 matching lines...) Loading... |
316 | 322 |
317 protected: | 323 protected: |
318 NetEq() {} | 324 NetEq() {} |
319 | 325 |
320 private: | 326 private: |
321 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); | 327 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); |
322 }; | 328 }; |
323 | 329 |
324 } // namespace webrtc | 330 } // namespace webrtc |
325 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ | 331 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ |
OLD | NEW |