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

Side by Side Diff: talk/media/devices/yuvframescapturer.cc

Issue 1613643004: Remove mutable from rtc::CriticalSection members. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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 | « talk/media/devices/filevideocapturer.cc ('k') | webrtc/audio/audio_state.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 * libjingle 2 * libjingle
3 * Copyright 2004--2014 Google Inc. 3 * Copyright 2004--2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 79
80 // Check if Run() is finished. 80 // Check if Run() is finished.
81 bool Finished() const { 81 bool Finished() const {
82 rtc::CritScope cs(&crit_); 82 rtc::CritScope cs(&crit_);
83 return finished_; 83 return finished_;
84 } 84 }
85 85
86 private: 86 private:
87 YuvFramesCapturer* capturer_; 87 YuvFramesCapturer* capturer_;
88 mutable rtc::CriticalSection crit_; 88 rtc::CriticalSection crit_;
89 bool finished_; 89 bool finished_;
90 90
91 RTC_DISALLOW_COPY_AND_ASSIGN(YuvFramesThread); 91 RTC_DISALLOW_COPY_AND_ASSIGN(YuvFramesThread);
92 }; 92 };
93 93
94 ///////////////////////////////////////////////////////////////////// 94 /////////////////////////////////////////////////////////////////////
95 // Implementation of class YuvFramesCapturer. 95 // Implementation of class YuvFramesCapturer.
96 ///////////////////////////////////////////////////////////////////// 96 /////////////////////////////////////////////////////////////////////
97 97
98 const char* YuvFramesCapturer::kYuvFrameDeviceName = "YuvFramesGenerator"; 98 const char* YuvFramesCapturer::kYuvFrameDeviceName = "YuvFramesGenerator";
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 int32_t YuvFramesCapturer::GetBarcodeValue() { 190 int32_t YuvFramesCapturer::GetBarcodeValue() {
191 if (barcode_reference_timestamp_millis_ == -1 || 191 if (barcode_reference_timestamp_millis_ == -1 ||
192 frame_index_ % barcode_interval_ != 0) { 192 frame_index_ % barcode_interval_ != 0) {
193 return -1; 193 return -1;
194 } 194 }
195 int64_t now_millis = static_cast<int64_t>(rtc::Time()) * 1000; 195 int64_t now_millis = static_cast<int64_t>(rtc::Time()) * 1000;
196 return static_cast<int32_t>(now_millis - barcode_reference_timestamp_millis_); 196 return static_cast<int32_t>(now_millis - barcode_reference_timestamp_millis_);
197 } 197 }
198 198
199 } // namespace cricket 199 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/media/devices/filevideocapturer.cc ('k') | webrtc/audio/audio_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698