CHECK_VTABLE(vaStatus, ctx, QueryDisplayAttributes);
CHECK_VTABLE(vaStatus, ctx, GetDisplayAttributes);
CHECK_VTABLE(vaStatus, ctx, SetDisplayAttributes);
- CHECK_VTABLE(vaStatus, ctx, DbgCopySurfaceToBuffer);
}
if (VA_STATUS_SUCCESS != vaStatus)
{
}
-VAStatus vaCreateSurfaceFromCIFrame (
- VADisplay dpy,
- unsigned long frame_id,
- VASurfaceID *surface /* out */
-)
-{
- VADriverContextP ctx;
- CHECK_DISPLAY(dpy);
- ctx = CTX(dpy);
-
- TRACE(vaCreateSurfacesFromCIFrame);
- return ctx->vtable.vaCreateSurfaceFromCIFrame( ctx, frame_id, surface );
-}
-
VAStatus vaDestroySurfaces (
VADisplay dpy,
VASurfaceID *surface_list,
}
-#warning TODO: Remove vaDbgCopySurfaceToBuffer in rev 0.29
-VAStatus vaDbgCopySurfaceToBuffer(VADisplay dpy,
- VASurfaceID surface,
- void **buffer, /* out */
- unsigned int *stride /* out */
+VAStatus vaCreateSurfaceFromCIFrame (
+ VADisplay dpy,
+ unsigned long frame_id,
+ VASurfaceID *surface /* out */
)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
- TRACE(vaDbgCopySurfaceToBuffer);
- return ctx->vtable.vaDbgCopySurfaceToBuffer( ctx, surface, buffer, stride );
+ TRACE(vaCreateSurfacesFromCIFrame);
+
+ if (ctx->vtable.vaCreateSurfaceFromCIFrame)
+ return ctx->vtable.vaCreateSurfaceFromCIFrame( ctx, frame_id, surface );
+ else
+ return VA_STATUS_ERROR_UNKNOWN;
}
-#warning TODO: Remove vaDbgCreateSurfaceFromMrstV4L2Buf in rev 0.29
-VAStatus vaDbgCreateSurfaceFromMrstV4L2Buf(
+
+VAStatus vaCreateSurfaceFromMrstV4L2Buf(
VADisplay dpy,
unsigned int width,
unsigned int height,
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
- TRACE(vtable.vaDbgCreateSurfaceFromMrstV4L2Buf);
- return ctx->vtable.vaDbgCreateSurfaceFromMrstV4L2Buf( ctx, width, height, size, fourcc, luma_stride, chroma_u_stride, chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset, surface );
+ TRACE(vtable.vaCreateSurfaceFromMrstV4L2Buf);
+
+ if (ctx->vtable.vaCreateSurfaceFromMrstV4L2Buf)
+ return ctx->vtable.vaCreateSurfaceFromMrstV4L2Buf( ctx, width, height, size, fourcc, luma_stride, chroma_u_stride, chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset, surface );
+ else
+ return VA_STATUS_ERROR_UNKNOWN;
}
+
+VAStatus vaCopySurfaceToBuffer(VADisplay dpy,
+ VASurfaceID surface,
+ unsigned int *fourcc, /* following are output argument */
+ unsigned int *luma_stride,
+ unsigned int *chroma_u_stride,
+ unsigned int *chroma_v_stride,
+ unsigned int *luma_offset,
+ unsigned int *chroma_u_offset,
+ unsigned int *chroma_v_offset,
+ void **buffer
+)
+{
+ VADriverContextP ctx;
+ CHECK_DISPLAY(dpy);
+ ctx = CTX(dpy);
+
+ TRACE(vaCopySurfaceToBuffer);
+ if (ctx->vtable.vaCopySurfaceToBuffer)
+ return ctx->vtable.vaCopySurfaceToBuffer( ctx, surface, fourcc, luma_stride, chroma_u_stride, chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset, buffer);
+ else
+ return VA_STATUS_ERROR_UNKNOWN;
+}
VASurfaceID *surfaces /* out */
);
- VAStatus (*vaCreateSurfaceFromCIFrame) (
- VADriverContextP ctx,
- unsigned long frame_id,
- VASurfaceID *surface /* out */
- );
-
VAStatus (*vaDestroySurfaces) (
VADriverContextP ctx,
VASurfaceID *surface_list,
int num_attributes
);
-
- VAStatus (*vaDbgCopySurfaceToBuffer) (
+ /* device specific */
+ VAStatus (*vaCreateSurfaceFromCIFrame) (
VADriverContextP ctx,
- VASurfaceID surface,
- void **buffer, /* out */
- unsigned int *stride /* out */
+ unsigned long frame_id,
+ VASurfaceID *surface /* out */
);
- VAStatus (*vaDbgCreateSurfaceFromMrstV4L2Buf) (
+
+
+ VAStatus (*vaCreateSurfaceFromMrstV4L2Buf) (
VADriverContextP ctx,
unsigned int width,
unsigned int height,
unsigned int chroma_v_offset,
VASurfaceID *surface /* out */
);
+
+ VAStatus (*vaCopySurfaceToBuffer) (
+ VADriverContextP ctx,
+ VASurfaceID surface,
+ unsigned int *fourcc, /* out for follow argument */
+ unsigned int *luma_stride,
+ unsigned int *chroma_u_stride,
+ unsigned int *chroma_v_stride,
+ unsigned int *luma_offset,
+ unsigned int *chroma_u_offset,
+ unsigned int *chroma_v_offset,
+ void **buffer
+ );
};
struct VADriverContext