From 8de3509ff26510ef02a00fdda78c3431b4329253 Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Tue, 25 Sep 2007 16:21:28 -0700 Subject: Update VA API to v0.24 --- dummy_drv_video/Makefile.am | 4 +- dummy_drv_video/dummy_drv_video.c | 96 +++++++++++++++++++++++++++++++-------- dummy_drv_video/dummy_drv_video.h | 1 + 3 files changed, 80 insertions(+), 21 deletions(-) (limited to 'dummy_drv_video') diff --git a/dummy_drv_video/Makefile.am b/dummy_drv_video/Makefile.am index feb2f8b..643f53c 100644 --- a/dummy_drv_video/Makefile.am +++ b/dummy_drv_video/Makefile.am @@ -22,8 +22,8 @@ dummy_drv_video_la_LTLIBRARIES = dummy_drv_video.la dummy_drv_video_ladir = /usr/X11R6/lib/modules/dri -dummy_drv_video_la_LDFLAGS = -no-undefined -module -Wl,--no-undefined -dummy_drv_video_la_LIBADD = -lva +dummy_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined +dummy_drv_video_la_LIBADD = ../src/libva.la AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/../../include/external/ -I$(top_srcdir)/../../include/kmd dummy_drv_video_la_SOURCES = dummy_drv_video.c object_heap.c diff --git a/dummy_drv_video/dummy_drv_video.c b/dummy_drv_video/dummy_drv_video.c index ce600aa..4ec2a55 100644 --- a/dummy_drv_video/dummy_drv_video.c +++ b/dummy_drv_video/dummy_drv_video.c @@ -141,7 +141,7 @@ VAStatus dummy_QueryConfigEntrypoints( return VA_STATUS_SUCCESS; } -VAStatus dummy_QueryConfigAttributes( +VAStatus dummy_GetConfigAttributes( VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoint, @@ -312,7 +312,27 @@ VAStatus dummy_CreateConfig( return vaStatus; } -VAStatus dummy_GetConfigAttributes( +VAStatus dummy_DestroyConfig( + VADriverContextP ctx, + VAConfigID config_id + ) +{ + INIT_DRIVER_DATA + VAStatus vaStatus; + object_config_p obj_config; + + obj_config = CONFIG(config_id); + if (NULL == obj_config) + { + vaStatus = VA_STATUS_ERROR_INVALID_CONFIG; + return vaStatus; + } + + object_heap_free( &driver_data->config_heap, (object_base_p) obj_config); + return VA_STATUS_SUCCESS; +} + +VAStatus dummy_QueryConfigAttributes( VADriverContextP ctx, VAConfigID config_id, VAProfile *profile, /* out */ @@ -717,11 +737,14 @@ VAStatus dummy_CreateBuffer( { case VAPictureParameterBufferType: case VAIQMatrixBufferType: + case VABitPlaneBufferType: + case VASliceGroupMapBufferType: case VASliceParameterBufferType: case VASliceDataBufferType: case VAMacroblockParameterBufferType: case VAResidualDataBufferType: case VADeblockingParameterBufferType: + case VAImageBufferType: /* Ok */ break; default: @@ -1010,32 +1033,62 @@ VAStatus dummy_PutSurface( unsigned short desth, VARectangle *cliprects, /* client supplied clip list */ unsigned int number_cliprects, /* number of clip rects in the clip list */ - int flags /* de-interlacing flags */ + unsigned int flags /* de-interlacing flags */ ) { /* TODO */ return VA_STATUS_ERROR_UNKNOWN; } +/* + * Query display attributes + * The caller must provide a "attr_list" array that can hold at + * least vaMaxNumDisplayAttributes() entries. The actual number of attributes + * returned in "attr_list" is returned in "num_attributes". + */ +VAStatus dummy_QueryDisplayAttributes ( + VADriverContextP ctx, + VADisplayAttribute *attr_list, /* out */ + int *num_attributes /* out */ + ) +{ + /* TODO */ + return VA_STATUS_ERROR_UNKNOWN; +} -VAStatus dummy_CopySurfaceToGLXPbuffer ( - VADriverContextP ctx, - VASurface *surface, - XID pbuffer_id, - short srcx, - short srcy, - unsigned short width, - unsigned short height, - short destx, - short desty, - unsigned int draw_buffer, - unsigned int flags /* de-interlacing flags */ -) +/* + * Get display attributes + * This function returns the current attribute values in "attr_list". + * Only attributes returned with VA_DISPLAY_ATTRIB_GETTABLE set in the "flags" field + * from vaQueryDisplayAttributes() can have their values retrieved. + */ +VAStatus dummy_GetDisplayAttributes ( + VADriverContextP ctx, + VADisplayAttribute *attr_list, /* in/out */ + int num_attributes + ) { /* TODO */ return VA_STATUS_ERROR_UNKNOWN; } +/* + * Set display attributes + * Only attributes returned with VA_DISPLAY_ATTRIB_SETTABLE set in the "flags" field + * from vaQueryDisplayAttributes() can be set. If the attribute is not settable or + * the value is out of range, the function returns VA_STATUS_ERROR_ATTR_NOT_SUPPORTED + */ +VAStatus dummy_SetDisplayAttributes ( + VADriverContextP ctx, + VADisplayAttribute *attr_list, + int num_attributes + ) +{ + /* TODO */ + return VA_STATUS_ERROR_UNKNOWN; +} + + VAStatus dummy_DbgCopySurfaceToBuffer( VADriverContextP ctx, VASurface *surface, @@ -1087,7 +1140,7 @@ VAStatus dummy_Terminate( VADriverContextP ctx ) return VA_STATUS_SUCCESS; } -VAStatus __vaDriverInit_0_23( VADriverContextP ctx ) +VAStatus __vaDriverInit_0_24( VADriverContextP ctx ) { object_base_p obj; int result; @@ -1095,12 +1148,13 @@ VAStatus __vaDriverInit_0_23( VADriverContextP ctx ) int i; ctx->version_major = 0; - ctx->version_minor = 22; + ctx->version_minor = 24; ctx->max_profiles = DUMMY_MAX_PROFILES; ctx->max_entrypoints = DUMMY_MAX_ENTRYPOINTS; ctx->max_attributes = DUMMY_MAX_CONFIG_ATTRIBUTES; ctx->max_image_formats = DUMMY_MAX_IMAGE_FORMATS; ctx->max_subpic_formats = DUMMY_MAX_SUBPIC_FORMATS; + ctx->max_display_attributes = DUMMY_MAX_DISPLAY_ATTRIBUTES; ctx->vtable.vaTerminate = dummy_Terminate; ctx->vtable.vaQueryConfigEntrypoints = dummy_QueryConfigEntrypoints; @@ -1108,6 +1162,7 @@ VAStatus __vaDriverInit_0_23( VADriverContextP ctx ) ctx->vtable.vaQueryConfigEntrypoints = dummy_QueryConfigEntrypoints; ctx->vtable.vaQueryConfigAttributes = dummy_QueryConfigAttributes; ctx->vtable.vaCreateConfig = dummy_CreateConfig; + ctx->vtable.vaDestroyConfig = dummy_DestroyConfig; ctx->vtable.vaGetConfigAttributes = dummy_GetConfigAttributes; ctx->vtable.vaCreateSurfaces = dummy_CreateSurfaces; ctx->vtable.vaDestroySurface = dummy_DestroySurface; @@ -1125,7 +1180,6 @@ VAStatus __vaDriverInit_0_23( VADriverContextP ctx ) ctx->vtable.vaSyncSurface = dummy_SyncSurface; ctx->vtable.vaQuerySurfaceStatus = dummy_QuerySurfaceStatus; ctx->vtable.vaPutSurface = dummy_PutSurface; - ctx->vtable.vaCopySurfaceToGLXPbuffer = dummy_CopySurfaceToGLXPbuffer; ctx->vtable.vaQueryImageFormats = dummy_QueryImageFormats; ctx->vtable.vaCreateImage = dummy_CreateImage; ctx->vtable.vaDestroyImage = dummy_DestroyImage; @@ -1139,6 +1193,10 @@ VAStatus __vaDriverInit_0_23( VADriverContextP ctx ) ctx->vtable.vaSetSubpictureChromakey = dummy_SetSubpictureChromakey; ctx->vtable.vaSetSubpictureGlobalAlpha = dummy_SetSubpictureGlobalAlpha; ctx->vtable.vaAssociateSubpicture = dummy_AssociateSubpicture; + ctx->vtable.vaQueryDisplayAttributes = dummy_QueryDisplayAttributes; + ctx->vtable.vaGetDisplayAttributes = dummy_GetDisplayAttributes; + ctx->vtable.vaSetDisplayAttributes = dummy_SetDisplayAttributes; + ctx->vtable.vaDbgCopySurfaceToBuffer = dummy_DbgCopySurfaceToBuffer; driver_data = (struct dummy_driver_data *) malloc( sizeof(*driver_data) ); diff --git a/dummy_drv_video/dummy_drv_video.h b/dummy_drv_video/dummy_drv_video.h index 05f3c9d..81a9a44 100644 --- a/dummy_drv_video/dummy_drv_video.h +++ b/dummy_drv_video/dummy_drv_video.h @@ -33,6 +33,7 @@ #define DUMMY_MAX_CONFIG_ATTRIBUTES 10 #define DUMMY_MAX_IMAGE_FORMATS 10 #define DUMMY_MAX_SUBPIC_FORMATS 4 +#define DUMMY_MAX_DISPLAY_ATTRIBUTES 4 struct dummy_driver_data { struct object_heap config_heap; -- cgit v1.2.1