本文整理匯總了C++中CHECK_DISPLAY函數的典型用法代碼示例。如果您正苦於以下問題:C++ CHECK_DISPLAY函數的具體用法?C++ CHECK_DISPLAY怎麽用?C++ CHECK_DISPLAY使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了CHECK_DISPLAY函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: vaTerminate
/*
* After this call, all library internal resources will be cleaned up
*/
VAStatus vaTerminate (
VADisplay dpy
)
{
VAStatus vaStatus = VA_STATUS_SUCCESS;
VADisplayContextP pDisplayContext = (VADisplayContextP)dpy;
VADriverContextP old_ctx;
CHECK_DISPLAY(dpy);
old_ctx = CTX(dpy);
if (old_ctx->handle) {
vaStatus = old_ctx->vtable->vaTerminate(old_ctx);
// dlclose(old_ctx->handle);
old_ctx->handle = NULL;
}
free(old_ctx->vtable);
old_ctx->vtable = NULL;
free(old_ctx->vtable_vpp);
old_ctx->vtable_vpp = NULL;
VA_TRACE_LOG(va_TraceTerminate, dpy);
va_TraceEnd(dpy);
va_FoolEnd(dpy);
if (VA_STATUS_SUCCESS == vaStatus)
pDisplayContext->vaDestroy(pDisplayContext);
return vaStatus;
}
示例2: vaPutSurfaceBuf
VAStatus vaPutSurfaceBuf (
VADisplay dpy,
VASurfaceID surface,
unsigned char* data,
int* data_len,
short srcx,
short srcy,
unsigned short srcw,
unsigned short srch,
short destx,
short desty,
unsigned short destw,
unsigned short desth,
VARectangle *cliprects, /* client supplied clip list */
unsigned int number_cliprects, /* number of clip rects in the clip list */
unsigned int flags /* de-interlacing flags */
)
{
VADriverContextP ctx;
struct VADriverVTableTPI *tpi;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
tpi = ( struct VADriverVTableTPI *)ctx->vtable_tpi;
if (tpi && tpi->vaPutSurfaceBuf) {
return tpi->vaPutSurfaceBuf( ctx, surface, data, data_len, srcx, srcy, srcw, srch,
destx, desty, destw, desth, cliprects, number_cliprects, flags );
} else
return VA_STATUS_ERROR_UNIMPLEMENTED;
}
示例3: vaCreateContext
VAStatus vaCreateContext (
VADisplay dpy,
VAConfigID config_id,
int picture_width,
int picture_height,
int flag,
VASurfaceID *render_targets,
int num_render_targets,
VAContextID *context /* out */
)
{
VADriverContextP ctx;
VAStatus vaStatus;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
vaStatus = ctx->vtable->vaCreateContext( ctx, config_id, picture_width, picture_height,
flag, render_targets, num_render_targets, context );
/* keep current encode/decode resoluton */
VA_TRACE_ALL(va_TraceCreateContext, dpy, config_id, picture_width, picture_height, flag, render_targets, num_render_targets, context);
return vaStatus;
}
示例4: vaCreateBuffer
VAStatus vaCreateBuffer (
VADisplay dpy,
VAContextID context, /* in */
VABufferType type, /* in */
unsigned int size, /* in */
unsigned int num_elements, /* in */
void *data, /* in */
VABufferID *buf_id /* out */
)
{
VADriverContextP ctx;
VAStatus vaStatus;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
VA_FOOL_FUNC(va_FoolCreateBuffer, dpy, context, type, size, num_elements, data, buf_id);
vaStatus = ctx->vtable->vaCreateBuffer( ctx, context, type, size, num_elements, data, buf_id);
VA_TRACE_LOG(va_TraceCreateBuffer,
dpy, context, type, size, num_elements, data, buf_id);
return vaStatus;
}
示例5: vaCreateSurfaces
VAStatus
vaCreateSurfaces(
VADisplay dpy,
unsigned int format,
unsigned int width,
unsigned int height,
VASurfaceID *surfaces,
unsigned int num_surfaces,
VASurfaceAttrib *attrib_list,
unsigned int num_attribs
)
{
VADriverContextP ctx;
VAStatus vaStatus;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
if (!ctx)
return VA_STATUS_ERROR_INVALID_DISPLAY;
if (ctx->vtable->vaCreateSurfaces2)
vaStatus = ctx->vtable->vaCreateSurfaces2(ctx, format, width, height,
surfaces, num_surfaces,
attrib_list, num_attribs);
else if (attrib_list && num_attribs > 0)
vaStatus = VA_STATUS_ERROR_ATTR_NOT_SUPPORTED;
else
vaStatus = ctx->vtable->vaCreateSurfaces(ctx, width, height, format,
num_surfaces, surfaces);
VA_TRACE_LOG(va_TraceCreateSurfaces,
dpy, width, height, format, num_surfaces, surfaces,
attrib_list, num_attribs);
return vaStatus;
}
示例6: rectangles
/*
vaAssociateSubpicture associates the subpicture with the target_surface.
It defines the region mapping between the subpicture and the target
surface through source and destination rectangles (with the same width and height).
Both will be displayed at the next call to vaPutSurface. Additional
associations before the call to vaPutSurface simply overrides the association.
*/
VAStatus vaAssociateSubpicture (
VADisplay dpy,
VASubpictureID subpicture,
VASurfaceID *target_surfaces,
int num_surfaces,
short src_x, /* upper left offset in subpicture */
short src_y,
unsigned short src_width,
unsigned short src_height,
short dest_x, /* upper left offset in surface */
short dest_y,
unsigned short dest_width,
unsigned short dest_height,
/*
* whether to enable chroma-keying or global-alpha
* see VA_SUBPICTURE_XXX values
*/
unsigned int flags
)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
return ctx->vtable->vaAssociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height, flags );
}
示例7: vaQuerySurfaceAttributes
VAStatus
vaQuerySurfaceAttributes(
VADisplay dpy,
VAConfigID config,
VASurfaceAttrib *attrib_list,
unsigned int *num_attribs
)
{
VADriverContextP ctx;
VAStatus vaStatus;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
if (!ctx)
return VA_STATUS_ERROR_INVALID_DISPLAY;
if (!ctx->vtable->vaQuerySurfaceAttributes)
vaStatus = va_impl_query_surface_attributes(ctx, config,
attrib_list, num_attribs);
else
vaStatus = ctx->vtable->vaQuerySurfaceAttributes(ctx, config,
attrib_list, num_attribs);
VA_TRACE_LOG(va_TraceQuerySurfaceAttributes, dpy, config, attrib_list, num_attribs);
return vaStatus;
}
示例8: vaUnlockSurface
VAStatus vaUnlockSurface(VADisplay dpy,
VASurfaceID surface
)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
return ctx->vtable->vaUnlockSurface( ctx, surface );
}
示例9: vaDestroyContext
VAStatus vaDestroyContext (
VADisplay dpy,
VAContextID context
)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
return ctx->vtable->vaDestroyContext( ctx, context );
}
示例10: vaDestroySubpicture
/*
* Destroy the subpicture before destroying the image it is assocated to
*/
VAStatus vaDestroySubpicture (
VADisplay dpy,
VASubpictureID subpicture
)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
return ctx->vtable->vaDestroySubpicture ( ctx, subpicture);
}
示例11: vaDestroyImage
/*
* Should call DestroyImage before destroying the surface it is bound to
*/
VAStatus vaDestroyImage (
VADisplay dpy,
VAImageID image
)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
return ctx->vtable->vaDestroyImage ( ctx, image);
}
示例12: vaReleaseBufferHandle
/* Unlocks buffer after usage from external API */
VAStatus
vaReleaseBufferHandle(VADisplay dpy, VABufferID buf_id)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
if (!ctx->vtable->vaReleaseBufferHandle)
return VA_STATUS_ERROR_UNIMPLEMENTED;
return ctx->vtable->vaReleaseBufferHandle(ctx, buf_id);
}
示例13: vaSetSubpictureImage
VAStatus vaSetSubpictureImage (
VADisplay dpy,
VASubpictureID subpicture,
VAImageID image
)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
return ctx->vtable->vaSetSubpictureImage ( ctx, subpicture, image);
}
示例14: vaCreateSubpicture
/*
* Subpictures are created with an image associated.
*/
VAStatus vaCreateSubpicture (
VADisplay dpy,
VAImageID image,
VASubpictureID *subpicture /* out */
)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
return ctx->vtable->vaCreateSubpicture ( ctx, image, subpicture );
}
示例15: vaDeriveImage
/*
* Derive an VAImage from an existing surface.
* This interface will derive a VAImage and corresponding image buffer from
* an existing VA Surface. The image buffer can then be mapped/unmapped for
* direct CPU access. This operation is only possible on implementations with
* direct rendering capabilities and internal surface formats that can be
* represented with a VAImage. When the operation is not possible this interface
* will return VA_STATUS_ERROR_OPERATION_FAILED. Clients should then fall back
* to using vaCreateImage + vaPutImage to accomplish the same task in an
* indirect manner.
*
* Implementations should only return success when the resulting image buffer
* would be useable with vaMap/Unmap.
*
* When directly accessing a surface special care must be taken to insure
* proper synchronization with the graphics hardware. Clients should call
* vaQuerySurfaceStatus to insure that a surface is not the target of concurrent
* rendering or currently being displayed by an overlay.
*
* Additionally nothing about the contents of a surface should be assumed
* following a vaPutSurface. Implementations are free to modify the surface for
* scaling or subpicture blending within a call to vaPutImage.
*
* Calls to vaPutImage or vaGetImage using the same surface from which the image
* has been derived will return VA_STATUS_ERROR_SURFACE_BUSY. vaPutImage or
* vaGetImage with other surfaces is supported.
*
* An image created with vaDeriveImage should be freed with vaDestroyImage. The
* image and image buffer structures will be destroyed; however, the underlying
* surface will remain unchanged until freed with vaDestroySurfaces.
*/
VAStatus vaDeriveImage (
VADisplay dpy,
VASurfaceID surface,
VAImage *image /* out */
)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
return ctx->vtable->vaDeriveImage ( ctx, surface, image );
}