OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVIDER
_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVIDER
_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/threading/thread_checker.h" |
| 10 #include "content/common/content_export.h" |
| 11 #include "media/video/video_decode_accelerator.h" |
| 12 |
| 13 namespace gfx { |
| 14 class SurfaceTexture; |
| 15 } |
| 16 |
| 17 namespace gpu { |
| 18 namespace gles2 { |
| 19 class GLES2Decoder; |
| 20 } |
| 21 } |
| 22 |
| 23 namespace media { |
| 24 class VideoCodecBridge; |
| 25 } |
| 26 |
| 27 namespace content { |
| 28 |
| 29 // Helper class that provides the BackingStrategy with enough state |
| 30 // to do useful work. |
| 31 class AndroidVideoDecodeAcceleratorStateProvider { |
| 32 public: |
| 33 virtual ~AndroidVideoDecodeAcceleratorStateProvider() {} |
| 34 |
| 35 // Various handy getters. |
| 36 virtual const gfx::Size& GetSize() const = 0; |
| 37 virtual const base::ThreadChecker& ThreadChecker() const = 0; |
| 38 virtual gfx::SurfaceTexture* GetSurfaceTexture() const = 0; |
| 39 virtual uint32 GetSurfaceTextureId() const = 0; |
| 40 virtual gpu::gles2::GLES2Decoder* GetGlDecoder() const = 0; |
| 41 virtual media::VideoCodecBridge* GetMediaCodec() = 0; |
| 42 |
| 43 // Helper function to report an error condition and stop decoding. |
| 44 // This will post NotifyError(), and transition to the error state. |
| 45 // It is meant to be called from the RETURN_ON_FAILURE macro. |
| 46 virtual void PostError(const ::tracked_objects::Location& from_here, |
| 47 media::VideoDecodeAccelerator::Error error) = 0; |
| 48 }; |
| 49 |
| 50 } // namespace content |
| 51 |
| 52 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVI
DER_H_ |
OLD | NEW |