| 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 f600cdfa1d17198d00f4fd67b4b59767ea60795e..3abd39236cf8a3000d9354fd3601e60175051343 100644
|
| --- a/content/common/gpu/media/vaapi_wrapper.h
|
| +++ b/content/common/gpu/media/vaapi_wrapper.h
|
| @@ -20,7 +20,11 @@
|
| #include "content/common/gpu/media/va_surface.h"
|
| #include "media/base/video_decoder_config.h"
|
| #include "media/base/video_frame.h"
|
| +#if defined(USE_X11)
|
| #include "third_party/libva/va/va_x11.h"
|
| +#else
|
| +#include "third_party/libva/va/drm/va_drm.h"
|
| +#endif
|
| #include "ui/gfx/size.h"
|
|
|
| namespace content {
|
| @@ -47,7 +51,11 @@ class CONTENT_EXPORT VaapiWrapper {
|
| static scoped_ptr<VaapiWrapper> Create(
|
| CodecMode mode,
|
| media::VideoCodecProfile profile,
|
| - Display* x_display,
|
| +#if defined(USE_X11)
|
| + Display* display,
|
| +#else
|
| + int display,
|
| +#endif
|
| const base::Closure& report_error_to_uma_cb);
|
|
|
| ~VaapiWrapper();
|
| @@ -92,12 +100,31 @@ class CONTENT_EXPORT VaapiWrapper {
|
| // buffers. Return false if Execute() fails.
|
| bool ExecuteAndDestroyPendingBuffers(VASurfaceID va_surface_id);
|
|
|
| +#if defined(USE_X11)
|
| // Put data from |va_surface_id| into |x_pixmap| of size |size|,
|
| // converting/scaling to it.
|
| bool PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
|
| Pixmap x_pixmap,
|
| gfx::Size dest_size);
|
| +#else
|
| + // Create RGB image of size |size|, assigning it to |image|.
|
| + bool CreateRGBImage(gfx::Size size, VAImage* image);
|
|
|
| + // Destroy |image|. Should call DestroyImage before destroying the surface it
|
| + // is bound to.
|
| + void DestroyImage(VAImage* image);
|
| +
|
| + // Map data store of the |buffer| into the |image|'s.
|
| + bool MapImage(VAImage* image, void** buffer);
|
| +
|
| + // Unmap |image|. This must happens after making changes to a mapped data
|
| + // store, so the server knows that the data is ready to be consumed.
|
| + void UnmapImage(VAImage* image);
|
| +
|
| + // Put data from |va_surface_id| into |va_image|, converting/scaling it.
|
| + bool PutSurfaceIntoImage(VASurfaceID va_surface_id,
|
| + VAImage* va_image);
|
| +#endif
|
| // Returns true if the VAAPI version is less than the specified version.
|
| bool VAAPIVersionLessThan(int major, int minor);
|
|
|
| @@ -139,7 +166,11 @@ class CONTENT_EXPORT VaapiWrapper {
|
|
|
| bool Initialize(CodecMode mode,
|
| media::VideoCodecProfile profile,
|
| +#if defined(USE_X11)
|
| Display* x_display,
|
| +#else
|
| + int display,
|
| +#endif
|
| const base::Closure& report_error__to_uma_cb);
|
| void Deinitialize();
|
|
|
|
|