| 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/video_decoder_config.h" | 15 #include "media/base/video_decoder_config.h" |
| 15 #include "media/video/picture.h" | 16 #include "media/video/picture.h" |
| 16 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
| 17 | 18 |
| 18 typedef unsigned int GLenum; | 19 typedef unsigned int GLenum; |
| 19 | 20 |
| 20 namespace media { | 21 namespace media { |
| 21 | 22 |
| 22 // Video decoder interface. | 23 // Video decoder interface. |
| 23 // This interface is extended by the various components that ultimately | 24 // This interface is extended by the various components that ultimately |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // A failure occurred at the browser layer or one of its dependencies. | 76 // A failure occurred at the browser layer or one of its dependencies. |
| 76 // Examples of such failures include GPU hardware failures, GPU driver | 77 // Examples of such failures include GPU hardware failures, GPU driver |
| 77 // failures, GPU library failures, browser programming errors, and so on. | 78 // failures, GPU library failures, browser programming errors, and so on. |
| 78 PLATFORM_FAILURE, | 79 PLATFORM_FAILURE, |
| 79 // Largest used enum. This should be adjusted when new errors are added. | 80 // Largest used enum. This should be adjusted when new errors are added. |
| 80 LARGEST_ERROR_ENUM, | 81 LARGEST_ERROR_ENUM, |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 // Config structure contains parameters required for the VDA initialization. | 84 // Config structure contains parameters required for the VDA initialization. |
| 84 struct MEDIA_EXPORT Config { | 85 struct MEDIA_EXPORT Config { |
| 85 enum { kNoSurfaceID = -1 }; | 86 enum { kNoSurfaceID = SurfaceManager::kNoSurfaceID }; |
| 86 | 87 |
| 87 Config() = default; | 88 Config() = default; |
| 88 Config(VideoCodecProfile profile); | 89 Config(VideoCodecProfile profile); |
| 89 Config(const VideoDecoderConfig& video_decoder_config); | 90 Config(const VideoDecoderConfig& video_decoder_config); |
| 90 | 91 |
| 91 std::string AsHumanReadableString() const; | 92 std::string AsHumanReadableString() const; |
| 92 | 93 |
| 93 // |profile| combines the information about the codec and its profile. | 94 // |profile| combines the information about the codec and its profile. |
| 94 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; | 95 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; |
| 95 | 96 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // Specialize std::default_delete so that scoped_ptr<VideoDecodeAccelerator> | 246 // Specialize std::default_delete so that scoped_ptr<VideoDecodeAccelerator> |
| 246 // uses "Destroy()" instead of trying to use the destructor. | 247 // uses "Destroy()" instead of trying to use the destructor. |
| 247 template <> | 248 template <> |
| 248 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { | 249 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { |
| 249 void operator()(media::VideoDecodeAccelerator* vda) const; | 250 void operator()(media::VideoDecodeAccelerator* vda) const; |
| 250 }; | 251 }; |
| 251 | 252 |
| 252 } // namespace std | 253 } // namespace std |
| 253 | 254 |
| 254 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 255 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |