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

Unified Diff: media/base/data_buffer.h

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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 2e88faf57c9eb4f64cb5718272279ce57172ba1d..bb819211f8049a37333125a5ed5a946c4f655833 100644
--- a/media/base/data_buffer.h
+++ b/media/base/data_buffer.h
@@ -17,7 +17,7 @@ namespace media {
// as necessary.
//
// Unlike DecoderBuffer, allocations are assumed to be allocated with the
-// default memory allocator (i.e., new uint8[]).
+// default memory allocator (i.e., new uint8_t[]).
//
// NOTE: It is illegal to call any method when end_of_stream() is true.
class MEDIA_EXPORT DataBuffer : public base::RefCountedThreadSafe<DataBuffer> {
@@ -26,12 +26,12 @@ class MEDIA_EXPORT DataBuffer : public base::RefCountedThreadSafe<DataBuffer> {
explicit DataBuffer(int buffer_size);
// Assumes valid data of size |buffer_size|.
- DataBuffer(scoped_ptr<uint8[]> buffer, int buffer_size);
+ DataBuffer(scoped_ptr<uint8_t[]> buffer, int buffer_size);
// Create a DataBuffer whose |data_| is copied from |data|.
//
// |data| must not be null and |size| must be >= 0.
- static scoped_refptr<DataBuffer> CopyFrom(const uint8* data, int size);
+ static scoped_refptr<DataBuffer> CopyFrom(const uint8_t* data, int size);
// Create a DataBuffer indicating we've reached end of stream.
//
@@ -59,12 +59,12 @@ class MEDIA_EXPORT DataBuffer : public base::RefCountedThreadSafe<DataBuffer> {
duration_ = duration;
}
- const uint8* data() const {
+ const uint8_t* data() const {
DCHECK(!end_of_stream());
return data_.get();
}
- uint8* writable_data() {
+ uint8_t* writable_data() {
DCHECK(!end_of_stream());
return data_.get();
}
@@ -93,7 +93,7 @@ class MEDIA_EXPORT DataBuffer : public base::RefCountedThreadSafe<DataBuffer> {
// the allocated buffer and sets data size to |data_size|.
//
// If |data| is null an end of stream buffer is created.
- DataBuffer(const uint8* data, int data_size);
+ DataBuffer(const uint8_t* data, int data_size);
virtual ~DataBuffer();
@@ -101,7 +101,7 @@ class MEDIA_EXPORT DataBuffer : public base::RefCountedThreadSafe<DataBuffer> {
base::TimeDelta timestamp_;
base::TimeDelta duration_;
- scoped_ptr<uint8[]> data_;
+ scoped_ptr<uint8_t[]> data_;
int buffer_size_;
int data_size_;

Powered by Google App Engine
This is Rietveld 408576698