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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "media/base/bitstream_buffer.h" | 11 #include "media/base/bitstream_buffer.h" |
12 #include "media/base/video_decoder_config.h" | 12 #include "media/base/video_decoder_config.h" |
13 #include "media/video/picture.h" | 13 #include "media/video/picture.h" |
14 #include "ui/gfx/geometry/size.h" | 14 #include "ui/gfx/geometry/size.h" |
15 | 15 |
16 typedef unsigned int GLenum; | 16 typedef unsigned int GLenum; |
17 | 17 |
18 namespace media { | 18 namespace media { |
19 | 19 |
20 // Video decoder interface. | 20 // Video decoder interface. |
21 // This interface is extended by the various components that ultimately | 21 // This interface is extended by the various components that ultimately |
22 // implement the backend of PPB_VideoDecode_Dev. | 22 // implement the backend of PPB_VideoDecode_Dev. |
23 class MEDIA_EXPORT VideoDecodeAccelerator { | 23 class MEDIA_EXPORT VideoDecodeAccelerator { |
24 public: | 24 public: |
25 // Specification of a decoding profile supported by an decoder. | |
26 // |max_resolution| and |min_resolution| are inclusive. | |
27 struct SupportedProfile { | |
wuchengli
2015/04/10 02:49:35
I think this needs MEDIA_EXPORT. Same for VEA::Sup
| |
28 SupportedProfile(); | |
29 ~SupportedProfile(); | |
30 VideoCodecProfile profile; | |
31 gfx::Size max_resolution; | |
32 gfx::Size min_resolution; | |
33 }; | |
34 using SupportedProfiles = std::vector<SupportedProfile>; | |
35 | |
25 // Enumeration of potential errors generated by the API. | 36 // Enumeration of potential errors generated by the API. |
26 // Note: Keep these in sync with PP_VideoDecodeError_Dev. Also do not | 37 // Note: Keep these in sync with PP_VideoDecodeError_Dev. Also do not |
27 // rearrange, reuse or remove values as they are used for gathering UMA | 38 // rearrange, reuse or remove values as they are used for gathering UMA |
28 // statistics. | 39 // statistics. |
29 enum Error { | 40 enum Error { |
30 // An operation was attempted during an incompatible decoder state. | 41 // An operation was attempted during an incompatible decoder state. |
31 ILLEGAL_STATE = 1, | 42 ILLEGAL_STATE = 1, |
32 // Invalid argument was passed to an API method. | 43 // Invalid argument was passed to an API method. |
33 INVALID_ARGUMENT, | 44 INVALID_ARGUMENT, |
34 // Encoded input is unreadable. | 45 // Encoded input is unreadable. |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
166 // uses "Destroy()" instead of trying to use the destructor. | 177 // uses "Destroy()" instead of trying to use the destructor. |
167 template <> | 178 template <> |
168 struct MEDIA_EXPORT DefaultDeleter<media::VideoDecodeAccelerator> { | 179 struct MEDIA_EXPORT DefaultDeleter<media::VideoDecodeAccelerator> { |
169 public: | 180 public: |
170 void operator()(void* video_decode_accelerator) const; | 181 void operator()(void* video_decode_accelerator) const; |
171 }; | 182 }; |
172 | 183 |
173 } // namespace base | 184 } // namespace base |
174 | 185 |
175 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 186 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |