Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: content/common/gpu/media/android_video_decode_accelerator_state_provider.h

Issue 1313913003: Begin refactor of AVDA to support zero-copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed unit test. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/media/android_video_decode_accelerator_state_provider.h
diff --git a/content/common/gpu/media/android_video_decode_accelerator_state_provider.h b/content/common/gpu/media/android_video_decode_accelerator_state_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..64ebc0b97d5c82eddde6b0a3a5dde926c2cf60ca
--- /dev/null
+++ b/content/common/gpu/media/android_video_decode_accelerator_state_provider.h
@@ -0,0 +1,52 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVIDER_H_
+#define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVIDER_H_
+
+#include <list>
+#include <map>
+#include <queue>
+#include <string>
+#include <vector>
+
+#include "base/compiler_specific.h"
+#include "base/threading/thread_checker.h"
+#include "base/timer/timer.h"
+#include "content/common/content_export.h"
+#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
+#include "media/base/android/media_codec_bridge.h"
+#include "media/video/video_decode_accelerator.h"
+
+namespace gfx {
+class SurfaceTexture;
+}
+
+namespace content {
+
+// Helper class that provides the BackingStrategy with enough state
+// to do useful work.
+class AndroidVideoDecodeAcceleratorStateProvider {
+ public:
+ virtual ~AndroidVideoDecodeAcceleratorStateProvider() {}
watk 2015/09/09 00:36:00 indentation should be two spaces
+
+ // Various handy getters.
+ virtual const gfx::Size& GetSize() const = 0;
+ virtual const base::ThreadChecker& ThreadChecker() const = 0;
+ virtual gfx::SurfaceTexture* GetSurfaceTexture() const = 0;
+ virtual uint32 GetSurfaceTextureId() const = 0;
+ virtual gpu::gles2::GLES2Decoder* GetGlDecoder() const = 0;
+ virtual media::VideoCodecBridge* GetMediaCodec() = 0;
+
+ // Helper function to report an error condition and stop decodnig.
watk 2015/09/09 00:36:00 s/decodnig/decoding/
+ // This will post NotifyError(), and transition to the error state.
+ // It is meant to be called from the RETURN_ON_FAILURE macro.
+ virtual void PostError(const ::tracked_objects::Location& from_here,
+ media::VideoDecodeAccelerator::Error error) = 0;
+
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_STATE_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698