forked from marfrit/libva-v4l2-request-fourier
config: Use object config structure directly instead of abstract type
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ VAStatus sunxi_cedrus_CreateContext(VADriverContextP ctx, VAConfigID config_id,
|
||||
{
|
||||
INIT_DRIVER_DATA
|
||||
VAStatus vaStatus = VA_STATUS_SUCCESS;
|
||||
object_config_p obj_config;
|
||||
struct object_config *obj_config;
|
||||
int i;
|
||||
struct v4l2_create_buffers create_bufs;
|
||||
struct v4l2_format fmt;
|
||||
|
||||
+2
-2
@@ -87,7 +87,7 @@ VAStatus sunxi_cedrus_RenderPicture(VADriverContextP ctx, VAContextID context,
|
||||
VAStatus vaStatus = VA_STATUS_SUCCESS;
|
||||
struct object_context *obj_context;
|
||||
struct object_surface *obj_surface;
|
||||
object_config_p obj_config;
|
||||
struct object_config *obj_config;
|
||||
int i;
|
||||
|
||||
obj_context = CONTEXT(context);
|
||||
@@ -152,7 +152,7 @@ VAStatus sunxi_cedrus_EndPicture(VADriverContextP ctx, VAContextID context)
|
||||
struct v4l2_ext_control ctrl;
|
||||
struct v4l2_ext_controls ctrls;
|
||||
struct media_request_new media_request;
|
||||
object_config_p obj_config;
|
||||
struct object_config *obj_config;
|
||||
int request_fd;
|
||||
int rc;
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ VAStatus sunxi_cedrus_Terminate(VADriverContextP ctx)
|
||||
{
|
||||
INIT_DRIVER_DATA
|
||||
struct object_buffer *obj_buffer;
|
||||
object_config_p obj_config;
|
||||
struct object_config *obj_config;
|
||||
object_heap_iterator iter;
|
||||
|
||||
for (int i = 0; i < INPUT_BUFFERS_NB; i++)
|
||||
@@ -88,11 +88,11 @@ VAStatus sunxi_cedrus_Terminate(VADriverContextP ctx)
|
||||
object_heap_destroy(&driver_data->context_heap);
|
||||
|
||||
/* Clean up configIDs */
|
||||
obj_config = (object_config_p) object_heap_first(&driver_data->config_heap, &iter);
|
||||
obj_config = (struct object_config *) object_heap_first(&driver_data->config_heap, &iter);
|
||||
while (obj_config)
|
||||
{
|
||||
object_heap_free(&driver_data->config_heap, (object_base_p) obj_config);
|
||||
obj_config = (object_config_p) object_heap_next(&driver_data->config_heap, &iter);
|
||||
obj_config = (struct object_config *) object_heap_next(&driver_data->config_heap, &iter);
|
||||
}
|
||||
object_heap_destroy(&driver_data->config_heap);
|
||||
|
||||
|
||||
+4
-4
@@ -123,7 +123,7 @@ VAStatus sunxi_cedrus_GetConfigAttributes(VADriverContextP ctx,
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
VAStatus sunxi_cedrus_update_attribute(object_config_p obj_config,
|
||||
VAStatus sunxi_cedrus_update_attribute(struct object_config *obj_config,
|
||||
VAConfigAttrib *attrib)
|
||||
{
|
||||
int i;
|
||||
@@ -155,7 +155,7 @@ VAStatus sunxi_cedrus_CreateConfig(VADriverContextP ctx, VAProfile profile,
|
||||
INIT_DRIVER_DATA
|
||||
VAStatus vaStatus;
|
||||
int configID;
|
||||
object_config_p obj_config;
|
||||
struct object_config *obj_config;
|
||||
int i;
|
||||
|
||||
/* Validate profile & entrypoint */
|
||||
@@ -220,7 +220,7 @@ VAStatus sunxi_cedrus_DestroyConfig(VADriverContextP ctx, VAConfigID config_id)
|
||||
{
|
||||
INIT_DRIVER_DATA
|
||||
VAStatus vaStatus;
|
||||
object_config_p obj_config;
|
||||
struct object_config *obj_config;
|
||||
|
||||
obj_config = CONFIG(config_id);
|
||||
if (NULL == obj_config)
|
||||
@@ -240,7 +240,7 @@ VAStatus sunxi_cedrus_QueryConfigAttributes(VADriverContextP ctx,
|
||||
{
|
||||
INIT_DRIVER_DATA
|
||||
VAStatus vaStatus = VA_STATUS_SUCCESS;
|
||||
object_config_p obj_config;
|
||||
struct object_config *obj_config;
|
||||
int i;
|
||||
|
||||
obj_config = CONFIG(config_id);
|
||||
|
||||
+2
-4
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "object_heap.h"
|
||||
|
||||
#define CONFIG(id) ((object_config_p) object_heap_lookup(&driver_data->config_heap, id))
|
||||
#define CONFIG(id) ((struct object_config *) object_heap_lookup(&driver_data->config_heap, id))
|
||||
#define CONFIG_ID_OFFSET 0x01000000
|
||||
|
||||
struct object_config {
|
||||
@@ -41,8 +41,6 @@ struct object_config {
|
||||
int attrib_count;
|
||||
};
|
||||
|
||||
typedef struct object_config *object_config_p;
|
||||
|
||||
VAStatus sunxi_cedrus_QueryConfigProfiles(VADriverContextP ctx,
|
||||
VAProfile *profile_list, int *num_profiles);
|
||||
|
||||
@@ -54,7 +52,7 @@ VAStatus sunxi_cedrus_GetConfigAttributes(VADriverContextP ctx,
|
||||
VAProfile profile, VAEntrypoint entrypoint,
|
||||
VAConfigAttrib *attrib_list, int num_attribs);
|
||||
|
||||
VAStatus sunxi_cedrus_update_attribute(object_config_p obj_config,
|
||||
VAStatus sunxi_cedrus_update_attribute(struct object_config *obj_config,
|
||||
VAConfigAttrib *attrib);
|
||||
|
||||
VAStatus sunxi_cedrus_CreateConfig(VADriverContextP ctx, VAProfile profile,
|
||||
|
||||
Reference in New Issue
Block a user