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

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

Issue 1490333005: Don't require VDAs to return all PictureBuffers at once. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit test. Created 5 years 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 (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 <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 16 matching lines...) Expand all
27 // |max_resolution| and |min_resolution| are inclusive. 27 // |max_resolution| and |min_resolution| are inclusive.
28 struct MEDIA_EXPORT SupportedProfile { 28 struct MEDIA_EXPORT SupportedProfile {
29 SupportedProfile(); 29 SupportedProfile();
30 ~SupportedProfile(); 30 ~SupportedProfile();
31 VideoCodecProfile profile; 31 VideoCodecProfile profile;
32 gfx::Size max_resolution; 32 gfx::Size max_resolution;
33 gfx::Size min_resolution; 33 gfx::Size min_resolution;
34 }; 34 };
35 using SupportedProfiles = std::vector<SupportedProfile>; 35 using SupportedProfiles = std::vector<SupportedProfile>;
36 36
37 struct MEDIA_EXPORT Capabilities {
38 Capabilities();
39 ~Capabilities();
40 // Flags that can be associated with a VDA.
41 enum Flags {
42 NO_FLAGS = 0,
43
44 // Normally, the VDA is required to be able to provide all PictureBuffers
45 // to the client via PictureReady(), even if the client does not return
46 // any of them via ReusePictureBuffer(). The client is only required to
47 // return PictureBuffers when it holds all of them, if it wants to get
48 // more decoded output. See VideoDecoder::CanReadWithoutStalling for
49 // more context.
50 // If this flag is set, then the VDA does not make this guarantee. The
51 // client must return PictureBuffers to be sure that new frames will be
52 // provided via PictureReady.
Ken Russell (switch to Gerrit) 2015/12/07 22:06:11 I don't know this code, but this semantic seems li
liberato (no reviews please) 2015/12/08 15:55:57 unfortunately, we don't get to choose how many pic
53 CAN_STALL_ANY_TIME = 1 << 0,
54 };
55
56 SupportedProfiles supported_profiles;
57 Flags flags;
58 };
59
37 // Enumeration of potential errors generated by the API. 60 // Enumeration of potential errors generated by the API.
38 // Note: Keep these in sync with PP_VideoDecodeError_Dev. Also do not 61 // Note: Keep these in sync with PP_VideoDecodeError_Dev. Also do not
39 // rearrange, reuse or remove values as they are used for gathering UMA 62 // rearrange, reuse or remove values as they are used for gathering UMA
40 // statistics. 63 // statistics.
41 enum Error { 64 enum Error {
42 // An operation was attempted during an incompatible decoder state. 65 // An operation was attempted during an incompatible decoder state.
43 ILLEGAL_STATE = 1, 66 ILLEGAL_STATE = 1,
44 // Invalid argument was passed to an API method. 67 // Invalid argument was passed to an API method.
45 INVALID_ARGUMENT, 68 INVALID_ARGUMENT,
46 // Encoded input is unreadable. 69 // Encoded input is unreadable.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // Specialize std::default_delete so that scoped_ptr<VideoDecodeAccelerator> 232 // Specialize std::default_delete so that scoped_ptr<VideoDecodeAccelerator>
210 // uses "Destroy()" instead of trying to use the destructor. 233 // uses "Destroy()" instead of trying to use the destructor.
211 template <> 234 template <>
212 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { 235 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> {
213 void operator()(media::VideoDecodeAccelerator* vda) const; 236 void operator()(media::VideoDecodeAccelerator* vda) const;
214 }; 237 };
215 238
216 } // namespace std 239 } // namespace std
217 240
218 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 241 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698