| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 // Current value is kMaxFrameSize + 60 ms * 48 kHz, which is enough for | 237 // Current value is kMaxFrameSize + 60 ms * 48 kHz, which is enough for |
| 238 // calculating correlations of current frame against history. | 238 // calculating correlations of current frame against history. |
| 239 static const size_t kSyncBufferSize = kMaxFrameSize + 60 * 48; | 239 static const size_t kSyncBufferSize = kMaxFrameSize + 60 * 48; |
| 240 | 240 |
| 241 // Inserts a new packet into NetEq. This is used by the InsertPacket method | 241 // Inserts a new packet into NetEq. This is used by the InsertPacket method |
| 242 // above. Returns 0 on success, otherwise an error code. | 242 // above. Returns 0 on success, otherwise an error code. |
| 243 // TODO(hlundin): Merge this with InsertPacket above? | 243 // TODO(hlundin): Merge this with InsertPacket above? |
| 244 int InsertPacketInternal(const RTPHeader& rtp_header, | 244 int InsertPacketInternal(const RTPHeader& rtp_header, |
| 245 rtc::ArrayView<const uint8_t> payload, | 245 rtc::ArrayView<const uint8_t> payload, |
| 246 uint32_t receive_timestamp) | 246 uint32_t receive_timestamp) |
| 247 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 247 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 248 | 248 |
| 249 // Delivers 10 ms of audio data. The data is written to |audio_frame|. | 249 // Delivers 10 ms of audio data. The data is written to |audio_frame|. |
| 250 // Returns 0 on success, otherwise an error code. | 250 // Returns 0 on success, otherwise an error code. |
| 251 int GetAudioInternal(AudioFrame* audio_frame, bool* muted) | 251 int GetAudioInternal(AudioFrame* audio_frame, bool* muted) |
| 252 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 252 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 253 | 253 |
| 254 // Provides a decision to the GetAudioInternal method. The decision what to | 254 // Provides a decision to the GetAudioInternal method. The decision what to |
| 255 // do is written to |operation|. Packets to decode are written to | 255 // do is written to |operation|. Packets to decode are written to |
| 256 // |packet_list|, and a DTMF event to play is written to |dtmf_event|. When | 256 // |packet_list|, and a DTMF event to play is written to |dtmf_event|. When |
| 257 // DTMF should be played, |play_dtmf| is set to true by the method. | 257 // DTMF should be played, |play_dtmf| is set to true by the method. |
| 258 // Returns 0 on success, otherwise an error code. | 258 // Returns 0 on success, otherwise an error code. |
| 259 int GetDecision(Operations* operation, | 259 int GetDecision(Operations* operation, |
| 260 PacketList* packet_list, | 260 PacketList* packet_list, |
| 261 DtmfEvent* dtmf_event, | 261 DtmfEvent* dtmf_event, |
| 262 bool* play_dtmf) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 262 bool* play_dtmf) RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 263 | 263 |
| 264 // Decodes the speech packets in |packet_list|, and writes the results to | 264 // Decodes the speech packets in |packet_list|, and writes the results to |
| 265 // |decoded_buffer|, which is allocated to hold |decoded_buffer_length| | 265 // |decoded_buffer|, which is allocated to hold |decoded_buffer_length| |
| 266 // elements. The length of the decoded data is written to |decoded_length|. | 266 // elements. The length of the decoded data is written to |decoded_length|. |
| 267 // The speech type -- speech or (codec-internal) comfort noise -- is written | 267 // The speech type -- speech or (codec-internal) comfort noise -- is written |
| 268 // to |speech_type|. If |packet_list| contains any SID frames for RFC 3389 | 268 // to |speech_type|. If |packet_list| contains any SID frames for RFC 3389 |
| 269 // comfort noise, those are not decoded. | 269 // comfort noise, those are not decoded. |
| 270 int Decode(PacketList* packet_list, | 270 int Decode(PacketList* packet_list, |
| 271 Operations* operation, | 271 Operations* operation, |
| 272 int* decoded_length, | 272 int* decoded_length, |
| 273 AudioDecoder::SpeechType* speech_type) | 273 AudioDecoder::SpeechType* speech_type) |
| 274 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 274 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 275 | 275 |
| 276 // Sub-method to Decode(). Performs codec internal CNG. | 276 // Sub-method to Decode(). Performs codec internal CNG. |
| 277 int DecodeCng(AudioDecoder* decoder, int* decoded_length, | 277 int DecodeCng(AudioDecoder* decoder, |
| 278 int* decoded_length, |
| 278 AudioDecoder::SpeechType* speech_type) | 279 AudioDecoder::SpeechType* speech_type) |
| 279 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 280 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 280 | 281 |
| 281 // Sub-method to Decode(). Performs the actual decoding. | 282 // Sub-method to Decode(). Performs the actual decoding. |
| 282 int DecodeLoop(PacketList* packet_list, | 283 int DecodeLoop(PacketList* packet_list, |
| 283 const Operations& operation, | 284 const Operations& operation, |
| 284 AudioDecoder* decoder, | 285 AudioDecoder* decoder, |
| 285 int* decoded_length, | 286 int* decoded_length, |
| 286 AudioDecoder::SpeechType* speech_type) | 287 AudioDecoder::SpeechType* speech_type) |
| 287 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 288 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 288 | 289 |
| 289 // Sub-method which calls the Normal class to perform the normal operation. | 290 // Sub-method which calls the Normal class to perform the normal operation. |
| 290 void DoNormal(const int16_t* decoded_buffer, | 291 void DoNormal(const int16_t* decoded_buffer, |
| 291 size_t decoded_length, | 292 size_t decoded_length, |
| 292 AudioDecoder::SpeechType speech_type, | 293 AudioDecoder::SpeechType speech_type, |
| 293 bool play_dtmf) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 294 bool play_dtmf) RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 294 | 295 |
| 295 // Sub-method which calls the Merge class to perform the merge operation. | 296 // Sub-method which calls the Merge class to perform the merge operation. |
| 296 void DoMerge(int16_t* decoded_buffer, | 297 void DoMerge(int16_t* decoded_buffer, |
| 297 size_t decoded_length, | 298 size_t decoded_length, |
| 298 AudioDecoder::SpeechType speech_type, | 299 AudioDecoder::SpeechType speech_type, |
| 299 bool play_dtmf) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 300 bool play_dtmf) RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 300 | 301 |
| 301 // Sub-method which calls the Expand class to perform the expand operation. | 302 // Sub-method which calls the Expand class to perform the expand operation. |
| 302 int DoExpand(bool play_dtmf) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 303 int DoExpand(bool play_dtmf) RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 303 | 304 |
| 304 // Sub-method which calls the Accelerate class to perform the accelerate | 305 // Sub-method which calls the Accelerate class to perform the accelerate |
| 305 // operation. | 306 // operation. |
| 306 int DoAccelerate(int16_t* decoded_buffer, | 307 int DoAccelerate(int16_t* decoded_buffer, |
| 307 size_t decoded_length, | 308 size_t decoded_length, |
| 308 AudioDecoder::SpeechType speech_type, | 309 AudioDecoder::SpeechType speech_type, |
| 309 bool play_dtmf, | 310 bool play_dtmf, |
| 310 bool fast_accelerate) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 311 bool fast_accelerate) |
| 312 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 311 | 313 |
| 312 // Sub-method which calls the PreemptiveExpand class to perform the | 314 // Sub-method which calls the PreemptiveExpand class to perform the |
| 313 // preemtive expand operation. | 315 // preemtive expand operation. |
| 314 int DoPreemptiveExpand(int16_t* decoded_buffer, | 316 int DoPreemptiveExpand(int16_t* decoded_buffer, |
| 315 size_t decoded_length, | 317 size_t decoded_length, |
| 316 AudioDecoder::SpeechType speech_type, | 318 AudioDecoder::SpeechType speech_type, |
| 317 bool play_dtmf) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 319 bool play_dtmf) |
| 320 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 318 | 321 |
| 319 // Sub-method which calls the ComfortNoise class to generate RFC 3389 comfort | 322 // Sub-method which calls the ComfortNoise class to generate RFC 3389 comfort |
| 320 // noise. |packet_list| can either contain one SID frame to update the | 323 // noise. |packet_list| can either contain one SID frame to update the |
| 321 // noise parameters, or no payload at all, in which case the previously | 324 // noise parameters, or no payload at all, in which case the previously |
| 322 // received parameters are used. | 325 // received parameters are used. |
| 323 int DoRfc3389Cng(PacketList* packet_list, bool play_dtmf) | 326 int DoRfc3389Cng(PacketList* packet_list, bool play_dtmf) |
| 324 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 327 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 325 | 328 |
| 326 // Calls the audio decoder to generate codec-internal comfort noise when | 329 // Calls the audio decoder to generate codec-internal comfort noise when |
| 327 // no packet was received. | 330 // no packet was received. |
| 328 void DoCodecInternalCng(const int16_t* decoded_buffer, size_t decoded_length) | 331 void DoCodecInternalCng(const int16_t* decoded_buffer, size_t decoded_length) |
| 329 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 332 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 330 | 333 |
| 331 // Calls the DtmfToneGenerator class to generate DTMF tones. | 334 // Calls the DtmfToneGenerator class to generate DTMF tones. |
| 332 int DoDtmf(const DtmfEvent& dtmf_event, bool* play_dtmf) | 335 int DoDtmf(const DtmfEvent& dtmf_event, bool* play_dtmf) |
| 333 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 336 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 334 | 337 |
| 335 // Produces packet-loss concealment using alternative methods. If the codec | 338 // Produces packet-loss concealment using alternative methods. If the codec |
| 336 // has an internal PLC, it is called to generate samples. Otherwise, the | 339 // has an internal PLC, it is called to generate samples. Otherwise, the |
| 337 // method performs zero-stuffing. | 340 // method performs zero-stuffing. |
| 338 void DoAlternativePlc(bool increase_timestamp) | 341 void DoAlternativePlc(bool increase_timestamp) |
| 339 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 342 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 340 | 343 |
| 341 // Overdub DTMF on top of |output|. | 344 // Overdub DTMF on top of |output|. |
| 342 int DtmfOverdub(const DtmfEvent& dtmf_event, | 345 int DtmfOverdub(const DtmfEvent& dtmf_event, |
| 343 size_t num_channels, | 346 size_t num_channels, |
| 344 int16_t* output) const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 347 int16_t* output) const |
| 348 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 345 | 349 |
| 346 // Extracts packets from |packet_buffer_| to produce at least | 350 // Extracts packets from |packet_buffer_| to produce at least |
| 347 // |required_samples| samples. The packets are inserted into |packet_list|. | 351 // |required_samples| samples. The packets are inserted into |packet_list|. |
| 348 // Returns the number of samples that the packets in the list will produce, or | 352 // Returns the number of samples that the packets in the list will produce, or |
| 349 // -1 in case of an error. | 353 // -1 in case of an error. |
| 350 int ExtractPackets(size_t required_samples, PacketList* packet_list) | 354 int ExtractPackets(size_t required_samples, PacketList* packet_list) |
| 351 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 355 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 352 | 356 |
| 353 // Resets various variables and objects to new values based on the sample rate | 357 // Resets various variables and objects to new values based on the sample rate |
| 354 // |fs_hz| and |channels| number audio channels. | 358 // |fs_hz| and |channels| number audio channels. |
| 355 void SetSampleRateAndChannels(int fs_hz, size_t channels) | 359 void SetSampleRateAndChannels(int fs_hz, size_t channels) |
| 356 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 360 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 357 | 361 |
| 358 // Returns the output type for the audio produced by the latest call to | 362 // Returns the output type for the audio produced by the latest call to |
| 359 // GetAudio(). | 363 // GetAudio(). |
| 360 OutputType LastOutputType() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 364 OutputType LastOutputType() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 361 | 365 |
| 362 // Updates Expand and Merge. | 366 // Updates Expand and Merge. |
| 363 virtual void UpdatePlcComponents(int fs_hz, size_t channels) | 367 virtual void UpdatePlcComponents(int fs_hz, size_t channels) |
| 364 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 368 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 365 | 369 |
| 366 // Creates DecisionLogic object with the mode given by |playout_mode_|. | 370 // Creates DecisionLogic object with the mode given by |playout_mode_|. |
| 367 virtual void CreateDecisionLogic() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 371 virtual void CreateDecisionLogic() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 368 | 372 |
| 369 rtc::CriticalSection crit_sect_; | 373 rtc::CriticalSection crit_sect_; |
| 370 const std::unique_ptr<TickTimer> tick_timer_ GUARDED_BY(crit_sect_); | 374 const std::unique_ptr<TickTimer> tick_timer_ RTC_GUARDED_BY(crit_sect_); |
| 371 const std::unique_ptr<BufferLevelFilter> buffer_level_filter_ | 375 const std::unique_ptr<BufferLevelFilter> buffer_level_filter_ |
| 372 GUARDED_BY(crit_sect_); | 376 RTC_GUARDED_BY(crit_sect_); |
| 373 const std::unique_ptr<DecoderDatabase> decoder_database_ | 377 const std::unique_ptr<DecoderDatabase> decoder_database_ |
| 374 GUARDED_BY(crit_sect_); | 378 RTC_GUARDED_BY(crit_sect_); |
| 375 const std::unique_ptr<DelayManager> delay_manager_ GUARDED_BY(crit_sect_); | 379 const std::unique_ptr<DelayManager> delay_manager_ RTC_GUARDED_BY(crit_sect_); |
| 376 const std::unique_ptr<DelayPeakDetector> delay_peak_detector_ | 380 const std::unique_ptr<DelayPeakDetector> delay_peak_detector_ |
| 377 GUARDED_BY(crit_sect_); | 381 RTC_GUARDED_BY(crit_sect_); |
| 378 const std::unique_ptr<DtmfBuffer> dtmf_buffer_ GUARDED_BY(crit_sect_); | 382 const std::unique_ptr<DtmfBuffer> dtmf_buffer_ RTC_GUARDED_BY(crit_sect_); |
| 379 const std::unique_ptr<DtmfToneGenerator> dtmf_tone_generator_ | 383 const std::unique_ptr<DtmfToneGenerator> dtmf_tone_generator_ |
| 380 GUARDED_BY(crit_sect_); | 384 RTC_GUARDED_BY(crit_sect_); |
| 381 const std::unique_ptr<PacketBuffer> packet_buffer_ GUARDED_BY(crit_sect_); | 385 const std::unique_ptr<PacketBuffer> packet_buffer_ RTC_GUARDED_BY(crit_sect_); |
| 382 const std::unique_ptr<RedPayloadSplitter> red_payload_splitter_ | 386 const std::unique_ptr<RedPayloadSplitter> red_payload_splitter_ |
| 383 GUARDED_BY(crit_sect_); | 387 RTC_GUARDED_BY(crit_sect_); |
| 384 const std::unique_ptr<TimestampScaler> timestamp_scaler_ | 388 const std::unique_ptr<TimestampScaler> timestamp_scaler_ |
| 385 GUARDED_BY(crit_sect_); | 389 RTC_GUARDED_BY(crit_sect_); |
| 386 const std::unique_ptr<PostDecodeVad> vad_ GUARDED_BY(crit_sect_); | 390 const std::unique_ptr<PostDecodeVad> vad_ RTC_GUARDED_BY(crit_sect_); |
| 387 const std::unique_ptr<ExpandFactory> expand_factory_ GUARDED_BY(crit_sect_); | 391 const std::unique_ptr<ExpandFactory> expand_factory_ |
| 392 RTC_GUARDED_BY(crit_sect_); |
| 388 const std::unique_ptr<AccelerateFactory> accelerate_factory_ | 393 const std::unique_ptr<AccelerateFactory> accelerate_factory_ |
| 389 GUARDED_BY(crit_sect_); | 394 RTC_GUARDED_BY(crit_sect_); |
| 390 const std::unique_ptr<PreemptiveExpandFactory> preemptive_expand_factory_ | 395 const std::unique_ptr<PreemptiveExpandFactory> preemptive_expand_factory_ |
| 391 GUARDED_BY(crit_sect_); | 396 RTC_GUARDED_BY(crit_sect_); |
| 392 | 397 |
| 393 std::unique_ptr<BackgroundNoise> background_noise_ GUARDED_BY(crit_sect_); | 398 std::unique_ptr<BackgroundNoise> background_noise_ RTC_GUARDED_BY(crit_sect_); |
| 394 std::unique_ptr<DecisionLogic> decision_logic_ GUARDED_BY(crit_sect_); | 399 std::unique_ptr<DecisionLogic> decision_logic_ RTC_GUARDED_BY(crit_sect_); |
| 395 std::unique_ptr<AudioMultiVector> algorithm_buffer_ GUARDED_BY(crit_sect_); | 400 std::unique_ptr<AudioMultiVector> algorithm_buffer_ |
| 396 std::unique_ptr<SyncBuffer> sync_buffer_ GUARDED_BY(crit_sect_); | 401 RTC_GUARDED_BY(crit_sect_); |
| 397 std::unique_ptr<Expand> expand_ GUARDED_BY(crit_sect_); | 402 std::unique_ptr<SyncBuffer> sync_buffer_ RTC_GUARDED_BY(crit_sect_); |
| 398 std::unique_ptr<Normal> normal_ GUARDED_BY(crit_sect_); | 403 std::unique_ptr<Expand> expand_ RTC_GUARDED_BY(crit_sect_); |
| 399 std::unique_ptr<Merge> merge_ GUARDED_BY(crit_sect_); | 404 std::unique_ptr<Normal> normal_ RTC_GUARDED_BY(crit_sect_); |
| 400 std::unique_ptr<Accelerate> accelerate_ GUARDED_BY(crit_sect_); | 405 std::unique_ptr<Merge> merge_ RTC_GUARDED_BY(crit_sect_); |
| 401 std::unique_ptr<PreemptiveExpand> preemptive_expand_ GUARDED_BY(crit_sect_); | 406 std::unique_ptr<Accelerate> accelerate_ RTC_GUARDED_BY(crit_sect_); |
| 402 RandomVector random_vector_ GUARDED_BY(crit_sect_); | 407 std::unique_ptr<PreemptiveExpand> preemptive_expand_ |
| 403 std::unique_ptr<ComfortNoise> comfort_noise_ GUARDED_BY(crit_sect_); | 408 RTC_GUARDED_BY(crit_sect_); |
| 404 Rtcp rtcp_ GUARDED_BY(crit_sect_); | 409 RandomVector random_vector_ RTC_GUARDED_BY(crit_sect_); |
| 405 StatisticsCalculator stats_ GUARDED_BY(crit_sect_); | 410 std::unique_ptr<ComfortNoise> comfort_noise_ RTC_GUARDED_BY(crit_sect_); |
| 406 int fs_hz_ GUARDED_BY(crit_sect_); | 411 Rtcp rtcp_ RTC_GUARDED_BY(crit_sect_); |
| 407 int fs_mult_ GUARDED_BY(crit_sect_); | 412 StatisticsCalculator stats_ RTC_GUARDED_BY(crit_sect_); |
| 408 int last_output_sample_rate_hz_ GUARDED_BY(crit_sect_); | 413 int fs_hz_ RTC_GUARDED_BY(crit_sect_); |
| 409 size_t output_size_samples_ GUARDED_BY(crit_sect_); | 414 int fs_mult_ RTC_GUARDED_BY(crit_sect_); |
| 410 size_t decoder_frame_length_ GUARDED_BY(crit_sect_); | 415 int last_output_sample_rate_hz_ RTC_GUARDED_BY(crit_sect_); |
| 411 Modes last_mode_ GUARDED_BY(crit_sect_); | 416 size_t output_size_samples_ RTC_GUARDED_BY(crit_sect_); |
| 412 Operations last_operation_ GUARDED_BY(crit_sect_); | 417 size_t decoder_frame_length_ RTC_GUARDED_BY(crit_sect_); |
| 413 std::unique_ptr<int16_t[]> mute_factor_array_ GUARDED_BY(crit_sect_); | 418 Modes last_mode_ RTC_GUARDED_BY(crit_sect_); |
| 414 size_t decoded_buffer_length_ GUARDED_BY(crit_sect_); | 419 Operations last_operation_ RTC_GUARDED_BY(crit_sect_); |
| 415 std::unique_ptr<int16_t[]> decoded_buffer_ GUARDED_BY(crit_sect_); | 420 std::unique_ptr<int16_t[]> mute_factor_array_ RTC_GUARDED_BY(crit_sect_); |
| 416 uint32_t playout_timestamp_ GUARDED_BY(crit_sect_); | 421 size_t decoded_buffer_length_ RTC_GUARDED_BY(crit_sect_); |
| 417 bool new_codec_ GUARDED_BY(crit_sect_); | 422 std::unique_ptr<int16_t[]> decoded_buffer_ RTC_GUARDED_BY(crit_sect_); |
| 418 uint32_t timestamp_ GUARDED_BY(crit_sect_); | 423 uint32_t playout_timestamp_ RTC_GUARDED_BY(crit_sect_); |
| 419 bool reset_decoder_ GUARDED_BY(crit_sect_); | 424 bool new_codec_ RTC_GUARDED_BY(crit_sect_); |
| 420 rtc::Optional<uint8_t> current_rtp_payload_type_ GUARDED_BY(crit_sect_); | 425 uint32_t timestamp_ RTC_GUARDED_BY(crit_sect_); |
| 421 rtc::Optional<uint8_t> current_cng_rtp_payload_type_ GUARDED_BY(crit_sect_); | 426 bool reset_decoder_ RTC_GUARDED_BY(crit_sect_); |
| 422 uint32_t ssrc_ GUARDED_BY(crit_sect_); | 427 rtc::Optional<uint8_t> current_rtp_payload_type_ RTC_GUARDED_BY(crit_sect_); |
| 423 bool first_packet_ GUARDED_BY(crit_sect_); | 428 rtc::Optional<uint8_t> current_cng_rtp_payload_type_ |
| 424 const BackgroundNoiseMode background_noise_mode_ GUARDED_BY(crit_sect_); | 429 RTC_GUARDED_BY(crit_sect_); |
| 425 NetEqPlayoutMode playout_mode_ GUARDED_BY(crit_sect_); | 430 uint32_t ssrc_ RTC_GUARDED_BY(crit_sect_); |
| 426 bool enable_fast_accelerate_ GUARDED_BY(crit_sect_); | 431 bool first_packet_ RTC_GUARDED_BY(crit_sect_); |
| 427 std::unique_ptr<NackTracker> nack_ GUARDED_BY(crit_sect_); | 432 const BackgroundNoiseMode background_noise_mode_ RTC_GUARDED_BY(crit_sect_); |
| 428 bool nack_enabled_ GUARDED_BY(crit_sect_); | 433 NetEqPlayoutMode playout_mode_ RTC_GUARDED_BY(crit_sect_); |
| 429 const bool enable_muted_state_ GUARDED_BY(crit_sect_); | 434 bool enable_fast_accelerate_ RTC_GUARDED_BY(crit_sect_); |
| 430 AudioFrame::VADActivity last_vad_activity_ GUARDED_BY(crit_sect_) = | 435 std::unique_ptr<NackTracker> nack_ RTC_GUARDED_BY(crit_sect_); |
| 436 bool nack_enabled_ RTC_GUARDED_BY(crit_sect_); |
| 437 const bool enable_muted_state_ RTC_GUARDED_BY(crit_sect_); |
| 438 AudioFrame::VADActivity last_vad_activity_ RTC_GUARDED_BY(crit_sect_) = |
| 431 AudioFrame::kVadPassive; | 439 AudioFrame::kVadPassive; |
| 432 std::unique_ptr<TickTimer::Stopwatch> generated_noise_stopwatch_ | 440 std::unique_ptr<TickTimer::Stopwatch> generated_noise_stopwatch_ |
| 433 GUARDED_BY(crit_sect_); | 441 RTC_GUARDED_BY(crit_sect_); |
| 434 std::vector<uint32_t> last_decoded_timestamps_ GUARDED_BY(crit_sect_); | 442 std::vector<uint32_t> last_decoded_timestamps_ RTC_GUARDED_BY(crit_sect_); |
| 435 | 443 |
| 436 private: | 444 private: |
| 437 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); | 445 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); |
| 438 }; | 446 }; |
| 439 | 447 |
| 440 } // namespace webrtc | 448 } // namespace webrtc |
| 441 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ | 449 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ |
| OLD | NEW |