Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: webrtc/modules/audio_coding/neteq/include/neteq.h

Issue 1769883002: Remove the type parameter to NetEq::GetAudio (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@acm-rec-delete-vad
Patch Set: After review Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // (positive or negative). 47 // (positive or negative).
48 size_t added_zero_samples; // Number of zero samples added in "off" mode. 48 size_t added_zero_samples; // Number of zero samples added in "off" mode.
49 // Statistics for packet waiting times, i.e., the time between a packet 49 // Statistics for packet waiting times, i.e., the time between a packet
50 // arrives until it is decoded. 50 // arrives until it is decoded.
51 int mean_waiting_time_ms; 51 int mean_waiting_time_ms;
52 int median_waiting_time_ms; 52 int median_waiting_time_ms;
53 int min_waiting_time_ms; 53 int min_waiting_time_ms;
54 int max_waiting_time_ms; 54 int max_waiting_time_ms;
55 }; 55 };
56 56
57 enum NetEqOutputType {
58 kOutputNormal,
59 kOutputPLC,
60 kOutputCNG,
61 kOutputPLCtoCNG,
62 kOutputVADPassive
63 };
64
65 enum NetEqPlayoutMode { 57 enum NetEqPlayoutMode {
66 kPlayoutOn, 58 kPlayoutOn,
67 kPlayoutOff, 59 kPlayoutOff,
68 kPlayoutFax, 60 kPlayoutFax,
69 kPlayoutStreaming 61 kPlayoutStreaming
70 }; 62 };
71 63
72 // This is the interface class for NetEq. 64 // This is the interface class for NetEq.
73 class NetEq { 65 class NetEq {
74 public: 66 public:
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // decreasing below a certain threshold, defined by the application. 150 // decreasing below a certain threshold, defined by the application.
159 // 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
160 // 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
161 // can be implied by inserting a sync-packet. 153 // can be implied by inserting a sync-packet.
162 // Returns kOk on success, kFail on failure. 154 // Returns kOk on success, kFail on failure.
163 virtual int InsertSyncPacket(const WebRtcRTPHeader& rtp_header, 155 virtual int InsertSyncPacket(const WebRtcRTPHeader& rtp_header,
164 uint32_t receive_timestamp) = 0; 156 uint32_t receive_timestamp) = 0;
165 157
166 // 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
167 // |audio_frame|. All data in |audio_frame| is wiped; |data_|, |interleaved_|, 159 // |audio_frame|. All data in |audio_frame| is wiped; |data_|, |interleaved_|,
168 // |num_channels_|, and |samples_per_channel_| are updated upon success. If 160 // |num_channels_|, |samples_per_channel_|, |speech_type_|, and
169 // an error is returned, some fields may not have been updated. 161 // |vad_activity_| are updated upon success. If an error is returned, some
170 // The speech type is written to |type|, if |type| is not NULL. 162 // fields may not have been updated.
171 // Returns kOK on success, or kFail in case of an error. 163 // Returns kOK on success, or kFail in case of an error.
172 virtual int GetAudio(AudioFrame* audio_frame, NetEqOutputType* type) = 0; 164 virtual int GetAudio(AudioFrame* audio_frame) = 0;
173 165
174 // 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
175 // 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.
176 // 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
177 // decoders. Hence, the name is arbitrary, and may be empty. 169 // decoders. Hence, the name is arbitrary, and may be empty.
178 virtual int RegisterPayloadType(NetEqDecoder codec, 170 virtual int RegisterPayloadType(NetEqDecoder codec,
179 const std::string& codec_name, 171 const std::string& codec_name,
180 uint8_t rtp_payload_type) = 0; 172 uint8_t rtp_payload_type) = 0;
181 173
182 // Provides an externally created decoder object |decoder| to insert in the 174 // Provides an externally created decoder object |decoder| to insert in the
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 288
297 protected: 289 protected:
298 NetEq() {} 290 NetEq() {}
299 291
300 private: 292 private:
301 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); 293 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq);
302 }; 294 };
303 295
304 } // namespace webrtc 296 } // namespace webrtc
305 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ 297 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/acm2/acm_receiver.cc ('k') | webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698