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

Side by Side Diff: webrtc/voice_engine/channel.h

Issue 3012853002: Update thread annotiation macros to use RTC_ prefix (Closed)
Patch Set: Rebase Created 3 years, 3 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
« no previous file with comments | « webrtc/voice_engine/audio_level.h ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 int32_t MixOrReplaceAudioWithFile(AudioFrame* audio_frame); 433 int32_t MixOrReplaceAudioWithFile(AudioFrame* audio_frame);
434 int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency); 434 int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency);
435 void UpdatePlayoutTimestamp(bool rtcp); 435 void UpdatePlayoutTimestamp(bool rtcp);
436 void RegisterReceiveCodecsToRTPModule(); 436 void RegisterReceiveCodecsToRTPModule();
437 437
438 int SetSendRtpHeaderExtension(bool enable, 438 int SetSendRtpHeaderExtension(bool enable,
439 RTPExtensionType type, 439 RTPExtensionType type,
440 unsigned char id); 440 unsigned char id);
441 441
442 void UpdateOverheadForEncoder() 442 void UpdateOverheadForEncoder()
443 EXCLUSIVE_LOCKS_REQUIRED(overhead_per_packet_lock_); 443 RTC_EXCLUSIVE_LOCKS_REQUIRED(overhead_per_packet_lock_);
444 444
445 int GetRtpTimestampRateHz() const; 445 int GetRtpTimestampRateHz() const;
446 int64_t GetRTT(bool allow_associate_channel) const; 446 int64_t GetRTT(bool allow_associate_channel) const;
447 447
448 // Called on the encoder task queue when a new input audio frame is ready 448 // Called on the encoder task queue when a new input audio frame is ready
449 // for encoding. 449 // for encoding.
450 void ProcessAndEncodeAudioOnTaskQueue(AudioFrame* audio_input); 450 void ProcessAndEncodeAudioOnTaskQueue(AudioFrame* audio_input);
451 451
452 uint32_t _instanceId; 452 uint32_t _instanceId;
453 int32_t _channelId; 453 int32_t _channelId;
(...skipping 21 matching lines...) Expand all
475 bool _externalTransport; 475 bool _externalTransport;
476 // Downsamples to the codec rate if necessary. 476 // Downsamples to the codec rate if necessary.
477 PushResampler<int16_t> input_resampler_; 477 PushResampler<int16_t> input_resampler_;
478 std::unique_ptr<FilePlayer> input_file_player_; 478 std::unique_ptr<FilePlayer> input_file_player_;
479 std::unique_ptr<FilePlayer> output_file_player_; 479 std::unique_ptr<FilePlayer> output_file_player_;
480 std::unique_ptr<FileRecorder> output_file_recorder_; 480 std::unique_ptr<FileRecorder> output_file_recorder_;
481 int _inputFilePlayerId; 481 int _inputFilePlayerId;
482 int _outputFilePlayerId; 482 int _outputFilePlayerId;
483 int _outputFileRecorderId; 483 int _outputFileRecorderId;
484 bool _outputFileRecording; 484 bool _outputFileRecording;
485 uint32_t _timeStamp ACCESS_ON(encoder_queue_); 485 uint32_t _timeStamp RTC_ACCESS_ON(encoder_queue_);
486 486
487 RemoteNtpTimeEstimator ntp_estimator_ GUARDED_BY(ts_stats_lock_); 487 RemoteNtpTimeEstimator ntp_estimator_ RTC_GUARDED_BY(ts_stats_lock_);
488 488
489 // Timestamp of the audio pulled from NetEq. 489 // Timestamp of the audio pulled from NetEq.
490 rtc::Optional<uint32_t> jitter_buffer_playout_timestamp_; 490 rtc::Optional<uint32_t> jitter_buffer_playout_timestamp_;
491 491
492 rtc::CriticalSection video_sync_lock_; 492 rtc::CriticalSection video_sync_lock_;
493 uint32_t playout_timestamp_rtp_ GUARDED_BY(video_sync_lock_); 493 uint32_t playout_timestamp_rtp_ RTC_GUARDED_BY(video_sync_lock_);
494 uint32_t playout_delay_ms_ GUARDED_BY(video_sync_lock_); 494 uint32_t playout_delay_ms_ RTC_GUARDED_BY(video_sync_lock_);
495 uint16_t send_sequence_number_; 495 uint16_t send_sequence_number_;
496 496
497 rtc::CriticalSection ts_stats_lock_; 497 rtc::CriticalSection ts_stats_lock_;
498 498
499 std::unique_ptr<rtc::TimestampWrapAroundHandler> rtp_ts_wraparound_handler_; 499 std::unique_ptr<rtc::TimestampWrapAroundHandler> rtp_ts_wraparound_handler_;
500 // The rtp timestamp of the first played out audio frame. 500 // The rtp timestamp of the first played out audio frame.
501 int64_t capture_start_rtp_time_stamp_; 501 int64_t capture_start_rtp_time_stamp_;
502 // The capture ntp time (in local timebase) of the first played out audio 502 // The capture ntp time (in local timebase) of the first played out audio
503 // frame. 503 // frame.
504 int64_t capture_start_ntp_time_ms_ GUARDED_BY(ts_stats_lock_); 504 int64_t capture_start_ntp_time_ms_ RTC_GUARDED_BY(ts_stats_lock_);
505 505
506 // uses 506 // uses
507 Statistics* _engineStatisticsPtr; 507 Statistics* _engineStatisticsPtr;
508 OutputMixer* _outputMixerPtr; 508 OutputMixer* _outputMixerPtr;
509 ProcessThread* _moduleProcessThreadPtr; 509 ProcessThread* _moduleProcessThreadPtr;
510 AudioDeviceModule* _audioDeviceModulePtr; 510 AudioDeviceModule* _audioDeviceModulePtr;
511 VoiceEngineObserver* _voiceEngineObserverPtr; // owned by base 511 VoiceEngineObserver* _voiceEngineObserverPtr; // owned by base
512 rtc::CriticalSection* _callbackCritSectPtr; // owned by base 512 rtc::CriticalSection* _callbackCritSectPtr; // owned by base
513 Transport* _transportPtr; // WebRtc socket or external transport 513 Transport* _transportPtr; // WebRtc socket or external transport
514 RmsLevel rms_level_ ACCESS_ON(encoder_queue_); 514 RmsLevel rms_level_ RTC_ACCESS_ON(encoder_queue_);
515 bool input_mute_ GUARDED_BY(volume_settings_critsect_); 515 bool input_mute_ RTC_GUARDED_BY(volume_settings_critsect_);
516 bool previous_frame_muted_ ACCESS_ON(encoder_queue_); 516 bool previous_frame_muted_ RTC_ACCESS_ON(encoder_queue_);
517 float _outputGain GUARDED_BY(volume_settings_critsect_); 517 float _outputGain RTC_GUARDED_BY(volume_settings_critsect_);
518 // VoEBase 518 // VoEBase
519 bool _mixFileWithMicrophone; 519 bool _mixFileWithMicrophone;
520 // VoeRTP_RTCP 520 // VoeRTP_RTCP
521 // TODO(henrika): can today be accessed on the main thread and on the 521 // TODO(henrika): can today be accessed on the main thread and on the
522 // task queue; hence potential race. 522 // task queue; hence potential race.
523 bool _includeAudioLevelIndication; 523 bool _includeAudioLevelIndication;
524 size_t transport_overhead_per_packet_ GUARDED_BY(overhead_per_packet_lock_); 524 size_t transport_overhead_per_packet_
525 size_t rtp_overhead_per_packet_ GUARDED_BY(overhead_per_packet_lock_); 525 RTC_GUARDED_BY(overhead_per_packet_lock_);
526 size_t rtp_overhead_per_packet_ RTC_GUARDED_BY(overhead_per_packet_lock_);
526 rtc::CriticalSection overhead_per_packet_lock_; 527 rtc::CriticalSection overhead_per_packet_lock_;
527 // VoENetwork 528 // VoENetwork
528 AudioFrame::SpeechType _outputSpeechType; 529 AudioFrame::SpeechType _outputSpeechType;
529 // RtcpBandwidthObserver 530 // RtcpBandwidthObserver
530 std::unique_ptr<VoERtcpObserver> rtcp_observer_; 531 std::unique_ptr<VoERtcpObserver> rtcp_observer_;
531 // An associated send channel. 532 // An associated send channel.
532 rtc::CriticalSection assoc_send_channel_lock_; 533 rtc::CriticalSection assoc_send_channel_lock_;
533 ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_); 534 ChannelOwner associate_send_channel_ RTC_GUARDED_BY(assoc_send_channel_lock_);
534 535
535 bool pacing_enabled_; 536 bool pacing_enabled_;
536 PacketRouter* packet_router_ = nullptr; 537 PacketRouter* packet_router_ = nullptr;
537 std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_; 538 std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_;
538 std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_; 539 std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_;
539 std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_; 540 std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_;
540 std::unique_ptr<RateLimiter> retransmission_rate_limiter_; 541 std::unique_ptr<RateLimiter> retransmission_rate_limiter_;
541 542
542 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed. 543 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed.
543 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; 544 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
544 545
545 rtc::Optional<CodecInst> cached_send_codec_; 546 rtc::Optional<CodecInst> cached_send_codec_;
546 547
547 rtc::ThreadChecker construction_thread_; 548 rtc::ThreadChecker construction_thread_;
548 549
549 const bool use_twcc_plr_for_ana_; 550 const bool use_twcc_plr_for_ana_;
550 551
551 rtc::CriticalSection encoder_queue_lock_; 552 rtc::CriticalSection encoder_queue_lock_;
552 553
553 bool encoder_queue_is_active_ GUARDED_BY(encoder_queue_lock_) = false; 554 bool encoder_queue_is_active_ RTC_GUARDED_BY(encoder_queue_lock_) = false;
554 555
555 rtc::TaskQueue* encoder_queue_ = nullptr; 556 rtc::TaskQueue* encoder_queue_ = nullptr;
556 }; 557 };
557 558
558 } // namespace voe 559 } // namespace voe
559 } // namespace webrtc 560 } // namespace webrtc
560 561
561 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ 562 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/voice_engine/audio_level.h ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698