return (VADisplay)pDisplayContext;
}
-
-
-extern "C" {
- extern int va_fool_postp; /* do nothing for vaPutSurface if set */
- extern int va_trace_flag; /* trace vaPutSurface parameters */
-
- void va_TracePutSurface (
- VADisplay dpy,
- VASurfaceID surface,
- void *draw, /* the target Drawable */
- 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 */
- );
-}
-
-VAStatus vaPutSurface (
- VADisplay dpy,
- VASurfaceID surface,
- sp<ANativeWindow> draw, /* Android Native Window */
- 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;
-
- if (va_fool_postp)
- return VA_STATUS_SUCCESS;
-
- if (draw == NULL)
- return VA_STATUS_ERROR_UNKNOWN;
-
- CHECK_DISPLAY(dpy);
- ctx = CTX(dpy);
-
- VA_TRACE_LOG(va_TracePutSurface, dpy, surface, static_cast<void*>(&draw), srcx, srcy, srcw, srch,
- destx, desty, destw, desth,
- cliprects, number_cliprects, flags );
-
- return ctx->vtable->vaPutSurface( ctx, surface, static_cast<void*>(&draw), srcx, srcy, srcw, srch,
- destx, desty, destw, desth,
- cliprects, number_cliprects, flags );
-}
}
#endif
-#ifdef __cplusplus
-#ifdef ANDROID
-#include <system/window.h>
-#include <utils/StrongPointer.h>
-using namespace android;
-
-/*
- * Output rendering
- * Following is the rendering interface for Android system,
- * to get the decode output surface to an ISurface object.
- * It basically performs a de-interlacing (if needed),
- * color space conversion and scaling to the destination
- * rectangle
- */
-VAStatus vaPutSurface (
- VADisplay dpy,
- VASurfaceID surface,
- sp<ANativeWindow> draw, /* Android Native Window */
- short srcx,
- short srcy,
- unsigned short srcw,
- unsigned short srch,
- short destx,
- short desty,
- unsigned short destw,
- unsigned short desth,
- VARectangle *cliprects, /* client supplied destination clip list */
- unsigned int number_cliprects, /* number of clip rects in the clip list */
- unsigned int flags /* PutSurface flags */
-);
-
-#endif /* ANDROID */
-#endif /* __cplusplus */
-
#endif /* _VA_ANDROID_H_ */