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

Unified Diff: media/base/decoder_buffer.h

Issue 712593003: Move key frame flag from StreamParserBuffer to DecoderBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address PS1 comments, update mojo type converter Created 6 years, 1 month 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
« no previous file with comments | « no previous file | media/base/decoder_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/decoder_buffer.h
diff --git a/media/base/decoder_buffer.h b/media/base/decoder_buffer.h
index 092b2130c50257c1b0bc1aa31f3869026b4f1396..3d8b74966bc08f2eb2c74837de0d6f461a23721a 100644
--- a/media/base/decoder_buffer.h
+++ b/media/base/decoder_buffer.h
@@ -42,16 +42,18 @@ class MEDIA_EXPORT DecoderBuffer
};
// Allocates buffer with |size| >= 0. Buffer will be padded and aligned
- // as necessary.
+ // as necessary, and is_key_frame() will default to false.
xhwang 2014/11/11 23:24:26 s/is_key_frame()/|is_key_frame_|
wolenetz 2014/11/11 23:52:54 Done.
explicit DecoderBuffer(int size);
// Create a DecoderBuffer whose |data_| is copied from |data|. Buffer will be
// padded and aligned as necessary. |data| must not be NULL and |size| >= 0.
+ // The buffer's is_key_frame() will default to false.
xhwang 2014/11/11 23:24:26 ditto
wolenetz 2014/11/11 23:52:54 Done.
static scoped_refptr<DecoderBuffer> CopyFrom(const uint8* data, int size);
// Create a DecoderBuffer whose |data_| is copied from |data| and |side_data_|
// is copied from |side_data|. Buffers will be padded and aligned as necessary
- // Data pointers must not be NULL and sizes must be >= 0.
+ // Data pointers must not be NULL and sizes must be >= 0. The buffer's
+ // is_key_frame() will default to false.
xhwang 2014/11/11 23:24:26 ditto
wolenetz 2014/11/11 23:52:54 Done.
static scoped_refptr<DecoderBuffer> CopyFrom(const uint8* data, int size,
const uint8* side_data,
int side_data_size);
@@ -154,6 +156,16 @@ class MEDIA_EXPORT DecoderBuffer
splice_timestamp_ = splice_timestamp;
}
+ bool is_key_frame() const {
+ DCHECK(!end_of_stream());
+ return is_key_frame_;
+ }
+
+ void set_is_key_frame(bool is_key_frame) {
+ DCHECK(!end_of_stream());
+ is_key_frame_ = is_key_frame;
+ }
+
// Returns a human-readable string describing |*this|.
std::string AsHumanReadableString();
@@ -162,7 +174,7 @@ class MEDIA_EXPORT DecoderBuffer
// Allocates a buffer of size |size| >= 0 and copies |data| into it. Buffer
// will be padded and aligned as necessary. If |data| is NULL then |data_| is
- // set to NULL and |buffer_size_| to 0.
+ // set to NULL and |buffer_size_| to 0. is_key_frame() will default to false.
xhwang 2014/11/11 23:24:26 ditto
wolenetz 2014/11/11 23:52:54 Done.
DecoderBuffer(const uint8* data, int size,
const uint8* side_data, int side_data_size);
virtual ~DecoderBuffer();
@@ -178,6 +190,7 @@ class MEDIA_EXPORT DecoderBuffer
scoped_ptr<DecryptConfig> decrypt_config_;
DiscardPadding discard_padding_;
base::TimeDelta splice_timestamp_;
+ bool is_key_frame_;
// Constructor helper method for memory allocations.
void Initialize();
« no previous file with comments | « no previous file | media/base/decoder_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698