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_STREAM_PARSER_BUFFER_H_ | 5 #ifndef MEDIA_BASE_STREAM_PARSER_BUFFER_H_ |
6 #define MEDIA_BASE_STREAM_PARSER_BUFFER_H_ | 6 #define MEDIA_BASE_STREAM_PARSER_BUFFER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "media/base/decoder_buffer.h" | 10 #include "media/base/decoder_buffer.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // It's expected that this preroll buffer will be discarded entirely post | 162 // It's expected that this preroll buffer will be discarded entirely post |
163 // decoding. As such it's discard_padding() will be set to kInfiniteDuration. | 163 // decoding. As such it's discard_padding() will be set to kInfiniteDuration. |
164 // | 164 // |
165 // All future timestamp, decode timestamp, config id, or track id changes to | 165 // All future timestamp, decode timestamp, config id, or track id changes to |
166 // this buffer will be applied to the preroll buffer as well. | 166 // this buffer will be applied to the preroll buffer as well. |
167 void SetPrerollBuffer(const scoped_refptr<StreamParserBuffer>& preroll); | 167 void SetPrerollBuffer(const scoped_refptr<StreamParserBuffer>& preroll); |
168 const scoped_refptr<StreamParserBuffer>& preroll_buffer() { | 168 const scoped_refptr<StreamParserBuffer>& preroll_buffer() { |
169 return preroll_buffer_; | 169 return preroll_buffer_; |
170 } | 170 } |
171 | 171 |
172 virtual void set_timestamp(base::TimeDelta timestamp) OVERRIDE; | 172 virtual void set_timestamp(base::TimeDelta timestamp) override; |
173 | 173 |
174 private: | 174 private: |
175 StreamParserBuffer(const uint8* data, int data_size, | 175 StreamParserBuffer(const uint8* data, int data_size, |
176 const uint8* side_data, int side_data_size, | 176 const uint8* side_data, int side_data_size, |
177 bool is_keyframe, Type type, | 177 bool is_keyframe, Type type, |
178 TrackId track_id); | 178 TrackId track_id); |
179 virtual ~StreamParserBuffer(); | 179 virtual ~StreamParserBuffer(); |
180 | 180 |
181 bool is_keyframe_; | 181 bool is_keyframe_; |
182 DecodeTimestamp decode_timestamp_; | 182 DecodeTimestamp decode_timestamp_; |
183 int config_id_; | 183 int config_id_; |
184 Type type_; | 184 Type type_; |
185 TrackId track_id_; | 185 TrackId track_id_; |
186 BufferQueue splice_buffers_; | 186 BufferQueue splice_buffers_; |
187 scoped_refptr<StreamParserBuffer> preroll_buffer_; | 187 scoped_refptr<StreamParserBuffer> preroll_buffer_; |
188 | 188 |
189 DISALLOW_COPY_AND_ASSIGN(StreamParserBuffer); | 189 DISALLOW_COPY_AND_ASSIGN(StreamParserBuffer); |
190 }; | 190 }; |
191 | 191 |
192 } // namespace media | 192 } // namespace media |
193 | 193 |
194 #endif // MEDIA_BASE_STREAM_PARSER_BUFFER_H_ | 194 #endif // MEDIA_BASE_STREAM_PARSER_BUFFER_H_ |
OLD | NEW |