From 49d13f76ca727488de8622a8d176b5f71853bc61 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 17 Mar 2014 18:22:35 +0100 Subject: vaapi: make struct va_surface private It's not really needed to be public. Other code can just use mp_image. The only disadvantage is that the other code needs to call an accessor to get the VASurfaceID. --- video/vaapi.h | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'video/vaapi.h') diff --git a/video/vaapi.h b/video/vaapi.h index 0396d01320..c555161999 100644 --- a/video/vaapi.h +++ b/video/vaapi.h @@ -81,16 +81,8 @@ struct mp_vaapi_ctx { struct va_image_formats *image_formats; }; -struct va_surface_pool; struct va_image_formats; -struct va_surface { - VASurfaceID id; // VA_INVALID_ID if unallocated - int w, h, rt_format; // parameters of allocated image (0/0/-1 unallocated) - - struct va_surface_priv *p; -}; - bool check_va_status(struct mp_log *log, VAStatus status, const char *msg); #define CHECK_VA_STATUS(ctx, msg) check_va_status((ctx)->log, status, msg) @@ -109,14 +101,12 @@ bool va_image_unmap(struct mp_vaapi_ctx *ctx, VAImage *image void va_pool_set_allocator(struct mp_image_pool *pool, struct mp_vaapi_ctx *ctx, int rt_format); -struct va_surface * va_surface_in_mp_image(struct mp_image *mpi); -VASurfaceID va_surface_id(const struct va_surface *surface); -VASurfaceID va_surface_id_in_mp_image(const struct mp_image *mpi); -bool va_surface_upload(struct va_surface *surface, struct mp_image *mpi); -struct mp_image * va_surface_download(struct va_surface *surface, - struct mp_image_pool *pool); +VASurfaceID va_surface_id(struct mp_image *mpi); +int va_surface_rt_format(struct mp_image *mpi); +struct mp_image *va_surface_download(struct mp_image *src, + struct mp_image_pool *pool); -int va_surface_image_alloc_imgfmt(struct mp_image *img, int imgfmt); -int va_surface_upload_image(struct mp_image *va_dst, struct mp_image *sw_src); +int va_surface_alloc_imgfmt(struct mp_image *img, int imgfmt); +int va_surface_upload(struct mp_image *va_dst, struct mp_image *sw_src); #endif -- cgit v1.2.3