| 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 "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "media/base/bitstream_buffer.h" | 15 #include "media/base/bitstream_buffer.h" |
| 16 #include "media/base/cdm_context.h" | 16 #include "media/base/cdm_context.h" |
| 17 #include "media/base/encryption_scheme.h" |
| 17 #include "media/base/surface_manager.h" | 18 #include "media/base/surface_manager.h" |
| 18 #include "media/base/video_decoder_config.h" | 19 #include "media/base/video_decoder_config.h" |
| 19 #include "media/video/picture.h" | 20 #include "media/video/picture.h" |
| 20 #include "ui/gfx/geometry/size.h" | 21 #include "ui/gfx/geometry/size.h" |
| 21 #include "ui/gfx/gpu_memory_buffer.h" | 22 #include "ui/gfx/gpu_memory_buffer.h" |
| 22 | 23 |
| 23 typedef unsigned int GLenum; | 24 typedef unsigned int GLenum; |
| 24 | 25 |
| 25 namespace base { | 26 namespace base { |
| 26 class SingleThreadTaskRunner; | 27 class SingleThreadTaskRunner; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 Config(); | 121 Config(); |
| 121 Config(const Config& config); | 122 Config(const Config& config); |
| 122 | 123 |
| 123 // Intentional converting constructor. | 124 // Intentional converting constructor. |
| 124 // TODO(watk): Make this explicit. | 125 // TODO(watk): Make this explicit. |
| 125 Config(VideoCodecProfile profile); | 126 Config(VideoCodecProfile profile); |
| 126 | 127 |
| 127 ~Config(); | 128 ~Config(); |
| 128 | 129 |
| 129 std::string AsHumanReadableString() const; | 130 std::string AsHumanReadableString() const; |
| 131 bool is_encrypted() const { return encryption_scheme.is_encrypted(); } |
| 130 | 132 |
| 131 // The video codec and profile. | 133 // The video codec and profile. |
| 132 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; | 134 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; |
| 133 | 135 |
| 134 // Whether the stream is encrypted. | 136 // Whether the stream is encrypted, and, if so, the scheme used. |
| 135 bool is_encrypted = false; | 137 EncryptionScheme encryption_scheme; |
| 136 | 138 |
| 137 // The CDM that the VDA should use to decode encrypted streams. Must be | 139 // The CDM that the VDA should use to decode encrypted streams. Must be |
| 138 // set to a valid ID if |is_encrypted|. | 140 // set to a valid ID if |is_encrypted|. |
| 139 int cdm_id = CdmContext::kInvalidCdmId; | 141 int cdm_id = CdmContext::kInvalidCdmId; |
| 140 | 142 |
| 141 // Whether the client supports deferred initialization. | 143 // Whether the client supports deferred initialization. |
| 142 bool is_deferred_initialization_allowed = false; | 144 bool is_deferred_initialization_allowed = false; |
| 143 | 145 |
| 144 // An optional graphics surface that the VDA should render to. For setting | 146 // An optional graphics surface that the VDA should render to. For setting |
| 145 // an output SurfaceView on Android. It's only valid when not equal to | 147 // an output SurfaceView on Android. It's only valid when not equal to |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 // std::unique_ptr<VideoDecodeAccelerator> uses "Destroy()" instead of trying to | 355 // std::unique_ptr<VideoDecodeAccelerator> uses "Destroy()" instead of trying to |
| 354 // use the destructor. | 356 // use the destructor. |
| 355 template <> | 357 template <> |
| 356 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { | 358 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { |
| 357 void operator()(media::VideoDecodeAccelerator* vda) const; | 359 void operator()(media::VideoDecodeAccelerator* vda) const; |
| 358 }; | 360 }; |
| 359 | 361 |
| 360 } // namespace std | 362 } // namespace std |
| 361 | 363 |
| 362 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 364 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |