OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ANDROID_MEDIA_DECODER_JOB_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
6 #define MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 224 |
225 // Returns true if the |configs| doesn't match the current demuxer configs | 225 // Returns true if the |configs| doesn't match the current demuxer configs |
226 // the decoder job has. | 226 // the decoder job has. |
227 virtual bool AreDemuxerConfigsChanged( | 227 virtual bool AreDemuxerConfigsChanged( |
228 const DemuxerConfigs& configs) const = 0; | 228 const DemuxerConfigs& configs) const = 0; |
229 | 229 |
230 // Returns true if |media_codec_bridge_| needs to be reconfigured for the | 230 // Returns true if |media_codec_bridge_| needs to be reconfigured for the |
231 // new DemuxerConfigs, or false otherwise. | 231 // new DemuxerConfigs, or false otherwise. |
232 virtual bool IsCodecReconfigureNeeded(const DemuxerConfigs& configs) const; | 232 virtual bool IsCodecReconfigureNeeded(const DemuxerConfigs& configs) const; |
233 | 233 |
| 234 // Signals to decoder job that decoder has updated output format. Decoder job |
| 235 // may need to do internal reconfiguration in order to correctly interpret |
| 236 // incoming buffers |
| 237 virtual void GotOutputFormatChanged(); |
| 238 |
234 // Update the output format from the decoder, returns true if the output | 239 // Update the output format from the decoder, returns true if the output |
235 // format changes, or false otherwise. | 240 // format changes, or false otherwise. |
236 virtual bool UpdateOutputFormat(); | 241 virtual bool UpdateOutputFormat(); |
237 | 242 |
238 // Return the index to |received_data_| that is not currently being decoded. | 243 // Return the index to |received_data_| that is not currently being decoded. |
239 size_t inactive_demuxer_data_index() const { | 244 size_t inactive_demuxer_data_index() const { |
240 return 1 - current_demuxer_data_index_; | 245 return 1 - current_demuxer_data_index_; |
241 } | 246 } |
242 | 247 |
243 // The UI message loop where callbacks should be dispatched. | 248 // The UI message loop where callbacks should be dispatched. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 // This access unit is passed to the decoder during config changes to drain | 343 // This access unit is passed to the decoder during config changes to drain |
339 // the decoder. | 344 // the decoder. |
340 AccessUnit eos_unit_; | 345 AccessUnit eos_unit_; |
341 | 346 |
342 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); | 347 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); |
343 }; | 348 }; |
344 | 349 |
345 } // namespace media | 350 } // namespace media |
346 | 351 |
347 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ | 352 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
OLD | NEW |