Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODER_H_ | |
| 6 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "content/common/content_export.h" | |
| 10 #include "content/common/gpu/media/vaapi_wrapper.h" | |
| 11 | |
| 12 namespace media { | |
| 13 struct JpegParseResult; | |
| 14 } // namespace media | |
| 15 | |
| 16 namespace content { | |
| 17 | |
| 18 // A JPEG decoder that utilizes VA-API hardware video decode acceleration on | |
| 19 // Intel systems. Provides functionality to allow plugging VAAPI HW | |
| 20 // acceleration into the JDA framework. | |
| 21 // | |
| 22 // Clients of this class are expected to manage VA surfaces created via | |
| 23 // VaapiWrapper, parse JPEG picture via ParseJpegPicture, and then pass them to | |
| 24 // this class. | |
| 25 // | |
| 26 // This class must be called on a single thread, and does nothing internally on | |
| 27 // any other thread. | |
| 28 class CONTENT_EXPORT VaapiJpegDecoder { | |
| 29 public: | |
| 30 // |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.
| |
| 31 VaapiJpegDecoder(VaapiWrapper* vaapi_wrapper); | |
| 32 | |
| 33 ~VaapiJpegDecoder(); | |
| 34 | |
| 35 // Decode a JPEG picture. It will fill VA-API parameters and call | |
| 36 // 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.
| |
| 37 // |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.
| |
| 38 // Return false on failure. | |
| 39 bool Decode(const media::JpegParseResult& parse_result, | |
| 40 VASurfaceID va_surface); | |
| 41 | |
| 42 private: | |
| 43 VaapiWrapper* vaapi_wrapper_; | |
| 44 | |
| 45 DISALLOW_COPY_AND_ASSIGN(VaapiJpegDecoder); | |
| 46 }; | |
| 47 | |
| 48 } // namespace content | |
| 49 | |
| 50 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODER_H_ | |
| OLD | NEW |