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

Side by Side Diff: media/base/decoder_buffer.h

Issue 760523008: Switch from a DataPipe per DecoderBuffer to a single one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Fix. Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/base/decoder_buffer.cc » ('j') | media/base/decoder_buffer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 163
164 void set_is_key_frame(bool is_key_frame) { 164 void set_is_key_frame(bool is_key_frame) {
165 DCHECK(!end_of_stream()); 165 DCHECK(!end_of_stream());
166 is_key_frame_ = is_key_frame; 166 is_key_frame_ = is_key_frame;
167 } 167 }
168 168
169 // Returns a human-readable string describing |*this|. 169 // Returns a human-readable string describing |*this|.
170 std::string AsHumanReadableString(); 170 std::string AsHumanReadableString();
171 171
172 // Replaces any existing side data with data copied from |side_data|.
173 void CopySideDataFrom(const uint8* side_data, int side_data_size);
174
172 protected: 175 protected:
173 friend class base::RefCountedThreadSafe<DecoderBuffer>; 176 friend class base::RefCountedThreadSafe<DecoderBuffer>;
174 177
175 // Allocates a buffer of size |size| >= 0 and copies |data| into it. Buffer 178 // Allocates a buffer of size |size| >= 0 and copies |data| into it. Buffer
176 // will be padded and aligned as necessary. If |data| is NULL then |data_| is 179 // will be padded and aligned as necessary. If |data| is NULL then |data_| is
177 // set to NULL and |buffer_size_| to 0. |is_key_frame_| will default to 180 // set to NULL and |buffer_size_| to 0. |is_key_frame_| will default to
178 // false. 181 // false.
179 DecoderBuffer(const uint8* data, int size, 182 DecoderBuffer(const uint8* data, int size,
180 const uint8* side_data, int side_data_size); 183 const uint8* side_data, int side_data_size);
181 virtual ~DecoderBuffer(); 184 virtual ~DecoderBuffer();
(...skipping 13 matching lines...) Expand all
195 198
196 // Constructor helper method for memory allocations. 199 // Constructor helper method for memory allocations.
197 void Initialize(); 200 void Initialize();
198 201
199 DISALLOW_COPY_AND_ASSIGN(DecoderBuffer); 202 DISALLOW_COPY_AND_ASSIGN(DecoderBuffer);
200 }; 203 };
201 204
202 } // namespace media 205 } // namespace media
203 206
204 #endif // MEDIA_BASE_DECODER_BUFFER_H_ 207 #endif // MEDIA_BASE_DECODER_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/decoder_buffer.cc » ('j') | media/base/decoder_buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698