Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 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> | |
| 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 "base/timer/timer.h" | |
| 17 #include "content/common/content_export.h" | |
| 18 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | |
| 19 #include "media/base/android/media_codec_bridge.h" | |
| 20 #include "media/video/video_decode_accelerator.h" | |
| 21 | |
| 22 namespace gfx { | |
| 23 class SurfaceTexture; | |
| 24 } | |
| 25 | |
| 26 namespace content { | |
| 27 | |
| 28 // Helper class that provides the BackingStrategy with enough state | |
| 29 // to do useful work. | |
| 30 class AndroidVideoDecodeAcceleratorStateProvider { | |
| 31 public: | |
| 32 virtual ~AndroidVideoDecodeAcceleratorStateProvider() {} | |
|
watk
2015/09/09 00:36:00
indentation should be two spaces
| |
| 33 | |
| 34 // Various handy getters. | |
| 35 virtual const gfx::Size& GetSize() const = 0; | |
| 36 virtual const base::ThreadChecker& ThreadChecker() const = 0; | |
| 37 virtual gfx::SurfaceTexture* GetSurfaceTexture() const = 0; | |
| 38 virtual uint32 GetSurfaceTextureId() const = 0; | |
| 39 virtual gpu::gles2::GLES2Decoder* GetGlDecoder() const = 0; | |
| 40 virtual media::VideoCodecBridge* GetMediaCodec() = 0; | |
| 41 | |
| 42 // Helper function to report an error condition and stop decodnig. | |
|
watk
2015/09/09 00:36:00
s/decodnig/decoding/
| |
| 43 // This will post NotifyError(), and transition to the error state. | |
| 44 // It is meant to be called from the RETURN_ON_FAILURE macro. | |
| 45 virtual void PostError(const ::tracked_objects::Location& from_here, | |
| 46 media::VideoDecodeAccelerator::Error error) = 0; | |
| 47 | |
| 48 }; | |
| 49 | |
| 50 } // namespace content | |
| 51 | |
| 52 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVI DER_H_ | |
| OLD | NEW |