| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // Returns true if the audio/video stream is available, implemented by child | 94 // Returns true if the audio/video stream is available, implemented by child |
| 95 // classes. | 95 // classes. |
| 96 virtual bool HasStream() const = 0; | 96 virtual bool HasStream() const = 0; |
| 97 | 97 |
| 98 void SetDrmBridge(MediaDrmBridge* drm_bridge); | 98 void SetDrmBridge(MediaDrmBridge* drm_bridge); |
| 99 | 99 |
| 100 bool is_decoding() const { return !decode_cb_.is_null(); } | 100 bool is_decoding() const { return !decode_cb_.is_null(); } |
| 101 | 101 |
| 102 bool is_content_encrypted() const { return is_content_encrypted_; } | 102 bool is_content_encrypted() const { return is_content_encrypted_; } |
| 103 | 103 |
| 104 bool prerolling() const { return prerolling_; } |
| 105 |
| 104 protected: | 106 protected: |
| 105 // Creates a new MediaDecoderJob instance. | 107 // Creates a new MediaDecoderJob instance. |
| 106 // |decoder_task_runner| - Thread on which the decoder task will run. | 108 // |decoder_task_runner| - Thread on which the decoder task will run. |
| 107 // |request_data_cb| - Callback to request more data for the decoder. | 109 // |request_data_cb| - Callback to request more data for the decoder. |
| 108 // |config_changed_cb| - Callback to inform the caller that | 110 // |config_changed_cb| - Callback to inform the caller that |
| 109 // demuxer config has changed. | 111 // demuxer config has changed. |
| 110 MediaDecoderJob( | 112 MediaDecoderJob( |
| 111 const scoped_refptr<base::SingleThreadTaskRunner>& decoder_task_runner, | 113 const scoped_refptr<base::SingleThreadTaskRunner>& decoder_task_runner, |
| 112 const base::Closure& request_data_cb, | 114 const base::Closure& request_data_cb, |
| 113 const base::Closure& config_changed_cb); | 115 const base::Closure& config_changed_cb); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 // 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 |
| 337 // the decoder. | 339 // the decoder. |
| 338 AccessUnit eos_unit_; | 340 AccessUnit eos_unit_; |
| 339 | 341 |
| 340 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); | 342 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); |
| 341 }; | 343 }; |
| 342 | 344 |
| 343 } // namespace media | 345 } // namespace media |
| 344 | 346 |
| 345 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ | 347 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
| OLD | NEW |