| 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 CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/common/gpu/media/android_video_decode_accelerator.h" | 10 #include "content/common/gpu/media/android_video_decode_accelerator.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // textures via gpu texture copy. | 25 // textures via gpu texture copy. |
| 26 class CONTENT_EXPORT AndroidCopyingBackingStrategy | 26 class CONTENT_EXPORT AndroidCopyingBackingStrategy |
| 27 : public AndroidVideoDecodeAccelerator::BackingStrategy { | 27 : public AndroidVideoDecodeAccelerator::BackingStrategy { |
| 28 public: | 28 public: |
| 29 AndroidCopyingBackingStrategy(); | 29 AndroidCopyingBackingStrategy(); |
| 30 ~AndroidCopyingBackingStrategy() override; | 30 ~AndroidCopyingBackingStrategy() override; |
| 31 | 31 |
| 32 // AndroidVideoDecodeAccelerator::BackingStrategy | 32 // AndroidVideoDecodeAccelerator::BackingStrategy |
| 33 void Initialize(AVDAStateProvider*) override; | 33 void Initialize(AVDAStateProvider*) override; |
| 34 void Cleanup(const AndroidVideoDecodeAccelerator::OutputBufferMap&) override; | 34 void Cleanup(const AndroidVideoDecodeAccelerator::OutputBufferMap&) override; |
| 35 uint32 GetNumPictureBuffers() const override; | |
| 36 uint32 GetTextureTarget() const override; | 35 uint32 GetTextureTarget() const override; |
| 37 scoped_refptr<gfx::SurfaceTexture> CreateSurfaceTexture() override; | 36 scoped_refptr<gfx::SurfaceTexture> CreateSurfaceTexture() override; |
| 38 void UseCodecBufferForPictureBuffer(int32 codec_buffer_index, | 37 void UseCodecBufferForPictureBuffer(int32 codec_buffer_index, |
| 39 const media::PictureBuffer&) override; | 38 const media::PictureBuffer&) override; |
| 40 void CodecChanged( | 39 void CodecChanged( |
| 41 media::VideoCodecBridge*, | 40 media::VideoCodecBridge*, |
| 42 const AndroidVideoDecodeAccelerator::OutputBufferMap&) override; | 41 const AndroidVideoDecodeAccelerator::OutputBufferMap&) override; |
| 43 | 42 |
| 43 static media::VideoDecodeAccelerator::Capabilities::Flags |
| 44 GetCapabilitiesFlags() { |
| 45 return media::VideoDecodeAccelerator::Capabilities::NO_FLAGS; |
| 46 } |
| 47 |
| 44 private: | 48 private: |
| 45 // Used for copy the texture from surface texture to picture buffers. | 49 // Used for copy the texture from surface texture to picture buffers. |
| 46 scoped_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_; | 50 scoped_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_; |
| 47 | 51 |
| 48 AVDAStateProvider* state_provider_; | 52 AVDAStateProvider* state_provider_; |
| 49 | 53 |
| 50 // A container of texture. Used to set a texture to |media_codec_|. | 54 // A container of texture. Used to set a texture to |media_codec_|. |
| 51 scoped_refptr<gfx::SurfaceTexture> surface_texture_; | 55 scoped_refptr<gfx::SurfaceTexture> surface_texture_; |
| 52 | 56 |
| 53 // The texture id which is set to |surface_texture_|. | 57 // The texture id which is set to |surface_texture_|. |
| 54 uint32 surface_texture_id_; | 58 uint32 surface_texture_id_; |
| 55 | 59 |
| 56 media::VideoCodecBridge* media_codec_; | 60 media::VideoCodecBridge* media_codec_; |
| 57 }; | 61 }; |
| 58 | 62 |
| 59 } // namespace content | 63 } // namespace content |
| 60 | 64 |
| 61 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ | 65 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ |
| OLD | NEW |