| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 const media::PictureBuffer& picture_buffer, | 83 const media::PictureBuffer& picture_buffer, |
| 84 bool have_context) {} | 84 bool have_context) {} |
| 85 | 85 |
| 86 // Notify strategy that a picture buffer has been reused. | 86 // Notify strategy that a picture buffer has been reused. |
| 87 virtual void ReuseOnePictureBuffer( | 87 virtual void ReuseOnePictureBuffer( |
| 88 const media::PictureBuffer& picture_buffer) {} | 88 const media::PictureBuffer& picture_buffer) {} |
| 89 | 89 |
| 90 // Notify strategy that we have a new android MediaCodec instance. This | 90 // Notify strategy that we have a new android MediaCodec instance. This |
| 91 // happens when we're starting up or re-configuring mid-stream. Any | 91 // happens when we're starting up or re-configuring mid-stream. Any |
| 92 // previously provided codec should no longer be referenced. | 92 // previously provided codec should no longer be referenced. |
| 93 // For convenience, a container of PictureBuffers is provided in case | 93 virtual void CodecChanged(media::VideoCodecBridge* codec) = 0; |
| 94 // per-image cleanup is needed. | |
| 95 virtual void CodecChanged(media::VideoCodecBridge* codec, | |
| 96 const OutputBufferMap& buffer_map) = 0; | |
| 97 | 94 |
| 98 // Notify the strategy that a frame is available. This callback can happen | 95 // Notify the strategy that a frame is available. This callback can happen |
| 99 // on any thread at any time. | 96 // on any thread at any time. |
| 100 virtual void OnFrameAvailable() = 0; | 97 virtual void OnFrameAvailable() = 0; |
| 101 | 98 |
| 102 // Whether the pictures produced by this backing strategy are overlayable. | 99 // Whether the pictures produced by this backing strategy are overlayable. |
| 103 virtual bool ArePicturesOverlayable() = 0; | 100 virtual bool ArePicturesOverlayable() = 0; |
| 104 | 101 |
| 105 // Size may have changed due to resolution change since the last time this | 102 // Size may have changed due to resolution change since the last time this |
| 106 // PictureBuffer was used. Update the size of the picture buffer to | 103 // PictureBuffer was used. Update the size of the picture buffer to |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 | 382 |
| 386 // WeakPtrFactory for posting tasks back to |this|. | 383 // WeakPtrFactory for posting tasks back to |this|. |
| 387 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; | 384 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; |
| 388 | 385 |
| 389 friend class AndroidVideoDecodeAcceleratorTest; | 386 friend class AndroidVideoDecodeAcceleratorTest; |
| 390 }; | 387 }; |
| 391 | 388 |
| 392 } // namespace content | 389 } // namespace content |
| 393 | 390 |
| 394 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 391 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |