| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // the |callback| passed to Decode() is always called and the status | 71 // the |callback| passed to Decode() is always called and the status |
| 72 // reflects whether data was actually decoded or the decode terminated early. | 72 // reflects whether data was actually decoded or the decode terminated early. |
| 73 void StopDecode(); | 73 void StopDecode(); |
| 74 | 74 |
| 75 // Flush the decoder. | 75 // Flush the decoder. |
| 76 void Flush(); | 76 void Flush(); |
| 77 | 77 |
| 78 // Enter prerolling state. The job must not currently be decoding. | 78 // Enter prerolling state. The job must not currently be decoding. |
| 79 void BeginPrerolling(base::TimeDelta preroll_timestamp); | 79 void BeginPrerolling(base::TimeDelta preroll_timestamp); |
| 80 | 80 |
| 81 // Returns the demuxer config if the |received_data_| has it, or NULL |
| 82 // otherwise. |
| 83 DemuxerConfigs* GetDemuxerConfigs(); |
| 84 |
| 81 bool prerolling() const { return prerolling_; } | 85 bool prerolling() const { return prerolling_; } |
| 82 | 86 |
| 83 bool is_decoding() const { return !decode_cb_.is_null(); } | 87 bool is_decoding() const { return !decode_cb_.is_null(); } |
| 84 | 88 |
| 85 bool is_requesting_demuxer_data() const { | 89 bool is_requesting_demuxer_data() const { |
| 86 return is_requesting_demuxer_data_; | 90 return is_requesting_demuxer_data_; |
| 87 } | 91 } |
| 88 | 92 |
| 89 protected: | 93 protected: |
| 90 MediaDecoderJob( | 94 MediaDecoderJob( |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // the decoder thread. | 255 // the decoder thread. |
| 252 // NOTE: Weak pointers must be invalidated before all other member variables. | 256 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 253 base::WeakPtrFactory<MediaDecoderJob> weak_factory_; | 257 base::WeakPtrFactory<MediaDecoderJob> weak_factory_; |
| 254 | 258 |
| 255 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); | 259 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); |
| 256 }; | 260 }; |
| 257 | 261 |
| 258 } // namespace media | 262 } // namespace media |
| 259 | 263 |
| 260 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ | 264 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
| OLD | NEW |