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

Unified Diff: webrtc/base/swap_queue.h

Issue 2665693002: Moves channel-dependent audio input processing to separate encoder task queue (Closed)
Patch Set: cleanup Created 3 years, 9 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
Index: webrtc/base/swap_queue.h
diff --git a/webrtc/base/swap_queue.h b/webrtc/base/swap_queue.h
index 1851309bd7356d808dc45fadad23622bbcb4ea8b..a810975896615b714dd3d8678ca6e442eee9131e 100644
--- a/webrtc/base/swap_queue.h
+++ b/webrtc/base/swap_queue.h
@@ -104,6 +104,13 @@ class SwapQueue {
RTC_DCHECK(VerifyQueueSlots());
}
+ size_t Capacity() const { return queue_.size(); }
+
+ size_t Size() const {
+ rtc::CritScope cs(&crit_queue_);
+ return num_elements_;
tommi 2017/03/28 13:01:40 returning a value that requires a lock? (the retu
+ }
+
// Resets the queue to have zero content wile maintaining the queue size.
void Clear() {
rtc::CritScope cs(&crit_queue_);
« no previous file with comments | « no previous file | webrtc/base/swap_queue_unittest.cc » ('j') | webrtc/modules/audio_device/audio_device_buffer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698