| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 // We use delays for video decoder only. | 277 // We use delays for video decoder only. |
| 278 virtual void AssociateCurrentTimeWithPTS(base::TimeDelta current_time) {} | 278 virtual void AssociateCurrentTimeWithPTS(base::TimeDelta current_time) {} |
| 279 | 279 |
| 280 // Invalidate delay calculation. We use delays for video decoder only. | 280 // Invalidate delay calculation. We use delays for video decoder only. |
| 281 virtual void DissociatePTSFromTime() {} | 281 virtual void DissociatePTSFromTime() {} |
| 282 | 282 |
| 283 // Processes the change of the output format, varies by stream. | 283 // Processes the change of the output format, varies by stream. |
| 284 // Returns true if this processing succeeded. | 284 // Returns true if this processing succeeded. |
| 285 virtual bool OnOutputFormatChanged() = 0; | 285 virtual bool OnOutputFormatChanged() = 0; |
| 286 | 286 |
| 287 // Renders the decoded frame and releases output buffer, or posts | 287 // Renders the decoded frame and releases output buffer, or posts a delayed |
| 288 // a delayed task to do it at a later time, | 288 // task to do it at a later time. Returnes false if an error occurred. |
| 289 virtual void Render(int buffer_index, | 289 virtual bool Render(int buffer_index, |
| 290 size_t offset, | 290 size_t offset, |
| 291 size_t size, | 291 size_t size, |
| 292 RenderMode render_mode, | 292 RenderMode render_mode, |
| 293 base::TimeDelta pts, | 293 base::TimeDelta pts, |
| 294 bool eos_encountered) = 0; | 294 bool eos_encountered) = 0; |
| 295 | 295 |
| 296 // Returns the number of delayed task (we might have them for video). | 296 // Returns the number of delayed task (we might have them for video). |
| 297 virtual int NumDelayedRenderTasks() const; | 297 virtual int NumDelayedRenderTasks() const; |
| 298 | 298 |
| 299 // Releases output buffers that are dequeued and not released yet (video). | 299 // Releases output buffers that are dequeued and not released yet (video). |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 | 460 |
| 461 // NOTE: Weak pointers must be invalidated before all other member variables. | 461 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 462 base::WeakPtrFactory<MediaCodecDecoder> weak_factory_; | 462 base::WeakPtrFactory<MediaCodecDecoder> weak_factory_; |
| 463 | 463 |
| 464 DISALLOW_COPY_AND_ASSIGN(MediaCodecDecoder); | 464 DISALLOW_COPY_AND_ASSIGN(MediaCodecDecoder); |
| 465 }; | 465 }; |
| 466 | 466 |
| 467 } // namespace media | 467 } // namespace media |
| 468 | 468 |
| 469 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_ | 469 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_ |
| OLD | NEW |