| 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 MEDIA_GPU_ANDROID_COPYING_BACKING_STRATEGY_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ | 6 #define MEDIA_GPU_ANDROID_COPYING_BACKING_STRATEGY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "content/common/content_export.h" | 13 #include "media/gpu/android_video_decode_accelerator.h" |
| 14 #include "content/common/gpu/media/android_video_decode_accelerator.h" | 14 #include "media/gpu/media_gpu_export.h" |
| 15 | 15 |
| 16 namespace gpu { | 16 namespace gpu { |
| 17 class CopyTextureCHROMIUMResourceManager; | 17 class CopyTextureCHROMIUMResourceManager; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace media { | 20 namespace media { |
| 21 class PictureBuffer; | 21 class PictureBuffer; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace content { | 24 namespace media { |
| 25 | 25 |
| 26 class AVDAStateProvider; | 26 class AVDAStateProvider; |
| 27 | 27 |
| 28 // A BackingStrategy implementation that copies images to PictureBuffer | 28 // A BackingStrategy implementation that copies images to PictureBuffer |
| 29 // textures via gpu texture copy. | 29 // textures via gpu texture copy. |
| 30 class CONTENT_EXPORT AndroidCopyingBackingStrategy | 30 class MEDIA_GPU_EXPORT AndroidCopyingBackingStrategy |
| 31 : public AndroidVideoDecodeAccelerator::BackingStrategy { | 31 : public AndroidVideoDecodeAccelerator::BackingStrategy { |
| 32 public: | 32 public: |
| 33 explicit AndroidCopyingBackingStrategy(AVDAStateProvider* state_provider); | 33 explicit AndroidCopyingBackingStrategy(AVDAStateProvider* state_provider); |
| 34 ~AndroidCopyingBackingStrategy() override; | 34 ~AndroidCopyingBackingStrategy() override; |
| 35 | 35 |
| 36 // AndroidVideoDecodeAccelerator::BackingStrategy | 36 // AndroidVideoDecodeAccelerator::BackingStrategy |
| 37 gfx::ScopedJavaSurface Initialize(int surface_view_id) override; | 37 gfx::ScopedJavaSurface Initialize(int surface_view_id) override; |
| 38 void Cleanup( | 38 void Cleanup( |
| 39 bool have_context, | 39 bool have_context, |
| 40 const AndroidVideoDecodeAccelerator::OutputBufferMap& buffers) override; | 40 const AndroidVideoDecodeAccelerator::OutputBufferMap& buffers) override; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 58 | 58 |
| 59 // A container of texture. Used to set a texture to |media_codec_|. | 59 // A container of texture. Used to set a texture to |media_codec_|. |
| 60 scoped_refptr<gfx::SurfaceTexture> surface_texture_; | 60 scoped_refptr<gfx::SurfaceTexture> surface_texture_; |
| 61 | 61 |
| 62 // The texture id which is set to |surface_texture_|. | 62 // The texture id which is set to |surface_texture_|. |
| 63 uint32_t surface_texture_id_; | 63 uint32_t surface_texture_id_; |
| 64 | 64 |
| 65 media::VideoCodecBridge* media_codec_; | 65 media::VideoCodecBridge* media_codec_; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace content | 68 } // namespace media |
| 69 | 69 |
| 70 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ | 70 #endif // MEDIA_GPU_ANDROID_COPYING_BACKING_STRATEGY_H_ |
| OLD | NEW |