int minor;
} compatible_versions[] = {
{ VA_MAJOR_VERSION, VA_MINOR_VERSION },
+ { VA_MAJOR_VERSION, 2 },
+ { VA_MAJOR_VERSION, 1 },
+ { VA_MAJOR_VERSION, 0 },
{ -1, }
};
CHECK_MAXIMUM(vaStatus, ctx, attributes);
CHECK_MAXIMUM(vaStatus, ctx, image_formats);
CHECK_MAXIMUM(vaStatus, ctx, subpic_formats);
- CHECK_MAXIMUM(vaStatus, ctx, display_attributes);
CHECK_STRING(vaStatus, ctx, vendor);
CHECK_VTABLE(vaStatus, ctx, Terminate);
CHECK_VTABLE(vaStatus, ctx, QueryConfigProfiles);
return "surface is in displaying (may by overlay)" ;
case VA_STATUS_ERROR_INVALID_IMAGE_FORMAT:
return "invalid VAImageFormat";
+ case VA_STATUS_ERROR_DECODING_ERROR:
+ return "internal decoding error";
+ case VA_STATUS_ERROR_ENCODING_ERROR:
+ return "internal encoding error";
case VA_STATUS_ERROR_INVALID_VALUE:
return "an invalid/unsupported value was supplied";
case VA_STATUS_ERROR_UNSUPPORTED_FILTER:
return "the requested filter is not supported";
case VA_STATUS_ERROR_INVALID_FILTER_CHAIN:
return "an invalid filter chain was supplied";
+ case VA_STATUS_ERROR_HW_BUSY:
+ return "HW busy now";
+ case VA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE:
+ return "an unsupported memory type was supplied";
+ case VA_STATUS_ERROR_NOT_ENOUGH_BUFFER:
+ return "allocated memory size is not enough for input or output";
case VA_STATUS_ERROR_UNKNOWN:
return "unknown libva error";
}
return ctx->vtable->vaQueryConfigAttributes( ctx, config_id, profile, entrypoint, attrib_list, num_attribs);
}
+VAStatus vaQueryProcessingRate (
+ VADisplay dpy,
+ VAConfigID config_id,
+ VAProcessingRateParameter *proc_buf,
+ unsigned int *processing_rate /* out */
+)
+{
+ VADriverContextP ctx;
+ CHECK_DISPLAY(dpy);
+ ctx = CTX(dpy);
+ if(!ctx->vtable->vaQueryProcessingRate)
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
+ return ctx->vtable->vaQueryProcessingRate( ctx, config_id, proc_buf, processing_rate);
+}
+
/* XXX: this is a slow implementation that will be removed */
static VAStatus
va_impl_query_surface_attributes(
return vaStatus;
}
+VAStatus vaCreateBuffer2 (
+ VADisplay dpy,
+ VAContextID context,
+ VABufferType type,
+ unsigned int width,
+ unsigned int height,
+ unsigned int *unit_size,
+ unsigned int *pitch,
+ VABufferID *buf_id
+)
+{
+ VADriverContextP ctx;
+ VAStatus vaStatus;
+
+ CHECK_DISPLAY(dpy);
+ ctx = CTX(dpy);
+ if(!ctx->vtable->vaCreateBuffer2)
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
+
+ vaStatus = ctx->vtable->vaCreateBuffer2( ctx, context, type, width, height ,unit_size, pitch, buf_id);
+
+ VA_TRACE_LOG(va_TraceCreateBuffer,
+ dpy, context, type, *pitch, height, NULL, buf_id);
+
+ return vaStatus;
+}
+
VAStatus vaBufferSetNumElements (
VADisplay dpy,
VABufferID buf_id, /* in */
return ctx->vtable->vaReleaseBufferHandle(ctx, buf_id);
}
+VAStatus
+vaExportSurfaceHandle(VADisplay dpy, VASurfaceID surface_id,
+ uint32_t mem_type, uint32_t flags,
+ void *descriptor)
+{
+ VADriverContextP ctx;
+
+ CHECK_DISPLAY(dpy);
+ ctx = CTX(dpy);
+
+ if (!ctx->vtable->vaExportSurfaceHandle)
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
+ return ctx->vtable->vaExportSurfaceHandle(ctx, surface_id,
+ mem_type, flags,
+ descriptor);
+}
+
VAStatus vaBeginPicture (
VADisplay dpy,
VAContextID context,