Index: content/common/gpu/media/vaapi_wrapper.h |
diff --git a/content/common/gpu/media/vaapi_wrapper.h b/content/common/gpu/media/vaapi_wrapper.h |
index fe53552336badfe6bf46a3d3b624506820bf352f..4881e347780d92f784a9353922c618f4f9f11f87 100644 |
--- a/content/common/gpu/media/vaapi_wrapper.h |
+++ b/content/common/gpu/media/vaapi_wrapper.h |
@@ -45,10 +45,20 @@ class CONTENT_EXPORT VaapiWrapper { |
kEncode, |
}; |
+ // Create VaapiWrapper. |
Pawel Osciak
2015/01/25 08:51:11
...for VAProfile.
kcwu
2015/01/26 12:12:10
Done.
|
// |report_error_to_uma_cb| will be called independently from reporting |
// errors to clients via method return values. |
static scoped_ptr<VaapiWrapper> Create( |
CodecMode mode, |
+ VAProfile profile, |
+ const base::Closure& report_error_to_uma_cb); |
+ |
+ // Create VaapiWrapper for video codec. It maps VideoCodecProfile |profile| |
Pawel Osciak
2015/01/25 08:51:11
for VideoCodecProfile
kcwu
2015/01/26 12:12:10
Done.
|
+ // to VAProfile according to supported profiles. |
+ // |report_error_to_uma_cb| will be called independently from reporting |
+ // errors to clients via method return values. |
+ static scoped_ptr<VaapiWrapper> CreateForVideoCodec( |
+ CodecMode mode, |
media::VideoCodecProfile profile, |
const base::Closure& report_error_to_uma_cb); |
@@ -118,16 +128,25 @@ class CONTENT_EXPORT VaapiWrapper { |
// Returns true if the VAAPI version is less than the specified version. |
bool VAAPIVersionLessThan(int major, int minor); |
- // Get a VAImage from a VASurface and map it into memory. The VAImage should |
- // be released using the ReturnVaImage function. Returns true when successful. |
- // This is intended for testing only. |
- bool GetVaImageForTesting(VASurfaceID va_surface_id, |
- VAImage* image, |
- void** mem); |
+ // Get a VAImage from a VASurface and map it into memory. The size and format |
+ // are derived from the surface. The VAImage should be released using the |
+ // ReturnVaImage function. Returns true when successful. This is intended |
+ // for testing only. |
Pawel Osciak
2015/01/25 08:51:11
Last sentence not applicable anymore?
kcwu
2015/01/26 12:12:10
Done.
|
+ bool GetDerivedVaImage(VASurfaceID va_surface_id, VAImage* image, void** mem); |
+ |
+ // Get a VAImage from a VASurface |va_surface_id| and map it into memory with |
+ // given |format| and |size|. The output is |image| and the mapped memory is |
+ // |mem|. The VAImage should be released using the ReturnVaImage function. |
+ // Returns true when successful. |
+ bool GetVaImage(VASurfaceID va_surface_id, |
Pawel Osciak
2015/01/25 08:51:11
This is confusing, why would I ever prefer using t
kcwu
2015/01/26 12:12:10
Done.
Add comments about this in GetDerivedVaImage
|
+ VAImageFormat* format, |
+ const gfx::Size& size, |
+ VAImage* image, |
+ void** mem); |
// Release the VAImage (and the associated memory mapping) obtained from |
- // GetVaImage(). This is intended for testing only. |
- void ReturnVaImageForTesting(VAImage* image); |
+ // GetVaImage(). |
Pawel Osciak
2015/01/25 08:51:11
... or GetDeriveVaImage() ?
kcwu
2015/01/26 12:12:10
Done.
|
+ void ReturnVaImage(VAImage* image); |
// Upload contents of |frame| into |va_surface_id| for encode. |
bool UploadVideoFrameToSurface(const scoped_refptr<media::VideoFrame>& frame, |
@@ -163,7 +182,7 @@ class CONTENT_EXPORT VaapiWrapper { |
VaapiWrapper(); |
bool Initialize(CodecMode mode, |
- media::VideoCodecProfile profile, |
+ VAProfile va_profile, |
const base::Closure& report_error__to_uma_cb); |
void Deinitialize(); |
bool VaInitialize(const base::Closure& report_error_to_uma_cb); |