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

Side by Side Diff: webrtc/video/vie_channel.h

Issue 1652983002: Remove mutable from rtc::CriticalSections. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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/video/video_capture_input.h ('k') | webrtc/video/vie_encoder.h » ('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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 325
326 void Set(T* callback) { 326 void Set(T* callback) {
327 rtc::CritScope lock(&critsect_); 327 rtc::CritScope lock(&critsect_);
328 callback_ = callback; 328 callback_ = callback;
329 } 329 }
330 330
331 protected: 331 protected:
332 // Note: this should be implemented with a RW-lock to allow simultaneous 332 // Note: this should be implemented with a RW-lock to allow simultaneous
333 // calls into the callback. However that doesn't seem to be needed for the 333 // calls into the callback. However that doesn't seem to be needed for the
334 // current type of callbacks covered by this class. 334 // current type of callbacks covered by this class.
335 mutable rtc::CriticalSection critsect_; 335 rtc::CriticalSection critsect_;
336 T* callback_ GUARDED_BY(critsect_); 336 T* callback_ GUARDED_BY(critsect_);
337 337
338 private: 338 private:
339 RTC_DISALLOW_COPY_AND_ASSIGN(RegisterableCallback); 339 RTC_DISALLOW_COPY_AND_ASSIGN(RegisterableCallback);
340 }; 340 };
341 341
342 class RegisterableBitrateStatisticsObserver: 342 class RegisterableBitrateStatisticsObserver:
343 public RegisterableCallback<BitrateStatisticsObserver> { 343 public RegisterableCallback<BitrateStatisticsObserver> {
344 virtual void Notify(const BitrateStatistics& total_stats, 344 virtual void Notify(const BitrateStatistics& total_stats,
345 const BitrateStatistics& retransmit_stats, 345 const BitrateStatistics& retransmit_stats,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 std::map<uint32_t, RtcpPacketTypeCounter> counter_map_ 396 std::map<uint32_t, RtcpPacketTypeCounter> counter_map_
397 GUARDED_BY(critsect_); 397 GUARDED_BY(critsect_);
398 } rtcp_packet_type_counter_observer_; 398 } rtcp_packet_type_counter_observer_;
399 399
400 const uint32_t number_of_cores_; 400 const uint32_t number_of_cores_;
401 const bool sender_; 401 const bool sender_;
402 402
403 ProcessThread* const module_process_thread_; 403 ProcessThread* const module_process_thread_;
404 404
405 // Used for all registered callbacks except rendering. 405 // Used for all registered callbacks except rendering.
406 mutable rtc::CriticalSection crit_; 406 rtc::CriticalSection crit_;
407 407
408 // Owned modules/classes. 408 // Owned modules/classes.
409 rtc::scoped_refptr<PayloadRouter> send_payload_router_; 409 rtc::scoped_refptr<PayloadRouter> send_payload_router_;
410 rtc::scoped_ptr<ViEChannelProtectionCallback> vcm_protection_callback_; 410 rtc::scoped_ptr<ViEChannelProtectionCallback> vcm_protection_callback_;
411 411
412 VideoCodingModule* const vcm_; 412 VideoCodingModule* const vcm_;
413 ViEReceiver vie_receiver_; 413 ViEReceiver vie_receiver_;
414 ViESyncModule vie_sync_; 414 ViESyncModule vie_sync_;
415 415
416 // Helper to report call statistics. 416 // Helper to report call statistics.
(...skipping 25 matching lines...) Expand all
442 size_t num_rtts_ GUARDED_BY(crit_); 442 size_t num_rtts_ GUARDED_BY(crit_);
443 443
444 // RtpRtcp modules, declared last as they use other members on construction. 444 // RtpRtcp modules, declared last as they use other members on construction.
445 const std::vector<RtpRtcp*> rtp_rtcp_modules_; 445 const std::vector<RtpRtcp*> rtp_rtcp_modules_;
446 size_t num_active_rtp_rtcp_modules_ GUARDED_BY(crit_); 446 size_t num_active_rtp_rtcp_modules_ GUARDED_BY(crit_);
447 }; 447 };
448 448
449 } // namespace webrtc 449 } // namespace webrtc
450 450
451 #endif // WEBRTC_VIDEO_VIE_CHANNEL_H_ 451 #endif // WEBRTC_VIDEO_VIE_CHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/video/video_capture_input.h ('k') | webrtc/video/vie_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698