Chromium Code Reviews| Index: content/common/gpu/media/vaapi_jpeg_decoder.h |
| diff --git a/content/common/gpu/media/vaapi_jpeg_decoder.h b/content/common/gpu/media/vaapi_jpeg_decoder.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c5d7f3f0a0909ef2ce6ff6d8f8d2210c9295c5f5 |
| --- /dev/null |
| +++ b/content/common/gpu/media/vaapi_jpeg_decoder.h |
| @@ -0,0 +1,50 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODER_H_ |
| +#define CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODER_H_ |
| + |
| +#include "base/macros.h" |
| +#include "content/common/content_export.h" |
| +#include "content/common/gpu/media/vaapi_wrapper.h" |
| + |
| +namespace media { |
| +struct JpegParseResult; |
| +} // namespace media |
| + |
| +namespace content { |
| + |
| +// A JPEG decoder that utilizes VA-API hardware video decode acceleration on |
| +// Intel systems. Provides functionality to allow plugging VAAPI HW |
| +// acceleration into the JDA framework. |
| +// |
| +// Clients of this class are expected to manage VA surfaces created via |
| +// VaapiWrapper, parse JPEG picture via ParseJpegPicture, and then pass them to |
| +// this class. |
| +// |
| +// This class must be called on a single thread, and does nothing internally on |
| +// any other thread. |
| +class CONTENT_EXPORT VaapiJpegDecoder { |
| + public: |
| + // |vaapi_wrapper| should be initialized. |
|
Owen Lin
2015/01/19 09:29:31
Can you explain more on what the wrapper you would
kcwu
2015/01/19 09:58:18
Done.
|
| + VaapiJpegDecoder(VaapiWrapper* vaapi_wrapper); |
| + |
| + ~VaapiJpegDecoder(); |
| + |
| + // Decode a JPEG picture. It will fill VA-API parameters and call |
| + // cooresponding VA-API methods according to parsed JPEG result |
|
Owen Lin
2015/01/19 09:29:31
s/cooresponding/corresponding/
kcwu
2015/01/19 09:58:17
Done.
|
| + // |parse_result|. Decoded data will be output to given |va_surface|. |
|
Owen Lin
2015/01/19 09:29:31
be outputted to the given ?
kcwu
2015/01/19 09:58:18
Done.
|
| + // Return false on failure. |
| + bool Decode(const media::JpegParseResult& parse_result, |
| + VASurfaceID va_surface); |
| + |
| + private: |
| + VaapiWrapper* vaapi_wrapper_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(VaapiJpegDecoder); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODER_H_ |