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

Side by Side Diff: media/video/video_decode_accelerator.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
« no previous file with comments | « media/video/mock_video_decode_accelerator.h ('k') | media/video/video_decode_accelerator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // "seek". 125 // "seek".
126 virtual void Reset() = 0; 126 virtual void Reset() = 0;
127 127
128 // Destroys the decoder: all pending inputs are dropped immediately and the 128 // Destroys the decoder: all pending inputs are dropped immediately and the
129 // component is freed. This call may asynchornously free system resources, 129 // component is freed. This call may asynchornously free system resources,
130 // but its client-visible effects are synchronous. After this method returns 130 // but its client-visible effects are synchronous. After this method returns
131 // no more callbacks will be made on the client. Deletes |this| 131 // no more callbacks will be made on the client. Deletes |this|
132 // unconditionally, so make sure to drop all pointers to it! 132 // unconditionally, so make sure to drop all pointers to it!
133 virtual void Destroy() = 0; 133 virtual void Destroy() = 0;
134 134
135 // GPU PROCESS ONLY. Implementations of this interface in the
136 // content/common/gpu/media should implement this, and implementations in
137 // other processes should not override the default implementation.
138 // Returns true if VDA::Decode and VDA::Client callbacks can run on the IO
139 // thread. Otherwise they will run on the GPU child thread. The purpose of
140 // running Decode on the IO thread is to reduce decode latency. Note Decode
141 // should return as soon as possible and not block on the IO thread. Also,
142 // PictureReady should be run on the child thread if a picture is delivered
143 // the first time so it can be cleared.
144 virtual bool CanDecodeOnIOThread();
145
135 protected: 146 protected:
136 // Do not delete directly; use Destroy() or own it with a scoped_ptr, which 147 // Do not delete directly; use Destroy() or own it with a scoped_ptr, which
137 // will Destroy() it properly by default. 148 // will Destroy() it properly by default.
138 virtual ~VideoDecodeAccelerator(); 149 virtual ~VideoDecodeAccelerator();
139 }; 150 };
140 151
141 } // namespace media 152 } // namespace media
142 153
143 namespace base { 154 namespace base {
144 155
145 template <class T> 156 template <class T>
146 struct DefaultDeleter; 157 struct DefaultDeleter;
147 158
148 // Specialize DefaultDeleter so that scoped_ptr<VideoDecodeAccelerator> always 159 // Specialize DefaultDeleter so that scoped_ptr<VideoDecodeAccelerator> always
149 // uses "Destroy()" instead of trying to use the destructor. 160 // uses "Destroy()" instead of trying to use the destructor.
150 template <> 161 template <>
151 struct MEDIA_EXPORT DefaultDeleter<media::VideoDecodeAccelerator> { 162 struct MEDIA_EXPORT DefaultDeleter<media::VideoDecodeAccelerator> {
152 public: 163 public:
153 void operator()(void* video_decode_accelerator) const; 164 void operator()(void* video_decode_accelerator) const;
154 }; 165 };
155 166
156 } // namespace base 167 } // namespace base
157 168
158 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 169 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « media/video/mock_video_decode_accelerator.h ('k') | media/video/video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698