OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 // | 198 // |
199 int FilteredCurrentDelayMs() const; | 199 int FilteredCurrentDelayMs() const; |
200 | 200 |
201 // | 201 // |
202 // Get the audio codec associated with the last non-CNG/non-DTMF received | 202 // Get the audio codec associated with the last non-CNG/non-DTMF received |
203 // payload. If no non-CNG/non-DTMF packet is received -1 is returned, | 203 // payload. If no non-CNG/non-DTMF packet is received -1 is returned, |
204 // otherwise return 0. | 204 // otherwise return 0. |
205 // | 205 // |
206 int LastAudioCodec(CodecInst* codec) const; | 206 int LastAudioCodec(CodecInst* codec) const; |
207 | 207 |
| 208 rtc::Optional<SdpAudioFormat> LastAudioFormat() const; |
| 209 |
208 // | 210 // |
209 // Get a decoder given its registered payload-type. | 211 // Get a decoder given its registered payload-type. |
210 // | 212 // |
211 // Input: | 213 // Input: |
212 // -payload_type : the payload-type of the codec to be retrieved. | 214 // -payload_type : the payload-type of the codec to be retrieved. |
213 // | 215 // |
214 // Output: | 216 // Output: |
215 // -codec : codec associated with the given payload-type. | 217 // -codec : codec associated with the given payload-type. |
216 // | 218 // |
217 // Return value : 0 if succeeded. | 219 // Return value : 0 if succeeded. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 }; | 264 }; |
263 | 265 |
264 const rtc::Optional<CodecInst> RtpHeaderToDecoder( | 266 const rtc::Optional<CodecInst> RtpHeaderToDecoder( |
265 const RTPHeader& rtp_header, | 267 const RTPHeader& rtp_header, |
266 uint8_t first_payload_byte) const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 268 uint8_t first_payload_byte) const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
267 | 269 |
268 uint32_t NowInTimestamp(int decoder_sampling_rate) const; | 270 uint32_t NowInTimestamp(int decoder_sampling_rate) const; |
269 | 271 |
270 rtc::CriticalSection crit_sect_; | 272 rtc::CriticalSection crit_sect_; |
271 rtc::Optional<CodecInst> last_audio_decoder_ GUARDED_BY(crit_sect_); | 273 rtc::Optional<CodecInst> last_audio_decoder_ GUARDED_BY(crit_sect_); |
| 274 rtc::Optional<SdpAudioFormat> last_audio_format_ GUARDED_BY(crit_sect_); |
272 ACMResampler resampler_ GUARDED_BY(crit_sect_); | 275 ACMResampler resampler_ GUARDED_BY(crit_sect_); |
273 std::unique_ptr<int16_t[]> last_audio_buffer_ GUARDED_BY(crit_sect_); | 276 std::unique_ptr<int16_t[]> last_audio_buffer_ GUARDED_BY(crit_sect_); |
274 CallStatistics call_stats_ GUARDED_BY(crit_sect_); | 277 CallStatistics call_stats_ GUARDED_BY(crit_sect_); |
275 NetEq* neteq_; | 278 NetEq* neteq_; |
276 Clock* clock_; // TODO(henrik.lundin) Make const if possible. | 279 Clock* clock_; // TODO(henrik.lundin) Make const if possible. |
277 bool resampled_last_output_frame_ GUARDED_BY(crit_sect_); | 280 bool resampled_last_output_frame_ GUARDED_BY(crit_sect_); |
278 rtc::Optional<int> last_packet_sample_rate_hz_ GUARDED_BY(crit_sect_); | 281 rtc::Optional<int> last_packet_sample_rate_hz_ GUARDED_BY(crit_sect_); |
279 }; | 282 }; |
280 | 283 |
281 } // namespace acm2 | 284 } // namespace acm2 |
282 | 285 |
283 } // namespace webrtc | 286 } // namespace webrtc |
284 | 287 |
285 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVER_H_ | 288 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVER_H_ |
OLD | NEW |