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

Side by Side Diff: webrtc/modules/video_coding/video_coding_impl.h

Issue 3010223002: Update thread annotiation macros in modules to use RTC_ prefix (Closed)
Patch Set: 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
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 int64_t TimeUntilNextProcess() override; 112 int64_t TimeUntilNextProcess() override;
113 void Process() override; 113 void Process() override;
114 114
115 private: 115 private:
116 EncoderParameters UpdateEncoderParameters( 116 EncoderParameters UpdateEncoderParameters(
117 const EncoderParameters& params, 117 const EncoderParameters& params,
118 VideoBitrateAllocator* bitrate_allocator, 118 VideoBitrateAllocator* bitrate_allocator,
119 uint32_t target_bitrate_bps); 119 uint32_t target_bitrate_bps);
120 void SetEncoderParameters(EncoderParameters params, bool has_internal_source) 120 void SetEncoderParameters(EncoderParameters params, bool has_internal_source)
121 EXCLUSIVE_LOCKS_REQUIRED(encoder_crit_); 121 RTC_EXCLUSIVE_LOCKS_REQUIRED(encoder_crit_);
122 122
123 Clock* const clock_; 123 Clock* const clock_;
124 124
125 rtc::CriticalSection encoder_crit_; 125 rtc::CriticalSection encoder_crit_;
126 VCMGenericEncoder* _encoder; 126 VCMGenericEncoder* _encoder;
127 media_optimization::MediaOptimization _mediaOpt; 127 media_optimization::MediaOptimization _mediaOpt;
128 VCMEncodedFrameCallback _encodedFrameCallback GUARDED_BY(encoder_crit_); 128 VCMEncodedFrameCallback _encodedFrameCallback RTC_GUARDED_BY(encoder_crit_);
129 EncodedImageCallback* const post_encode_callback_; 129 EncodedImageCallback* const post_encode_callback_;
130 VCMSendStatisticsCallback* const send_stats_callback_; 130 VCMSendStatisticsCallback* const send_stats_callback_;
131 VCMCodecDataBase _codecDataBase GUARDED_BY(encoder_crit_); 131 VCMCodecDataBase _codecDataBase RTC_GUARDED_BY(encoder_crit_);
132 bool frame_dropper_enabled_ GUARDED_BY(encoder_crit_); 132 bool frame_dropper_enabled_ RTC_GUARDED_BY(encoder_crit_);
133 VCMProcessTimer _sendStatsTimer; 133 VCMProcessTimer _sendStatsTimer;
134 134
135 // Must be accessed on the construction thread of VideoSender. 135 // Must be accessed on the construction thread of VideoSender.
136 VideoCodec current_codec_; 136 VideoCodec current_codec_;
137 rtc::SequencedTaskChecker sequenced_checker_; 137 rtc::SequencedTaskChecker sequenced_checker_;
138 138
139 rtc::CriticalSection params_crit_; 139 rtc::CriticalSection params_crit_;
140 EncoderParameters encoder_params_ GUARDED_BY(params_crit_); 140 EncoderParameters encoder_params_ RTC_GUARDED_BY(params_crit_);
141 bool encoder_has_internal_source_ GUARDED_BY(params_crit_); 141 bool encoder_has_internal_source_ RTC_GUARDED_BY(params_crit_);
142 std::vector<FrameType> next_frame_types_ GUARDED_BY(params_crit_); 142 std::vector<FrameType> next_frame_types_ RTC_GUARDED_BY(params_crit_);
143 }; 143 };
144 144
145 class VideoReceiver : public Module { 145 class VideoReceiver : public Module {
146 public: 146 public:
147 VideoReceiver(Clock* clock, 147 VideoReceiver(Clock* clock,
148 EventFactory* event_factory, 148 EventFactory* event_factory,
149 EncodedImageCallback* pre_decode_image_callback, 149 EncodedImageCallback* pre_decode_image_callback,
150 VCMTiming* timing, 150 VCMTiming* timing,
151 NackSender* nack_sender = nullptr, 151 NackSender* nack_sender = nullptr,
152 KeyFrameRequestSender* keyframe_request_sender = nullptr); 152 KeyFrameRequestSender* keyframe_request_sender = nullptr);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 int32_t SetReceiveChannelParameters(int64_t rtt); 193 int32_t SetReceiveChannelParameters(int64_t rtt);
194 int32_t SetVideoProtection(VCMVideoProtection videoProtection, bool enable); 194 int32_t SetVideoProtection(VCMVideoProtection videoProtection, bool enable);
195 195
196 int64_t TimeUntilNextProcess() override; 196 int64_t TimeUntilNextProcess() override;
197 void Process() override; 197 void Process() override;
198 198
199 void TriggerDecoderShutdown(); 199 void TriggerDecoderShutdown();
200 200
201 protected: 201 protected:
202 int32_t Decode(const webrtc::VCMEncodedFrame& frame) 202 int32_t Decode(const webrtc::VCMEncodedFrame& frame)
203 EXCLUSIVE_LOCKS_REQUIRED(receive_crit_); 203 RTC_EXCLUSIVE_LOCKS_REQUIRED(receive_crit_);
204 int32_t RequestKeyFrame(); 204 int32_t RequestKeyFrame();
205 205
206 private: 206 private:
207 rtc::ThreadChecker construction_thread_; 207 rtc::ThreadChecker construction_thread_;
208 Clock* const clock_; 208 Clock* const clock_;
209 rtc::CriticalSection process_crit_; 209 rtc::CriticalSection process_crit_;
210 rtc::CriticalSection receive_crit_; 210 rtc::CriticalSection receive_crit_;
211 VCMTiming* _timing; 211 VCMTiming* _timing;
212 VCMReceiver _receiver; 212 VCMReceiver _receiver;
213 VCMDecodedFrameCallback _decodedFrameCallback; 213 VCMDecodedFrameCallback _decodedFrameCallback;
214 VCMFrameTypeCallback* _frameTypeCallback GUARDED_BY(process_crit_); 214 VCMFrameTypeCallback* _frameTypeCallback RTC_GUARDED_BY(process_crit_);
215 VCMReceiveStatisticsCallback* _receiveStatsCallback GUARDED_BY(process_crit_); 215 VCMReceiveStatisticsCallback* _receiveStatsCallback
216 VCMPacketRequestCallback* _packetRequestCallback GUARDED_BY(process_crit_); 216 RTC_GUARDED_BY(process_crit_);
217 VCMPacketRequestCallback* _packetRequestCallback
218 RTC_GUARDED_BY(process_crit_);
217 219
218 VCMFrameBuffer _frameFromFile; 220 VCMFrameBuffer _frameFromFile;
219 bool _scheduleKeyRequest GUARDED_BY(process_crit_); 221 bool _scheduleKeyRequest RTC_GUARDED_BY(process_crit_);
220 bool drop_frames_until_keyframe_ GUARDED_BY(process_crit_); 222 bool drop_frames_until_keyframe_ RTC_GUARDED_BY(process_crit_);
221 size_t max_nack_list_size_ GUARDED_BY(process_crit_); 223 size_t max_nack_list_size_ RTC_GUARDED_BY(process_crit_);
222 224
223 VCMCodecDataBase _codecDataBase GUARDED_BY(receive_crit_); 225 VCMCodecDataBase _codecDataBase RTC_GUARDED_BY(receive_crit_);
224 EncodedImageCallback* pre_decode_image_callback_; 226 EncodedImageCallback* pre_decode_image_callback_;
225 227
226 VCMProcessTimer _receiveStatsTimer; 228 VCMProcessTimer _receiveStatsTimer;
227 VCMProcessTimer _retransmissionTimer; 229 VCMProcessTimer _retransmissionTimer;
228 VCMProcessTimer _keyRequestTimer; 230 VCMProcessTimer _keyRequestTimer;
229 QpParser qp_parser_; 231 QpParser qp_parser_;
230 ThreadUnsafeOneTimeEvent first_frame_received_; 232 ThreadUnsafeOneTimeEvent first_frame_received_;
231 }; 233 };
232 234
233 } // namespace vcm 235 } // namespace vcm
234 } // namespace webrtc 236 } // namespace webrtc
235 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ 237 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/utility/quality_scaler.h ('k') | webrtc/modules/video_coding/video_coding_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698