Commit c49fd6a9 authored by Waldo Bastian's avatar Waldo Bastian

Make dummy driver compile & load

parent b11b23ab
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
AC_PREREQ(2.57) AC_PREREQ(2.57)
AC_INIT([libva], 0.1, [waldo.bastian@intel.com], libva) AC_INIT([libva], 0.22, [waldo.bastian@intel.com], libva)
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([dist-bzip2]) AM_INIT_AUTOMAKE([dist-bzip2])
......
...@@ -410,6 +410,178 @@ VAStatus dummy_DestroySurface( ...@@ -410,6 +410,178 @@ VAStatus dummy_DestroySurface(
return VA_STATUS_SUCCESS; return VA_STATUS_SUCCESS;
} }
VAStatus dummy_QueryImageFormats(
VADriverContextP ctx,
VAImageFormat *format_list, /* out */
int *num_formats /* out */
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_CreateImage(
VADriverContextP ctx,
VAImageFormat *format,
int width,
int height,
VAImage *image /* out */
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_DestroyImage(
VADriverContextP ctx,
VAImage *image
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_GetImage(
VADriverContextP ctx,
VASurface *surface,
int x, /* coordinates of the upper left source pixel */
int y,
unsigned int width, /* width and height of the region */
unsigned int height,
VAImage *image
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_PutImage(
VADriverContextP ctx,
VASurface *surface,
VAImage *image,
int src_x,
int src_y,
unsigned int width,
unsigned int height,
int dest_x,
int dest_y
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_QuerySubpictureFormats(
VADriverContextP ctx,
VAImageFormat *format_list, /* out */
unsigned int *flags, /* out */
unsigned int *num_formats /* out */
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_CreateSubpicture(
VADriverContextP ctx,
VAImage *image,
VASubpicture *subpicture /* out */
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_DestroySubpicture(
VADriverContextP ctx,
VASubpicture *subpicture
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_SetSubpicturePalette(
VADriverContextP ctx,
VASubpicture *subpicture,
/*
* pointer to an array holding the palette data. The size of the array is
* num_palette_entries * entry_bytes in size. The order of the components
* in the palette is described by the component_order in VASubpicture struct
*/
unsigned char *palette
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_SetSubpictureChromakey(
VADriverContextP ctx,
VASubpicture *subpicture,
unsigned int chromakey_min,
unsigned int chromakey_max
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_SetSubpictureGlobalAlpha(
VADriverContextP ctx,
VASubpicture *subpicture,
float global_alpha
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_AssociateSubpicture(
VADriverContextP ctx,
VASurface *target_surface,
VASubpicture *subpicture,
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
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_CreateContext( VAStatus dummy_CreateContext(
VADriverContextP ctx, VADriverContextP ctx,
VAConfigID config_id, VAConfigID config_id,
...@@ -824,6 +996,8 @@ VAStatus dummy_PutSurface( ...@@ -824,6 +996,8 @@ VAStatus dummy_PutSurface(
short desty, short desty,
unsigned short destw, unsigned short destw,
unsigned short desth, 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 */ int flags /* de-interlacing flags */
) )
{ {
...@@ -882,7 +1056,7 @@ VAStatus dummy_Terminate( VADriverContextP ctx ) ...@@ -882,7 +1056,7 @@ VAStatus dummy_Terminate( VADriverContextP ctx )
return VA_STATUS_SUCCESS; return VA_STATUS_SUCCESS;
} }
VAStatus __vaDriverInit_0_20( VADriverContextP ctx ) VAStatus __vaDriverInit_0_22( VADriverContextP ctx )
{ {
object_base_p obj; object_base_p obj;
int result; int result;
...@@ -890,14 +1064,15 @@ VAStatus __vaDriverInit_0_20( VADriverContextP ctx ) ...@@ -890,14 +1064,15 @@ VAStatus __vaDriverInit_0_20( VADriverContextP ctx )
int i; int i;
ctx->version_major = 0; ctx->version_major = 0;
ctx->version_minor = 20; ctx->version_minor = 22;
ctx->max_profiles = DUMMY_MAX_PROFILES; ctx->max_profiles = DUMMY_MAX_PROFILES;
ctx->max_entrypoints = DUMMY_MAX_ENTRYPOINTS; ctx->max_entrypoints = DUMMY_MAX_ENTRYPOINTS;
ctx->max_attributes = DUMMY_MAX_CONFIG_ATTRIBUTES; ctx->max_attributes = DUMMY_MAX_CONFIG_ATTRIBUTES;
ctx->max_image_formats = DUMMY_MAX_IMAGE_FORMATS;
ctx->max_subpic_formats = DUMMY_MAX_SUBPIC_FORMATS;
ctx->vtable.vaTerminate = dummy_Terminate; ctx->vtable.vaTerminate = dummy_Terminate;
ctx->vtable.vaQueryConfigEntrypoints = dummy_QueryConfigEntrypoints; ctx->vtable.vaQueryConfigEntrypoints = dummy_QueryConfigEntrypoints;
ctx->vtable.vaTerminate = dummy_Terminate;
ctx->vtable.vaQueryConfigProfiles = dummy_QueryConfigProfiles; ctx->vtable.vaQueryConfigProfiles = dummy_QueryConfigProfiles;
ctx->vtable.vaQueryConfigEntrypoints = dummy_QueryConfigEntrypoints; ctx->vtable.vaQueryConfigEntrypoints = dummy_QueryConfigEntrypoints;
ctx->vtable.vaQueryConfigAttributes = dummy_QueryConfigAttributes; ctx->vtable.vaQueryConfigAttributes = dummy_QueryConfigAttributes;
...@@ -919,6 +1094,18 @@ VAStatus __vaDriverInit_0_20( VADriverContextP ctx ) ...@@ -919,6 +1094,18 @@ VAStatus __vaDriverInit_0_20( VADriverContextP ctx )
ctx->vtable.vaSyncSurface = dummy_SyncSurface; ctx->vtable.vaSyncSurface = dummy_SyncSurface;
ctx->vtable.vaQuerySurfaceStatus = dummy_QuerySurfaceStatus; ctx->vtable.vaQuerySurfaceStatus = dummy_QuerySurfaceStatus;
ctx->vtable.vaPutSurface = dummy_PutSurface; ctx->vtable.vaPutSurface = dummy_PutSurface;
ctx->vtable.vaQueryImageFormats = dummy_QueryImageFormats;
ctx->vtable.vaCreateImage = dummy_CreateImage;
ctx->vtable.vaDestroyImage = dummy_DestroyImage;
ctx->vtable.vaGetImage = dummy_GetImage;
ctx->vtable.vaPutImage = dummy_PutImage;
ctx->vtable.vaQuerySubpictureFormats = dummy_QuerySubpictureFormats;
ctx->vtable.vaCreateSubpicture = dummy_CreateSubpicture;
ctx->vtable.vaDestroySubpicture = dummy_DestroySubpicture;
ctx->vtable.vaSetSubpicturePalette = dummy_SetSubpicturePalette;
ctx->vtable.vaSetSubpictureChromakey = dummy_SetSubpictureChromakey;
ctx->vtable.vaSetSubpictureGlobalAlpha = dummy_SetSubpictureGlobalAlpha;
ctx->vtable.vaAssociateSubpicture = dummy_AssociateSubpicture;
ctx->vtable.vaDbgCopySurfaceToBuffer = dummy_DbgCopySurfaceToBuffer; ctx->vtable.vaDbgCopySurfaceToBuffer = dummy_DbgCopySurfaceToBuffer;
driver_data = (struct dummy_driver_data *) malloc( sizeof(*driver_data) ); driver_data = (struct dummy_driver_data *) malloc( sizeof(*driver_data) );
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#define DUMMY_MAX_PROFILES 11 #define DUMMY_MAX_PROFILES 11
#define DUMMY_MAX_ENTRYPOINTS 5 #define DUMMY_MAX_ENTRYPOINTS 5
#define DUMMY_MAX_CONFIG_ATTRIBUTES 10 #define DUMMY_MAX_CONFIG_ATTRIBUTES 10
#define DUMMY_MAX_IMAGE_FORMATS 10
#define DUMMY_MAX_SUBPIC_FORMATS 4
struct dummy_driver_data { struct dummy_driver_data {
struct object_heap config_heap; struct object_heap config_heap;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
libva_la_LTLIBRARIES = libva.la libva_la_LTLIBRARIES = libva.la
libva_ladir = $(libdir) libva_ladir = $(libdir)
libva_la_LDFLAGS = -version-number 0:1:0 -no-undefined libva_la_LDFLAGS = -version-number 0:22:0 -no-undefined
libva_la_LIBADD = -ldl -lX11 -lXext libva_la_LIBADD = -ldl -lX11 -lXext
libva_la_SOURCES = va_dri.c va.c va_dristr.h libva_la_SOURCES = va_dri.c va.c va_dristr.h
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment