OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_BASE_DECODER_BUFFER_H_ | 5 #ifndef MEDIA_BASE_DECODER_BUFFER_H_ |
6 #define MEDIA_BASE_DECODER_BUFFER_H_ | 6 #define MEDIA_BASE_DECODER_BUFFER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 } | 168 } |
169 | 169 |
170 void set_is_key_frame(bool is_key_frame) { | 170 void set_is_key_frame(bool is_key_frame) { |
171 DCHECK(!end_of_stream()); | 171 DCHECK(!end_of_stream()); |
172 is_key_frame_ = is_key_frame; | 172 is_key_frame_ = is_key_frame; |
173 } | 173 } |
174 | 174 |
175 // Returns a human-readable string describing |*this|. | 175 // Returns a human-readable string describing |*this|. |
176 std::string AsHumanReadableString(); | 176 std::string AsHumanReadableString(); |
177 | 177 |
178 // Returns a shorter version of the above. | |
179 std::string AsShortString(); | |
xhwang
2016/02/01 19:30:55
How about just add a "bool verbose" parameter in A
Tima Vaisburd
2016/02/04 22:59:12
Added a flag instead. AsHumanReadableString(true)
| |
180 | |
178 // Replaces any existing side data with data copied from |side_data|. | 181 // Replaces any existing side data with data copied from |side_data|. |
179 void CopySideDataFrom(const uint8_t* side_data, size_t side_data_size); | 182 void CopySideDataFrom(const uint8_t* side_data, size_t side_data_size); |
180 | 183 |
181 protected: | 184 protected: |
182 friend class base::RefCountedThreadSafe<DecoderBuffer>; | 185 friend class base::RefCountedThreadSafe<DecoderBuffer>; |
183 | 186 |
184 // Allocates a buffer of size |size| >= 0 and copies |data| into it. Buffer | 187 // Allocates a buffer of size |size| >= 0 and copies |data| into it. Buffer |
185 // will be padded and aligned as necessary. If |data| is NULL then |data_| is | 188 // will be padded and aligned as necessary. If |data| is NULL then |data_| is |
186 // set to NULL and |buffer_size_| to 0. |is_key_frame_| will default to | 189 // set to NULL and |buffer_size_| to 0. |is_key_frame_| will default to |
187 // false. | 190 // false. |
(...skipping 18 matching lines...) Expand all Loading... | |
206 | 209 |
207 // Constructor helper method for memory allocations. | 210 // Constructor helper method for memory allocations. |
208 void Initialize(); | 211 void Initialize(); |
209 | 212 |
210 DISALLOW_COPY_AND_ASSIGN(DecoderBuffer); | 213 DISALLOW_COPY_AND_ASSIGN(DecoderBuffer); |
211 }; | 214 }; |
212 | 215 |
213 } // namespace media | 216 } // namespace media |
214 | 217 |
215 #endif // MEDIA_BASE_DECODER_BUFFER_H_ | 218 #endif // MEDIA_BASE_DECODER_BUFFER_H_ |
OLD | NEW |