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

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

Issue 319323002: Revert of Merge VideoDecodeAcceleratorImpl with VideoDecodeAccelerator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/video_decode_accelerator_impl.h
diff --git a/content/common/gpu/media/video_decode_accelerator_impl.h b/content/common/gpu/media/video_decode_accelerator_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..c0762a09e7aa3784f6598473ac1e365ca266b6cc
--- /dev/null
+++ b/content/common/gpu/media/video_decode_accelerator_impl.h
@@ -0,0 +1,50 @@
+// Copyright 2013 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_VIDEO_DECODE_ACCELERATOR_IMPL_H_
+#define CONTENT_COMMON_GPU_MEDIA_VIDEO_DECODE_ACCELERATOR_IMPL_H_
+
+#include "content/common/content_export.h"
+#include "media/video/video_decode_accelerator.h"
+
+namespace content {
+
+class CONTENT_EXPORT VideoDecodeAcceleratorImpl
+ : public media::VideoDecodeAccelerator {
+ public:
+ VideoDecodeAcceleratorImpl();
+
+ // Returns true if VDA::Decode and VDA::Client callbacks can run on the IO
+ // thread. Otherwise they will run on the GPU child thread. The purpose of
+ // running Decode on the IO thread is to reduce decode latency. Note Decode
+ // should return as soon as possible and not block on the IO thread. Also,
+ // PictureReady should be run on the child thread if a picture is delivered
+ // the first time so it can be cleared.
+ virtual bool CanDecodeOnIOThread();
+
+ protected:
+ virtual ~VideoDecodeAcceleratorImpl();
+};
+
+} // namespace content
+
+namespace base {
+
+template <class T>
+struct DefaultDeleter;
+
+// Specialize DefaultDeleter so that scoped_ptr<VideoDecodeAcceleratorImpl>
+// always uses "Destroy()" instead of trying to use the destructor.
+template <>
+struct DefaultDeleter<content::VideoDecodeAcceleratorImpl> {
+ public:
+ inline void operator()(void* video_decode_accelerator) const {
+ static_cast<content::VideoDecodeAcceleratorImpl*>(video_decode_accelerator)
+ ->Destroy();
+ }
+};
+
+} // namespace base
+
+#endif // CONTENT_COMMON_GPU_MEDIA_VIDEO_DECODE_ACCELERATOR_IMPL_H_
« no previous file with comments | « content/common/gpu/media/vaapi_video_decode_accelerator.cc ('k') | content/common/gpu/media/video_decode_accelerator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698