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

Side by Side Diff: media/video/video_encode_accelerator.h

Issue 826663002: Support multiple video decoders and encoders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nits Created 5 years, 12 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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_ENCODE_ACCELERATOR_H_ 5 #ifndef MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_
6 #define MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ 6 #define MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 virtual void RequestEncodingParametersChange(uint32 bitrate, 137 virtual void RequestEncodingParametersChange(uint32 bitrate,
138 uint32 framerate) = 0; 138 uint32 framerate) = 0;
139 139
140 // Destroys the encoder: all pending inputs and outputs are dropped 140 // Destroys the encoder: all pending inputs and outputs are dropped
141 // immediately and the component is freed. This call may asynchronously free 141 // immediately and the component is freed. This call may asynchronously free
142 // system resources, but its client-visible effects are synchronous. After 142 // system resources, but its client-visible effects are synchronous. After
143 // this method returns no more callbacks will be made on the client. Deletes 143 // this method returns no more callbacks will be made on the client. Deletes
144 // |this| unconditionally, so make sure to drop all pointers to it! 144 // |this| unconditionally, so make sure to drop all pointers to it!
145 virtual void Destroy() = 0; 145 virtual void Destroy() = 0;
146 146
147 protected:
148 // 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
Pawel Osciak 2014/12/26 01:11:36 Please don't remove protected.
henryhsu 2014/12/26 08:40:41 oh ok. I removed this is due to ScopedVector. Now
149 // will Destroy() it properly by default. 148 // will Destroy() it properly by default.
150 virtual ~VideoEncodeAccelerator(); 149 virtual ~VideoEncodeAccelerator();
151 }; 150 };
152 151
153 } // namespace media 152 } // namespace media
154 153
155 namespace base { 154 namespace base {
156 155
157 template <class T> 156 template <class T>
158 struct DefaultDeleter; 157 struct DefaultDeleter;
159 158
160 // Specialize DefaultDeleter so that scoped_ptr<VideoEncodeAccelerator> always 159 // Specialize DefaultDeleter so that scoped_ptr<VideoEncodeAccelerator> always
161 // uses "Destroy()" instead of trying to use the destructor. 160 // uses "Destroy()" instead of trying to use the destructor.
162 template <> 161 template <>
163 struct MEDIA_EXPORT DefaultDeleter<media::VideoEncodeAccelerator> { 162 struct MEDIA_EXPORT DefaultDeleter<media::VideoEncodeAccelerator> {
164 public: 163 public:
165 void operator()(void* video_encode_accelerator) const; 164 void operator()(void* video_encode_accelerator) const;
166 }; 165 };
167 166
168 } // namespace base 167 } // namespace base
169 168
170 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ 169 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_
OLDNEW
« content/common/gpu/media/v4l2_video_decode_accelerator.cc ('K') | « content/content_common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698