summaryrefslogtreecommitdiff
path: root/src/va.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/va.c')
-rw-r--r--src/va.c69
1 files changed, 10 insertions, 59 deletions
diff --git a/src/va.c b/src/va.c
index b409c7c..dbfcd31 100644
--- a/src/va.c
+++ b/src/va.c
@@ -56,7 +56,11 @@
static int va_debug_trace = 0;
-int vaDisplayIsValid(VADisplay dpy);
+static int vaDisplayIsValid(VADisplay dpy)
+{
+ VADisplayContextP pDisplayContext = (VADisplayContextP)dpy;
+ return pDisplayContext && pDisplayContext->vaIsValid(pDisplayContext);
+}
static void va_errorMessage(const char *msg, ...)
{
@@ -217,7 +221,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
CHECK_VTABLE(vaStatus, ctx, SetImagePalette);
CHECK_VTABLE(vaStatus, ctx, GetImage);
CHECK_VTABLE(vaStatus, ctx, PutImage);
- CHECK_VTABLE(vaStatus, ctx, PutImage2);
CHECK_VTABLE(vaStatus, ctx, QuerySubpictureFormats);
CHECK_VTABLE(vaStatus, ctx, CreateSubpicture);
CHECK_VTABLE(vaStatus, ctx, DestroySubpicture);
@@ -225,7 +228,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
CHECK_VTABLE(vaStatus, ctx, SetSubpictureChromakey);
CHECK_VTABLE(vaStatus, ctx, SetSubpictureGlobalAlpha);
CHECK_VTABLE(vaStatus, ctx, AssociateSubpicture);
- CHECK_VTABLE(vaStatus, ctx, AssociateSubpicture2);
CHECK_VTABLE(vaStatus, ctx, DeassociateSubpicture);
CHECK_VTABLE(vaStatus, ctx, QueryDisplayAttributes);
CHECK_VTABLE(vaStatus, ctx, GetDisplayAttributes);
@@ -707,7 +709,6 @@ VAStatus vaEndPicture (
VAStatus vaSyncSurface (
VADisplay dpy,
- VAContextID context,
VASurfaceID render_target
)
{
@@ -716,7 +717,7 @@ VAStatus vaSyncSurface (
ctx = CTX(dpy);
TRACE(vaSyncSurface);
- return ctx->vtable.vaSyncSurface( ctx, context, render_target );
+ return ctx->vtable.vaSyncSurface( ctx, render_target );
}
VAStatus vaQuerySurfaceStatus (
@@ -871,30 +872,6 @@ VAStatus vaPutImage (
VAImageID image,
int src_x,
int src_y,
- unsigned int width,
- unsigned int height,
- int dest_x,
- int dest_y
-)
-{
- VADriverContextP ctx;
- CHECK_DISPLAY(dpy);
- ctx = CTX(dpy);
-
- TRACE(vaPutImage);
- return ctx->vtable.vaPutImage ( ctx, surface, image, src_x, src_y, width, height, dest_x, dest_y );
-}
-
-/*
- * Similar to vaPutImage but with additional destination width
- * and height arguments to enable scaling
- */
-VAStatus vaPutImage2 (
- VADisplay dpy,
- VASurfaceID surface,
- VAImageID image,
- int src_x,
- int src_y,
unsigned int src_width,
unsigned int src_height,
int dest_x,
@@ -907,8 +884,8 @@ VAStatus vaPutImage2 (
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
- TRACE(vaPutImage2);
- return ctx->vtable.vaPutImage2 ( ctx, surface, image, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height );
+ TRACE(vaPutImage);
+ return ctx->vtable.vaPutImage ( ctx, surface, image, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height );
}
/*
@@ -1092,32 +1069,6 @@ VAStatus vaAssociateSubpicture (
int num_surfaces,
short src_x, /* upper left offset in subpicture */
short src_y,
- short dest_x, /* upper left offset in surface */
- short dest_y,
- unsigned short width,
- unsigned short height,
- /*
- * whether to enable chroma-keying or global-alpha
- * see VA_SUBPICTURE_XXX values
- */
- unsigned int flags
-)
-{
- VADriverContextP ctx;
- CHECK_DISPLAY(dpy);
- ctx = CTX(dpy);
-
- TRACE(vaAssociateSubpicture);
- return ctx->vtable.vaAssociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, dest_x, dest_y, width, height, flags );
-}
-
-VAStatus vaAssociateSubpicture2 (
- VADisplay dpy,
- VASubpictureID subpicture,
- VASurfaceID *target_surfaces,
- int num_surfaces,
- short src_x, /* upper left offset in subpicture */
- short src_y,
unsigned short src_width,
unsigned short src_height,
short dest_x, /* upper left offset in surface */
@@ -1135,8 +1086,8 @@ VAStatus vaAssociateSubpicture2 (
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
- TRACE(vaAssociateSubpicture2);
- return ctx->vtable.vaAssociateSubpicture2 ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height, flags );
+ TRACE(vaAssociateSubpicture);
+ return ctx->vtable.vaAssociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height, flags );
}
/*