forked from marfrit/libva-v4l2-request-fourier
surface: Add basic support for CreateSurfaces2
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
This commit is contained in:
@@ -86,6 +86,7 @@ VAStatus VA_DRIVER_INIT_FUNC(VADriverContextP context)
|
||||
vtable->vaDestroyConfig = RequestDestroyConfig;
|
||||
vtable->vaGetConfigAttributes = RequestGetConfigAttributes;
|
||||
vtable->vaCreateSurfaces = RequestCreateSurfaces;
|
||||
vtable->vaCreateSurfaces2 = RequestCreateSurfaces2;
|
||||
vtable->vaDestroySurfaces = RequestDestroySurfaces;
|
||||
vtable->vaCreateContext = RequestCreateContext;
|
||||
vtable->vaDestroyContext = RequestDestroyContext;
|
||||
|
||||
+14
-3
@@ -42,9 +42,12 @@
|
||||
#include "v4l2.h"
|
||||
#include "video.h"
|
||||
|
||||
VAStatus RequestCreateSurfaces(VADriverContextP context, int width, int height,
|
||||
int format, int surfaces_count,
|
||||
VASurfaceID *surfaces_ids)
|
||||
VAStatus RequestCreateSurfaces2(VADriverContextP context, unsigned int format,
|
||||
unsigned int width, unsigned int height,
|
||||
VASurfaceID *surfaces_ids,
|
||||
unsigned int surfaces_count,
|
||||
VASurfaceAttrib *attributes,
|
||||
unsigned int attributes_count)
|
||||
{
|
||||
struct request_data *driver_data = context->pDriverData;
|
||||
struct object_surface *surface_object;
|
||||
@@ -171,6 +174,14 @@ VAStatus RequestCreateSurfaces(VADriverContextP context, int width, int height,
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
VAStatus RequestCreateSurfaces(VADriverContextP context, int width, int height,
|
||||
int format, int surfaces_count,
|
||||
VASurfaceID *surfaces_ids)
|
||||
{
|
||||
return RequestCreateSurfaces2(context, format, width, height,
|
||||
surfaces_ids, surfaces_count, NULL, 0);
|
||||
}
|
||||
|
||||
VAStatus RequestDestroySurfaces(VADriverContextP context,
|
||||
VASurfaceID *surfaces_ids, int surfaces_count)
|
||||
{
|
||||
|
||||
@@ -75,6 +75,12 @@ struct object_surface {
|
||||
int request_fd;
|
||||
};
|
||||
|
||||
VAStatus RequestCreateSurfaces2(VADriverContextP context, unsigned int format,
|
||||
unsigned int width, unsigned int height,
|
||||
VASurfaceID *surfaces_ids,
|
||||
unsigned int surfaces_count,
|
||||
VASurfaceAttrib *attributes,
|
||||
unsigned int attributes_count);
|
||||
VAStatus RequestCreateSurfaces(VADriverContextP context, int width, int height,
|
||||
int format, int surfaces_count,
|
||||
VASurfaceID *surfaces_ids);
|
||||
|
||||
Reference in New Issue
Block a user