Index: webrtc/base/stream.h |
diff --git a/webrtc/base/stream.h b/webrtc/base/stream.h |
index 98123b82118ee9f9c75b3b4aa0901ded4c610d84..e624df550446fae6bc8edc5f5ee7c4c66dcc4fc8 100644 |
--- a/webrtc/base/stream.h |
+++ b/webrtc/base/stream.h |
@@ -542,20 +542,29 @@ class FifoBuffer : public StreamInterface { |
// Helper method that implements ReadOffset. Caller must acquire a lock |
// when calling this method. |
StreamResult ReadOffsetLocked(void* buffer, size_t bytes, size_t offset, |
- size_t* bytes_read); |
+ size_t* bytes_read) |
+ EXCLUSIVE_LOCKS_REQUIRED(crit_); |
// Helper method that implements WriteOffset. Caller must acquire a lock |
// when calling this method. |
StreamResult WriteOffsetLocked(const void* buffer, size_t bytes, |
- size_t offset, size_t* bytes_written); |
- |
- StreamState state_; // keeps the opened/closed state of the stream |
- scoped_ptr<char[]> buffer_; // the allocated buffer |
- size_t buffer_length_; // size of the allocated buffer |
- size_t data_length_; // amount of readable data in the buffer |
- size_t read_position_; // offset to the readable data |
- Thread* owner_; // stream callbacks are dispatched on this thread |
- CriticalSection crit_; // object lock |
+ size_t offset, size_t* bytes_written) |
+ EXCLUSIVE_LOCKS_REQUIRED(crit_); |
+ |
+ // keeps the opened/closed state of the stream |
+ StreamState state_ GUARDED_BY(crit_); |
+ // the allocated buffer |
+ scoped_ptr<char[]> buffer_ GUARDED_BY(crit_); |
+ // size of the allocated buffer |
+ size_t buffer_length_ GUARDED_BY(crit_); |
+ // amount of readable data in the buffer |
+ size_t data_length_ GUARDED_BY(crit_); |
+ // offset to the readable data |
+ size_t read_position_ GUARDED_BY(crit_); |
+ // stream callbacks are dispatched on this thread |
+ Thread* owner_; |
+ // object lock |
+ CriticalSection crit_; |
RTC_DISALLOW_COPY_AND_ASSIGN(FifoBuffer); |
}; |