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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // might insert sync-packet when they observe that buffer level of NetEq is | 149 // might insert sync-packet when they observe that buffer level of NetEq is |
150 // decreasing below a certain threshold, defined by the application. | 150 // decreasing below a certain threshold, defined by the application. |
151 // Sync-packets should have the same payload type as the last audio payload | 151 // Sync-packets should have the same payload type as the last audio payload |
152 // type, i.e. they cannot have DTMF or CNG payload type, nor a codec change | 152 // type, i.e. they cannot have DTMF or CNG payload type, nor a codec change |
153 // can be implied by inserting a sync-packet. | 153 // can be implied by inserting a sync-packet. |
154 // Returns kOk on success, kFail on failure. | 154 // Returns kOk on success, kFail on failure. |
155 virtual int InsertSyncPacket(const WebRtcRTPHeader& rtp_header, | 155 virtual int InsertSyncPacket(const WebRtcRTPHeader& rtp_header, |
156 uint32_t receive_timestamp) = 0; | 156 uint32_t receive_timestamp) = 0; |
157 | 157 |
158 // Instructs NetEq to deliver 10 ms of audio data. The data is written to | 158 // Instructs NetEq to deliver 10 ms of audio data. The data is written to |
159 // |audio_frame|. All data in |audio_frame| is wiped; |data_|, |interleaved_|, | 159 // |audio_frame|. All data in |audio_frame| is wiped; |data_|, |speech_type_|, |
160 // |num_channels_|, |samples_per_channel_|, |speech_type_|, and | 160 // |num_channels_|, |sample_rate_hz_|, |samples_per_channel_|, and |
161 // |vad_activity_| are updated upon success. If an error is returned, some | 161 // |vad_activity_| are updated upon success. If an error is returned, some |
162 // fields may not have been updated. | 162 // fields may not have been updated. |
163 // Returns kOK on success, or kFail in case of an error. | 163 // Returns kOK on success, or kFail in case of an error. |
164 virtual int GetAudio(AudioFrame* audio_frame) = 0; | 164 virtual int GetAudio(AudioFrame* audio_frame) = 0; |
165 | 165 |
166 // Associates |rtp_payload_type| with |codec| and |codec_name|, and stores the | 166 // Associates |rtp_payload_type| with |codec| and |codec_name|, and stores the |
167 // information in the codec database. Returns 0 on success, -1 on failure. | 167 // information in the codec database. Returns 0 on success, -1 on failure. |
168 // The name is only used to provide information back to the caller about the | 168 // The name is only used to provide information back to the caller about the |
169 // decoders. Hence, the name is arbitrary, and may be empty. | 169 // decoders. Hence, the name is arbitrary, and may be empty. |
170 virtual int RegisterPayloadType(NetEqDecoder codec, | 170 virtual int RegisterPayloadType(NetEqDecoder codec, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 288 |
289 protected: | 289 protected: |
290 NetEq() {} | 290 NetEq() {} |
291 | 291 |
292 private: | 292 private: |
293 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); | 293 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); |
294 }; | 294 }; |
295 | 295 |
296 } // namespace webrtc | 296 } // namespace webrtc |
297 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ | 297 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ |
OLD | NEW |