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

Side by Side Diff: content/common/gpu/media/video_decode_accelerator_impl.h

Issue 317083003: Merge VideoDecodeAcceleratorImpl with VideoDecodeAccelerator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add logging include 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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_VIDEO_DECODE_ACCELERATOR_IMPL_H_
6 #define CONTENT_COMMON_GPU_MEDIA_VIDEO_DECODE_ACCELERATOR_IMPL_H_
7
8 #include "content/common/content_export.h"
9 #include "media/video/video_decode_accelerator.h"
10
11 namespace content {
12
13 class CONTENT_EXPORT VideoDecodeAcceleratorImpl
14 : public media::VideoDecodeAccelerator {
15 public:
16 VideoDecodeAcceleratorImpl();
17
18 // Returns true if VDA::Decode and VDA::Client callbacks can run on the IO
19 // thread. Otherwise they will run on the GPU child thread. The purpose of
20 // running Decode on the IO thread is to reduce decode latency. Note Decode
21 // should return as soon as possible and not block on the IO thread. Also,
22 // PictureReady should be run on the child thread if a picture is delivered
23 // the first time so it can be cleared.
24 virtual bool CanDecodeOnIOThread();
25
26 protected:
27 virtual ~VideoDecodeAcceleratorImpl();
28 };
29
30 } // namespace content
31
32 namespace base {
33
34 template <class T>
35 struct DefaultDeleter;
36
37 // Specialize DefaultDeleter so that scoped_ptr<VideoDecodeAcceleratorImpl>
38 // always uses "Destroy()" instead of trying to use the destructor.
39 template <>
40 struct DefaultDeleter<content::VideoDecodeAcceleratorImpl> {
41 public:
42 inline void operator()(void* video_decode_accelerator) const {
43 static_cast<content::VideoDecodeAcceleratorImpl*>(video_decode_accelerator)
44 ->Destroy();
45 }
46 };
47
48 } // namespace base
49
50 #endif // CONTENT_COMMON_GPU_MEDIA_VIDEO_DECODE_ACCELERATOR_IMPL_H_
OLDNEW
« 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