Chromium Code Reviews| 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 <list> | |
|
DaleCurtis
2015/09/14 18:46:21
?
liberato (no reviews please)
2015/09/14 22:34:53
i'm sure i removed at least one set of those, and
| |
| 9 //#include <map> | |
| 10 //#include <queue> | |
| 11 //#include <string> | |
| 12 //#include <vector> | |
| 13 | |
| 14 #include "base/compiler_specific.h" | |
| 15 #include "base/threading/thread_checker.h" | |
| 16 #include "content/common/content_export.h" | |
| 17 #include "media/video/video_decode_accelerator.h" | |
| 18 | |
| 19 namespace gfx { | |
| 20 class SurfaceTexture; | |
| 21 } | |
| 22 | |
| 23 namespace gpu { | |
| 24 namespace gles2 { | |
| 25 class GLES2Decoder; | |
| 26 } | |
| 27 } | |
| 28 | |
| 29 namespace media { | |
| 30 class VideoCodecBridge; | |
| 31 } | |
| 32 | |
| 33 namespace content { | |
| 34 | |
| 35 // Helper class that provides the BackingStrategy with enough state | |
| 36 // to do useful work. | |
| 37 class AndroidVideoDecodeAcceleratorStateProvider { | |
| 38 public: | |
| 39 virtual ~AndroidVideoDecodeAcceleratorStateProvider() {} | |
| 40 | |
| 41 // Various handy getters. | |
| 42 virtual const gfx::Size& GetSize() const = 0; | |
| 43 virtual const base::ThreadChecker& ThreadChecker() const = 0; | |
| 44 virtual gfx::SurfaceTexture* GetSurfaceTexture() const = 0; | |
| 45 virtual uint32 GetSurfaceTextureId() const = 0; | |
| 46 virtual gpu::gles2::GLES2Decoder* GetGlDecoder() const = 0; | |
| 47 virtual media::VideoCodecBridge* GetMediaCodec() = 0; | |
| 48 | |
| 49 // Helper function to report an error condition and stop decoding. | |
| 50 // This will post NotifyError(), and transition to the error state. | |
| 51 // It is meant to be called from the RETURN_ON_FAILURE macro. | |
| 52 virtual void PostError(const ::tracked_objects::Location& from_here, | |
| 53 media::VideoDecodeAccelerator::Error error) = 0; | |
| 54 }; | |
| 55 | |
| 56 } // namespace content | |
| 57 | |
| 58 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVI DER_H_ | |
| OLD | NEW |