OLD | NEW |
---|---|
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 Loading... | |
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 { | |
dcheng
2015/12/10 07:09:48
Is there a convention around sizing the enum expli
liberato (no reviews please)
2015/12/10 15:56:06
i didn't see anything in the style guide about it.
| |
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. | |
53 NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE = 1 << 0, | |
54 }; | |
55 | |
56 SupportedProfiles supported_profiles; | |
57 uint32 flags; | |
dcheng
2015/12/10 07:09:48
Nit: uint32_t (uint32 is going away)
liberato (no reviews please)
2015/12/10 15:56:06
Done, and in gpu_info.h
| |
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 Loading... | |
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_ |
OLD | NEW |