summaryrefslogtreecommitdiffstats
path: root/video/vaapi.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-03-17 18:22:35 +0100
committerwm4 <wm4@nowhere>2014-03-17 18:22:35 +0100
commit49d13f76ca727488de8622a8d176b5f71853bc61 (patch)
tree03a8a9f3ae0d2372075f563ad4220fc571f81e38 /video/vaapi.h
parent31fc5e85636f8e7b3bec5f133cb82b78e3c86ddb (diff)
downloadmpv-49d13f76ca727488de8622a8d176b5f71853bc61.tar.bz2
mpv-49d13f76ca727488de8622a8d176b5f71853bc61.tar.xz
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.
Diffstat (limited to 'video/vaapi.h')
-rw-r--r--video/vaapi.h22
1 files changed, 6 insertions, 16 deletions
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