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

Unified Diff: media/base/data_buffer.h

Issue 17315021: Refactored DataBuffer to use unix_hacker style methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed accidental renaming of test cases. Created 7 years, 6 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: media/base/data_buffer.h
diff --git a/media/base/data_buffer.h b/media/base/data_buffer.h
index dc1d969a99d746e671b63b92fd719a8503c8642d..ae5eee8629015416724535e4d4d4ac94fa92cfb7 100644
--- a/media/base/data_buffer.h
+++ b/media/base/data_buffer.h
@@ -18,7 +18,7 @@ namespace media {
// Unlike DecoderBuffer, allocations are assumed to be allocated with the
// default memory allocator (i.e., new uint8[]).
//
-// NOTE: It is illegal to call any method when IsEndOfStream() is true.
+// NOTE: It is illegal to call any method when end_of_stream() is true.
class MEDIA_EXPORT DataBuffer : public base::RefCountedThreadSafe<DataBuffer> {
public:
// Allocates buffer of size |buffer_size| >= 0.
@@ -34,27 +34,27 @@ class MEDIA_EXPORT DataBuffer : public base::RefCountedThreadSafe<DataBuffer> {
// Create a DataBuffer indicating we've reached end of stream.
//
- // Calling any method other than IsEndOfStream() on the resulting buffer
+ // Calling any method other than end_of_stream() on the resulting buffer
// is disallowed.
static scoped_refptr<DataBuffer> CreateEOSBuffer();
- base::TimeDelta GetTimestamp() const;
- void SetTimestamp(const base::TimeDelta& timestamp);
+ base::TimeDelta timestamp() const;
+ void set_timestamp(const base::TimeDelta& timestamp);
- base::TimeDelta GetDuration() const;
- void SetDuration(const base::TimeDelta& duration);
+ base::TimeDelta duration() const;
+ void set_duration(const base::TimeDelta& duration);
- const uint8* GetData() const;
- uint8* GetWritableData();
+ const uint8* data() const;
+ uint8* writable_data();
// The size of valid data in bytes.
//
// Setting this value beyond the buffer size is disallowed.
- int GetDataSize() const;
- void SetDataSize(int data_size);
+ int data_size() const;
+ void set_data_size(int data_size);
// If there's no data in this buffer, it represents end of stream.
- bool IsEndOfStream() const;
+ bool end_of_stream() const;
protected:
friend class base::RefCountedThreadSafe<DataBuffer>;

Powered by Google App Engine
This is Rietveld 408576698