Chromium Code Reviews| 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 typedef base::Callback<bool(void)> MakeContextCurrentCallback; | |
| 42 typedef base::Callback< | |
| 43 void(uint32_t, uint32_t, scoped_refptr<gl::GLImage>, bool)> | |
| 44 BindImageCallback; | |
|
sandersd (OOO until July 31)
2016/03/22 21:32:29
Nit: prefer using syntax (see line 39).
ccameron
2016/03/22 22:00:04
Done.
| |
| 45 | |
| 40 struct MEDIA_EXPORT Capabilities { | 46 struct MEDIA_EXPORT Capabilities { |
| 41 Capabilities(); | 47 Capabilities(); |
| 42 Capabilities(const Capabilities& other); | 48 Capabilities(const Capabilities& other); |
| 43 ~Capabilities(); | 49 ~Capabilities(); |
| 44 | 50 |
| 45 std::string AsHumanReadableString() const; | 51 std::string AsHumanReadableString() const; |
| 46 | 52 |
| 47 // Flags that can be associated with a VDA. | 53 // Flags that can be associated with a VDA. |
| 48 enum Flags { | 54 enum Flags { |
| 49 NO_FLAGS = 0, | 55 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> | 258 // Specialize std::default_delete so that scoped_ptr<VideoDecodeAccelerator> |
| 253 // uses "Destroy()" instead of trying to use the destructor. | 259 // uses "Destroy()" instead of trying to use the destructor. |
| 254 template <> | 260 template <> |
| 255 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { | 261 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { |
| 256 void operator()(media::VideoDecodeAccelerator* vda) const; | 262 void operator()(media::VideoDecodeAccelerator* vda) const; |
| 257 }; | 263 }; |
| 258 | 264 |
| 259 } // namespace std | 265 } // namespace std |
| 260 | 266 |
| 261 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 267 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |