Chromium Code Reviews| 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 // Update the output format from the decoder, returns true if the output | 234 // Update the output format from the decoder, returns true if the output |
|
qinmin
2015/01/12 23:57:15
update the return value
kjoswiak
2015/01/13 00:14:31
Done.
| |
| 235 // format changes, or false otherwise. | 235 // format changes, or false otherwise. |
| 236 virtual bool UpdateOutputFormat(); | 236 virtual MediaCodecStatus UpdateOutputFormat() = 0; |
| 237 | 237 |
| 238 // Return the index to |received_data_| that is not currently being decoded. | 238 // Return the index to |received_data_| that is not currently being decoded. |
| 239 size_t inactive_demuxer_data_index() const { | 239 size_t inactive_demuxer_data_index() const { |
| 240 return 1 - current_demuxer_data_index_; | 240 return 1 - current_demuxer_data_index_; |
| 241 } | 241 } |
| 242 | 242 |
| 243 // The UI message loop where callbacks should be dispatched. | 243 // The UI message loop where callbacks should be dispatched. |
| 244 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; | 244 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
| 245 | 245 |
| 246 // The task runner that decoder job runs on. | 246 // The task runner that decoder job runs on. |
| (...skipping 91 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 | 338 // This access unit is passed to the decoder during config changes to drain |
| 339 // the decoder. | 339 // the decoder. |
| 340 AccessUnit eos_unit_; | 340 AccessUnit eos_unit_; |
| 341 | 341 |
| 342 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); | 342 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); |
| 343 }; | 343 }; |
| 344 | 344 |
| 345 } // namespace media | 345 } // namespace media |
| 346 | 346 |
| 347 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ | 347 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
| OLD | NEW |