| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CODEC_DECODER_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_ |
| 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_ |
| 7 | 7 |
| 8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // Associates PTS with device time so we can calculate delays. | 225 // Associates PTS with device time so we can calculate delays. |
| 226 // We use delays for video decoder only. | 226 // We use delays for video decoder only. |
| 227 virtual void SynchronizePTSWithTime(base::TimeDelta current_time) {} | 227 virtual void SynchronizePTSWithTime(base::TimeDelta current_time) {} |
| 228 | 228 |
| 229 // Processes the change of the output format, varies by stream. | 229 // Processes the change of the output format, varies by stream. |
| 230 virtual void OnOutputFormatChanged() = 0; | 230 virtual void OnOutputFormatChanged() = 0; |
| 231 | 231 |
| 232 // Renders the decoded frame and releases output buffer, or posts | 232 // Renders the decoded frame and releases output buffer, or posts |
| 233 // a delayed task to do it at a later time, | 233 // a delayed task to do it at a later time, |
| 234 virtual void Render(int buffer_index, | 234 virtual void Render(int buffer_index, |
| 235 size_t offset, |
| 235 size_t size, | 236 size_t size, |
| 236 bool render_output, | 237 bool render_output, |
| 237 base::TimeDelta pts, | 238 base::TimeDelta pts, |
| 238 bool eos_encountered) = 0; | 239 bool eos_encountered) = 0; |
| 239 | 240 |
| 240 // Returns the number of delayed task (we might have them for video). | 241 // Returns the number of delayed task (we might have them for video). |
| 241 virtual int NumDelayedRenderTasks() const; | 242 virtual int NumDelayedRenderTasks() const; |
| 242 | 243 |
| 243 // Releases output buffers that are dequeued and not released yet (video) | 244 // Releases output buffers that are dequeued and not released yet (video) |
| 244 // if the |release| parameter is set and then remove the references to them. | 245 // if the |release| parameter is set and then remove the references to them. |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 | 357 |
| 357 // NOTE: Weak pointers must be invalidated before all other member variables. | 358 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 358 base::WeakPtrFactory<MediaCodecDecoder> weak_factory_; | 359 base::WeakPtrFactory<MediaCodecDecoder> weak_factory_; |
| 359 | 360 |
| 360 DISALLOW_COPY_AND_ASSIGN(MediaCodecDecoder); | 361 DISALLOW_COPY_AND_ASSIGN(MediaCodecDecoder); |
| 361 }; | 362 }; |
| 362 | 363 |
| 363 } // namespace media | 364 } // namespace media |
| 364 | 365 |
| 365 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_ | 366 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_ |
| OLD | NEW |