| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 210 |
| 211 // Creates |media_codec_bridge_| for decoding purpose. Returns true if it is | 211 // Creates |media_codec_bridge_| for decoding purpose. Returns true if it is |
| 212 // created, or false otherwise. | 212 // created, or false otherwise. |
| 213 bool CreateMediaCodecBridge(); | 213 bool CreateMediaCodecBridge(); |
| 214 | 214 |
| 215 // Called when an access unit is consumed by the decoder. |is_config_change| | 215 // Called when an access unit is consumed by the decoder. |is_config_change| |
| 216 // indicates whether the current access unit is a config change. If it is | 216 // indicates whether the current access unit is a config change. If it is |
| 217 // true, the next access unit is guarateed to be an I-frame. | 217 // true, the next access unit is guarateed to be an I-frame. |
| 218 virtual void CurrentDataConsumed(bool is_config_change) {} | 218 virtual void CurrentDataConsumed(bool is_config_change) {} |
| 219 | 219 |
| 220 // Called when |media_codec_bridge_| is released | |
| 221 virtual void OnMediaCodecBridgeReleased() {} | |
| 222 | |
| 223 // Implemented by the child class to create |media_codec_bridge_| for a | 220 // Implemented by the child class to create |media_codec_bridge_| for a |
| 224 // particular stream. Returns true if it is created, or false otherwise. | 221 // particular stream. Returns true if it is created, or false otherwise. |
| 225 virtual bool CreateMediaCodecBridgeInternal() = 0; | 222 virtual bool CreateMediaCodecBridgeInternal() = 0; |
| 226 | 223 |
| 227 // Returns true if the |configs| doesn't match the current demuxer configs | 224 // Returns true if the |configs| doesn't match the current demuxer configs |
| 228 // the decoder job has. | 225 // the decoder job has. |
| 229 virtual bool AreDemuxerConfigsChanged( | 226 virtual bool AreDemuxerConfigsChanged( |
| 230 const DemuxerConfigs& configs) const = 0; | 227 const DemuxerConfigs& configs) const = 0; |
| 231 | 228 |
| 232 // Updates the demuxer configs. | 229 // Updates the demuxer configs. |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 // This access unit is passed to the decoder during config changes to drain | 336 // This access unit is passed to the decoder during config changes to drain |
| 340 // the decoder. | 337 // the decoder. |
| 341 AccessUnit eos_unit_; | 338 AccessUnit eos_unit_; |
| 342 | 339 |
| 343 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); | 340 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); |
| 344 }; | 341 }; |
| 345 | 342 |
| 346 } // namespace media | 343 } // namespace media |
| 347 | 344 |
| 348 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ | 345 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
| OLD | NEW |