Index: media/base/decoder_buffer.h |
diff --git a/media/base/decoder_buffer.h b/media/base/decoder_buffer.h |
index 7cb496b119b1158ec58a481170b95365f5ab7300..d0312a1596b0af7d489401797418725bc93b8215 100644 |
--- a/media/base/decoder_buffer.h |
+++ b/media/base/decoder_buffer.h |
@@ -5,6 +5,8 @@ |
#ifndef MEDIA_BASE_DECODER_BUFFER_H_ |
#define MEDIA_BASE_DECODER_BUFFER_H_ |
+#include <string> |
+ |
#include "base/memory/aligned_memory.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
@@ -43,8 +45,10 @@ class MEDIA_EXPORT DecoderBuffer |
// padded and aligned as necessary. |data| must not be NULL and |size| >= 0. |
static scoped_refptr<DecoderBuffer> CopyFrom(const uint8* data, int size); |
- // Create a DecoderBuffer indicating we've reached end of stream. GetData() |
- // and GetWritableData() will return NULL and GetDataSize() will return 0. |
+ // Create a DecoderBuffer indicating we've reached end of stream. |
+ // |
+ // Calling any method other than IsEndOfStream() on the resulting buffer |
+ // is disallowed. |
xhwang
2013/01/17 23:55:13
This means the caller/user of a DecoderBuffer shou
scherkus (not reviewing)
2013/01/18 00:06:36
Done + DataBuffer.
|
static scoped_refptr<DecoderBuffer> CreateEOSBuffer(); |
base::TimeDelta GetTimestamp() const; |
@@ -64,6 +68,9 @@ class MEDIA_EXPORT DecoderBuffer |
// If there's no data in this buffer, it represents end of stream. |
bool IsEndOfStream() const; |
+ // Returns a human-readable string describing |*this|. |
+ std::string AsHumanReadableString(); |
+ |
protected: |
friend class base::RefCountedThreadSafe<DecoderBuffer>; |