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