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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 bool render_output, | 133 bool render_output, |
134 bool is_late_frame, | 134 bool is_late_frame, |
135 base::TimeDelta current_presentation_timestamp, | 135 base::TimeDelta current_presentation_timestamp, |
136 const ReleaseOutputCompletionCallback& callback) = 0; | 136 const ReleaseOutputCompletionCallback& callback) = 0; |
137 | 137 |
138 // Returns true if the "time to render" needs to be computed for frames in | 138 // Returns true if the "time to render" needs to be computed for frames in |
139 // this decoder job. | 139 // this decoder job. |
140 virtual bool ComputeTimeToRender() const = 0; | 140 virtual bool ComputeTimeToRender() const = 0; |
141 | 141 |
142 // Gets MediaCrypto object from |drm_bridge_|. | 142 // Gets MediaCrypto object from |drm_bridge_|. |
143 base::android::ScopedJavaLocalRef<jobject> GetMediaCrypto(); | 143 jobject GetMediaCrypto(); |
144 | 144 |
145 // Releases the |media_codec_bridge_|. | 145 // Releases the |media_codec_bridge_|. |
146 void ReleaseMediaCodecBridge(); | 146 void ReleaseMediaCodecBridge(); |
147 | 147 |
148 // Sets the current frame to a previously cached key frame. Returns true if | 148 // Sets the current frame to a previously cached key frame. Returns true if |
149 // a key frame is found, or false otherwise. | 149 // a key frame is found, or false otherwise. |
150 // TODO(qinmin): add UMA to study the cache hit ratio for key frames. | 150 // TODO(qinmin): add UMA to study the cache hit ratio for key frames. |
151 bool SetCurrentFrameToPreviouslyCachedKeyFrame(); | 151 bool SetCurrentFrameToPreviouslyCachedKeyFrame(); |
152 | 152 |
153 MediaDrmBridge* drm_bridge() { return drm_bridge_; } | 153 MediaDrmBridge* drm_bridge() { return drm_bridge_; } |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 // This access unit is passed to the decoder during config changes to drain | 360 // This access unit is passed to the decoder during config changes to drain |
361 // the decoder. | 361 // the decoder. |
362 AccessUnit eos_unit_; | 362 AccessUnit eos_unit_; |
363 | 363 |
364 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); | 364 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); |
365 }; | 365 }; |
366 | 366 |
367 } // namespace media | 367 } // namespace media |
368 | 368 |
369 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ | 369 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
OLD | NEW |