diff options
author | Waldo Bastian <waldo.bastian@intel.com> | 2007-11-07 10:47:56 -0800 |
---|---|---|
committer | Waldo Bastian <waldo.bastian@intel.com> | 2007-11-07 10:47:56 -0800 |
commit | d2e4f9b2a5e144081223c905304a1b97fa51eb91 (patch) | |
tree | 39de228842af1f5c483986712afd595527ae9ead /src/va.c | |
parent | a0e81bbb0b3a4756b8ef3fe50733786ded414922 (diff) |
Update to VA API 0.26
- Combine vaCreateBuffer and vaBufferData
Diffstat (limited to 'src/va.c')
-rw-r--r-- | src/va.c | 28 |
1 files changed, 8 insertions, 20 deletions
@@ -36,7 +36,7 @@ #define DEFAULT_DRIVER_DIR "/usr/X11R6/lib/modules/dri" #define DRIVER_EXTENSION "_drv_video.so" -#define DRIVER_INIT_FUNC "__vaDriverInit_0_25" +#define DRIVER_INIT_FUNC "__vaDriverInit_0_26" #define CTX(dpy) ((VADriverContextP) dpy ); #define CHECK_CONTEXT(dpy) if( !vaContextIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } @@ -279,7 +279,6 @@ static VAStatus va_openDriver(VADriverContextP ctx, char *driver_name) CHECK_VTABLE(vaStatus, ctx, CreateContext); CHECK_VTABLE(vaStatus, ctx, DestroyContext); CHECK_VTABLE(vaStatus, ctx, CreateBuffer); - CHECK_VTABLE(vaStatus, ctx, BufferData); CHECK_VTABLE(vaStatus, ctx, BufferSetNumElements); CHECK_VTABLE(vaStatus, ctx, MapBuffer); CHECK_VTABLE(vaStatus, ctx, UnmapBuffer); @@ -656,30 +655,19 @@ VAStatus vaDestroyContext ( VAStatus vaCreateBuffer ( VADisplay dpy, - VABufferType type, /* in */ - VABufferID *buf_id /* out */ + VAContextID context, /* in */ + VABufferType type, /* in */ + unsigned int size, /* in */ + unsigned int num_elements, /* in */ + void *data, /* in */ + VABufferID *buf_id /* out */ ) { VADriverContextP ctx = CTX(dpy); CHECK_CONTEXT(ctx); TRACE(vaCreateBuffer); - return ctx->vtable.vaCreateBuffer( ctx, type, buf_id); -} - -VAStatus vaBufferData ( - VADisplay dpy, - VABufferID buf_id, /* in */ - unsigned int size, /* in */ - unsigned int num_elements, /* in */ - void *data /* in */ -) -{ - VADriverContextP ctx = CTX(dpy); - CHECK_CONTEXT(ctx); - - TRACE(vaBufferData); - return ctx->vtable.vaBufferData( ctx, buf_id, size, num_elements, data); + return ctx->vtable.vaCreateBuffer( ctx, context, type, size, num_elements, data, buf_id); } VAStatus vaBufferSetNumElements ( |