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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "media/base/bitstream_buffer.h" | 13 #include "media/base/bitstream_buffer.h" |
14 #include "media/base/surface_manager.h" | 14 #include "media/base/surface_manager.h" |
15 #include "media/base/video_decoder_config.h" | 15 #include "media/base/video_decoder_config.h" |
16 #include "media/video/picture.h" | 16 #include "media/video/picture.h" |
17 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
| 18 #include "ui/gl/gl_image.h" |
18 | 19 |
19 typedef unsigned int GLenum; | 20 typedef unsigned int GLenum; |
20 | 21 |
21 namespace media { | 22 namespace media { |
22 | 23 |
23 // Video decoder interface. | 24 // Video decoder interface. |
24 // This interface is extended by the various components that ultimately | 25 // This interface is extended by the various components that ultimately |
25 // implement the backend of PPB_VideoDecoder_Dev. | 26 // implement the backend of PPB_VideoDecoder_Dev. |
26 class MEDIA_EXPORT VideoDecodeAccelerator { | 27 class MEDIA_EXPORT VideoDecodeAccelerator { |
27 public: | 28 public: |
28 // Specification of a decoding profile supported by an decoder. | 29 // Specification of a decoding profile supported by an decoder. |
29 // |max_resolution| and |min_resolution| are inclusive. | 30 // |max_resolution| and |min_resolution| are inclusive. |
30 struct MEDIA_EXPORT SupportedProfile { | 31 struct MEDIA_EXPORT SupportedProfile { |
31 SupportedProfile(); | 32 SupportedProfile(); |
32 ~SupportedProfile(); | 33 ~SupportedProfile(); |
33 VideoCodecProfile profile; | 34 VideoCodecProfile profile; |
34 gfx::Size max_resolution; | 35 gfx::Size max_resolution; |
35 gfx::Size min_resolution; | 36 gfx::Size min_resolution; |
36 bool encrypted_only; | 37 bool encrypted_only; |
37 }; | 38 }; |
38 using SupportedProfiles = std::vector<SupportedProfile>; | 39 using SupportedProfiles = std::vector<SupportedProfile>; |
39 | 40 |
| 41 using MakeContextCurrentCallback = base::Callback<bool(void)>; |
| 42 using BindImageCallback = base::Callback< |
| 43 void(uint32_t, uint32_t, scoped_refptr<gl::GLImage>, bool)>; |
| 44 |
40 struct MEDIA_EXPORT Capabilities { | 45 struct MEDIA_EXPORT Capabilities { |
41 Capabilities(); | 46 Capabilities(); |
42 Capabilities(const Capabilities& other); | 47 Capabilities(const Capabilities& other); |
43 ~Capabilities(); | 48 ~Capabilities(); |
44 | 49 |
45 std::string AsHumanReadableString() const; | 50 std::string AsHumanReadableString() const; |
46 | 51 |
47 // Flags that can be associated with a VDA. | 52 // Flags that can be associated with a VDA. |
48 enum Flags { | 53 enum Flags { |
49 NO_FLAGS = 0, | 54 NO_FLAGS = 0, |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // Specialize std::default_delete so that scoped_ptr<VideoDecodeAccelerator> | 257 // Specialize std::default_delete so that scoped_ptr<VideoDecodeAccelerator> |
253 // uses "Destroy()" instead of trying to use the destructor. | 258 // uses "Destroy()" instead of trying to use the destructor. |
254 template <> | 259 template <> |
255 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { | 260 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { |
256 void operator()(media::VideoDecodeAccelerator* vda) const; | 261 void operator()(media::VideoDecodeAccelerator* vda) const; |
257 }; | 262 }; |
258 | 263 |
259 } // namespace std | 264 } // namespace std |
260 | 265 |
261 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 266 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |