Here is the latest version of the proposed change to the XvMC
API specification:
Status
XvMCCopySurfaceToGLXPbuffer (
Display *display,
XvMCSurface *surface,
XID pbuffer_id,
short src_x,
short src_y,
unsigned short width,
unsigned short height,
short dst_x,
short dst_y,
unsigned int draw_buffer,
int flags
);
This function copies a rectangle of dimension "width" by "height"
from the XvMCSurface indicated by "surface" to the GLXPbuffer
identified by its XID "pbuffer_id". The locations of source and
destination rectangles are specified differently for the XvMCSurface
source and the GLXPbuffer destination as follows. On the XvMCSurface,
the rectangle location is specified in the usual X-Window fashion
with src_x and src_y indicating the location of the upper left hand
corner of the rectangle relative to the XvMCSurface origin (the upper
left hand corner of the XvMCSurface with positive Y axis going in the
down direction). On the GLXPbuffer the rectangle location is
specified in the usual OpenGL fashion with the dst_x and dst_y
indicating the location of the lower left hand corner of the
rectangle relative to the GLXPbuffer origin (the lower left hand
corner of the GLXPbuffer with the positive Y axis going in the
up direction).
The "draw_buffer" takes the same OpenGL enums that glDrawBuffer()
takes (ie. GL_FRONT_LEFT, GL_FRONT_RIGHT, GL_BACK_LEFT, GL_BACK_RIGHT,
GL_FRONT, GL_BACK, GL_LEFT, GL_RIGHT or GL_FRONT_AND_BACK). This
indicates which buffer of the GLXPbuffer is to be used for the
destination of the copy. Buffers specified in the "draw_buffer"
that do not exist in the GLXPbuffer are ignored.
"Flags" may be XVMC_TOP_FIELD, XVMC_BOTTOM_FIELD or XVMC_FRAME_PICTURE.
If flags is not XVMC_FRAME_PICTURE, the src_y and height are in field
coordinates, not frame. That is, the total copyable height is half
the height of the XvMCSurface.
XvMCCopySurfaceToGLXPbuffer does not return until the copy to the
pbuffer has completed. XvMCCopySurfaceToGLXPbuffer is pipelined
with XvMCRenderSurface so no explicit synchronization between
XvMCRenderSurface and XvMCCopySurfaceToGLXPbuffer is needed.
The pbuffer must be of type GLX_RGBA. Success is returned if
no error occured, the error code is returned otherwise.
Possible Errors:
XvMCBadSurface - The surface is invalid.
BadDrawable - The pbuffer_id is not a valid pbuffer.
BadMatch - The pbuffer is not of type GLX_RGBA.
XvMCCopySurfaceToGLXPbuffer is supported if the following flag:
#define XVMC_COPY_TO_PBUFFER 0x00000010
is set in the XvMCSurfaceInfo's flags field.
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel