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

Unified Diff: webrtc/video/video_stream_encoder.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/video_stream_decoder.h ('k') | webrtc/video/video_stream_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_stream_encoder.h
diff --git a/webrtc/video/video_stream_encoder.h b/webrtc/video/video_stream_encoder.h
index 8f6cb07755d1e3eff36bfa4566fd82a551f502d5..a0fa2df74594f38f0603b4153b1b67ff57d64943 100644
--- a/webrtc/video/video_stream_encoder.h
+++ b/webrtc/video/video_stream_encoder.h
@@ -217,10 +217,10 @@ class VideoStreamEncoder : public rtc::VideoSinkInterface<VideoFrame>,
std::vector<int> resolution_counters_;
};
- AdaptCounter& GetAdaptCounter() RUN_ON(&encoder_queue_);
- const AdaptCounter& GetConstAdaptCounter() RUN_ON(&encoder_queue_);
- void UpdateAdaptationStats(AdaptReason reason) RUN_ON(&encoder_queue_);
- AdaptCounts GetActiveCounts(AdaptReason reason) RUN_ON(&encoder_queue_);
+ AdaptCounter& GetAdaptCounter() RTC_RUN_ON(&encoder_queue_);
+ const AdaptCounter& GetConstAdaptCounter() RTC_RUN_ON(&encoder_queue_);
+ void UpdateAdaptationStats(AdaptReason reason) RTC_RUN_ON(&encoder_queue_);
+ AdaptCounts GetActiveCounts(AdaptReason reason) RTC_RUN_ON(&encoder_queue_);
rtc::Event shutdown_event_;
@@ -233,10 +233,10 @@ class VideoStreamEncoder : public rtc::VideoSinkInterface<VideoFrame>,
const VideoSendStream::Config::EncoderSettings settings_;
const VideoCodecType codec_type_;
- vcm::VideoSender video_sender_ ACCESS_ON(&encoder_queue_);
+ vcm::VideoSender video_sender_ RTC_ACCESS_ON(&encoder_queue_);
std::unique_ptr<OveruseFrameDetector> overuse_detector_
- ACCESS_ON(&encoder_queue_);
- std::unique_ptr<QualityScaler> quality_scaler_ ACCESS_ON(&encoder_queue_);
+ RTC_ACCESS_ON(&encoder_queue_);
+ std::unique_ptr<QualityScaler> quality_scaler_ RTC_ACCESS_ON(&encoder_queue_);
SendStatisticsProxy* const stats_proxy_;
rtc::VideoSinkInterface<VideoFrame>* const pre_encode_callback_;
@@ -246,24 +246,24 @@ class VideoStreamEncoder : public rtc::VideoSinkInterface<VideoFrame>,
// of VideoStreamEncoder are called on the same thread.
rtc::ThreadChecker thread_checker_;
- VideoEncoderConfig encoder_config_ ACCESS_ON(&encoder_queue_);
+ VideoEncoderConfig encoder_config_ RTC_ACCESS_ON(&encoder_queue_);
std::unique_ptr<VideoBitrateAllocator> rate_allocator_
- ACCESS_ON(&encoder_queue_);
+ RTC_ACCESS_ON(&encoder_queue_);
// The maximum frame rate of the current codec configuration, as determined
// at the last ReconfigureEncoder() call.
- int max_framerate_ ACCESS_ON(&encoder_queue_);
+ int max_framerate_ RTC_ACCESS_ON(&encoder_queue_);
// Set when ConfigureEncoder has been called in order to lazy reconfigure the
// encoder on the next frame.
- bool pending_encoder_reconfiguration_ ACCESS_ON(&encoder_queue_);
- rtc::Optional<VideoFrameInfo> last_frame_info_ ACCESS_ON(&encoder_queue_);
- int crop_width_ ACCESS_ON(&encoder_queue_);
- int crop_height_ ACCESS_ON(&encoder_queue_);
- uint32_t encoder_start_bitrate_bps_ ACCESS_ON(&encoder_queue_);
- size_t max_data_payload_length_ ACCESS_ON(&encoder_queue_);
- bool nack_enabled_ ACCESS_ON(&encoder_queue_);
- uint32_t last_observed_bitrate_bps_ ACCESS_ON(&encoder_queue_);
- bool encoder_paused_and_dropped_frame_ ACCESS_ON(&encoder_queue_);
+ bool pending_encoder_reconfiguration_ RTC_ACCESS_ON(&encoder_queue_);
+ rtc::Optional<VideoFrameInfo> last_frame_info_ RTC_ACCESS_ON(&encoder_queue_);
+ int crop_width_ RTC_ACCESS_ON(&encoder_queue_);
+ int crop_height_ RTC_ACCESS_ON(&encoder_queue_);
+ uint32_t encoder_start_bitrate_bps_ RTC_ACCESS_ON(&encoder_queue_);
+ size_t max_data_payload_length_ RTC_ACCESS_ON(&encoder_queue_);
+ bool nack_enabled_ RTC_ACCESS_ON(&encoder_queue_);
+ uint32_t last_observed_bitrate_bps_ RTC_ACCESS_ON(&encoder_queue_);
+ bool encoder_paused_and_dropped_frame_ RTC_ACCESS_ON(&encoder_queue_);
Clock* const clock_;
// Counters used for deciding if the video resolution or framerate is
// currently restricted, and if so, why, on a per degradation preference
@@ -271,10 +271,10 @@ class VideoStreamEncoder : public rtc::VideoSinkInterface<VideoFrame>,
// TODO(sprang): Replace this with a state holding a relative overuse measure
// instead, that can be translated into suitable down-scale or fps limit.
std::map<const VideoSendStream::DegradationPreference, AdaptCounter>
- adapt_counters_ ACCESS_ON(&encoder_queue_);
+ adapt_counters_ RTC_ACCESS_ON(&encoder_queue_);
// Set depending on degradation preferences.
VideoSendStream::DegradationPreference degradation_preference_
- ACCESS_ON(&encoder_queue_);
+ RTC_ACCESS_ON(&encoder_queue_);
struct AdaptationRequest {
// The pixel count produced by the source at the time of the adaptation.
@@ -287,22 +287,25 @@ class VideoStreamEncoder : public rtc::VideoSinkInterface<VideoFrame>,
// Stores a snapshot of the last adaptation request triggered by an AdaptUp
// or AdaptDown signal.
rtc::Optional<AdaptationRequest> last_adaptation_request_
- ACCESS_ON(&encoder_queue_);
+ RTC_ACCESS_ON(&encoder_queue_);
rtc::RaceChecker incoming_frame_race_checker_
- GUARDED_BY(incoming_frame_race_checker_);
+ RTC_GUARDED_BY(incoming_frame_race_checker_);
Atomic32 posted_frames_waiting_for_encode_;
// Used to make sure incoming time stamp is increasing for every frame.
- int64_t last_captured_timestamp_ GUARDED_BY(incoming_frame_race_checker_);
+ int64_t last_captured_timestamp_ RTC_GUARDED_BY(incoming_frame_race_checker_);
// Delta used for translating between NTP and internal timestamps.
- const int64_t delta_ntp_internal_ms_ GUARDED_BY(incoming_frame_race_checker_);
+ const int64_t delta_ntp_internal_ms_
+ RTC_GUARDED_BY(incoming_frame_race_checker_);
- int64_t last_frame_log_ms_ GUARDED_BY(incoming_frame_race_checker_);
- int captured_frame_count_ ACCESS_ON(&encoder_queue_);
- int dropped_frame_count_ ACCESS_ON(&encoder_queue_);
+ int64_t last_frame_log_ms_ RTC_GUARDED_BY(incoming_frame_race_checker_);
+ int captured_frame_count_ RTC_ACCESS_ON(&encoder_queue_);
+ int dropped_frame_count_ RTC_ACCESS_ON(&encoder_queue_);
- VideoBitrateAllocationObserver* bitrate_observer_ ACCESS_ON(&encoder_queue_);
- rtc::Optional<int64_t> last_parameters_update_ms_ ACCESS_ON(&encoder_queue_);
+ VideoBitrateAllocationObserver* bitrate_observer_
+ RTC_ACCESS_ON(&encoder_queue_);
+ rtc::Optional<int64_t> last_parameters_update_ms_
+ RTC_ACCESS_ON(&encoder_queue_);
// All public methods are proxied to |encoder_queue_|. It must must be
// destroyed first to make sure no tasks are run that use other members.
« no previous file with comments | « webrtc/video/video_stream_decoder.h ('k') | webrtc/video/video_stream_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698