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

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: 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') | no next file » | 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 // Returns true if VDA::Decode and VDA::Client callbacks can run on the IO
Ami GONE FROM CHROMIUM 2014/06/05 00:17:57 Please preface this comment with: // GPU PROCESS
spang 2014/06/06 18:38:42 Done.
136 // thread. Otherwise they will run on the GPU child thread. The purpose of
137 // running Decode on the IO thread is to reduce decode latency. Note Decode
138 // should return as soon as possible and not block on the IO thread. Also,
139 // PictureReady should be run on the child thread if a picture is delivered
140 // the first time so it can be cleared.
141 virtual bool CanDecodeOnIOThread() = 0;
142
135 protected: 143 protected:
136 // Do not delete directly; use Destroy() or own it with a scoped_ptr, which 144 // Do not delete directly; use Destroy() or own it with a scoped_ptr, which
137 // will Destroy() it properly by default. 145 // will Destroy() it properly by default.
138 virtual ~VideoDecodeAccelerator(); 146 virtual ~VideoDecodeAccelerator();
139 }; 147 };
140 148
141 } // namespace media 149 } // namespace media
142 150
143 namespace base { 151 namespace base {
144 152
145 template <class T> 153 template <class T>
146 struct DefaultDeleter; 154 struct DefaultDeleter;
147 155
148 // Specialize DefaultDeleter so that scoped_ptr<VideoDecodeAccelerator> always 156 // Specialize DefaultDeleter so that scoped_ptr<VideoDecodeAccelerator> always
149 // uses "Destroy()" instead of trying to use the destructor. 157 // uses "Destroy()" instead of trying to use the destructor.
150 template <> 158 template <>
151 struct MEDIA_EXPORT DefaultDeleter<media::VideoDecodeAccelerator> { 159 struct MEDIA_EXPORT DefaultDeleter<media::VideoDecodeAccelerator> {
152 public: 160 public:
153 void operator()(void* video_decode_accelerator) const; 161 void operator()(void* video_decode_accelerator) const;
154 }; 162 };
155 163
156 } // namespace base 164 } // namespace base
157 165
158 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 166 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « media/video/mock_video_decode_accelerator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698