diff --git a/va/va.c b/va/va.c index 4f074f16b..4cd279139 100644 --- a/va/va.c +++ b/va/va.c @@ -1597,6 +1597,22 @@ VAStatus vaQuerySurfaceError ( return va_status; } +VAStatus vaQueryOutputValue( + VADisplay dpy, + VAContextID context, + VAOutputValueTypes output_value_type, + void *output_value) +{ + VAStatus va_status; + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + va_status = ctx->vtable->vaQueryOutputValue( ctx,context,output_value_type, output_value ); + + return va_status; +} + /* Get maximum number of image formats supported by the implementation */ int vaMaxNumImageFormats ( VADisplay dpy diff --git a/va/va.h b/va/va.h index 4b7594285..ed30eabe2 100644 --- a/va/va.h +++ b/va/va.h @@ -3625,6 +3625,24 @@ VAStatus vaQuerySurfaceError( void **error_info ); +/**out put value types, used by \vaQueryOutputValue */ +typedef enum +{ + VAOutputDecodeCRC = 1 +}VAOutputValueTypes; + +/** + * this interface is to get some values from driver or HW + * after calling vaSyncSurface, the value type is defined with \c VAOutputValueTypes + * the output_value should be a pointer allocated by application. + * it can be a single value or a structure. + */ +VAStatus vaQueryOutputValue( + VADisplay dpy, + VAContextID context, + VAOutputValueTypes output_value_type, + void *output_value); + /** * Images and Subpictures * VAImage is used to either get the surface data to client memory, or diff --git a/va/va_backend.h b/va/va_backend.h index 8deb97985..faaece9dd 100644 --- a/va/va_backend.h +++ b/va/va_backend.h @@ -486,8 +486,15 @@ struct VADriverVTable void *descriptor /* out */ ); + VAStatus + (*vaQueryOutputValue)( + VADriverContextP ctx, + VAContextID context, /* in */ + VAOutputValueTypes output_value_type,/* in */ + void *output_value /* out */ + ); /** \brief Reserved bytes for future use, must be zero */ - unsigned long reserved[57]; + unsigned long reserved[56]; }; struct VADriverContext