xf86xvmc.h revision 65fea56f17cd614bc8908264df980a62e1931468
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Copyright (c) 2001 by The XFree86 Project, Inc.
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Permission is hereby granted, free of charge, to any person obtaining a
65fea56f17cd614bc8908264df980a62e1931468vboxsync * copy of this software and associated documentation files (the "Software"),
65fea56f17cd614bc8908264df980a62e1931468vboxsync * to deal in the Software without restriction, including without limitation
65fea56f17cd614bc8908264df980a62e1931468vboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
65fea56f17cd614bc8908264df980a62e1931468vboxsync * and/or sell copies of the Software, and to permit persons to whom the
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Software is furnished to do so, subject to the following conditions:
65fea56f17cd614bc8908264df980a62e1931468vboxsync * The above copyright notice and this permission notice shall be included in
65fea56f17cd614bc8908264df980a62e1931468vboxsync * all copies or substantial portions of the Software.
65fea56f17cd614bc8908264df980a62e1931468vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
65fea56f17cd614bc8908264df980a62e1931468vboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
65fea56f17cd614bc8908264df980a62e1931468vboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
65fea56f17cd614bc8908264df980a62e1931468vboxsync * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
65fea56f17cd614bc8908264df980a62e1931468vboxsync * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
65fea56f17cd614bc8908264df980a62e1931468vboxsync * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
65fea56f17cd614bc8908264df980a62e1931468vboxsync * OTHER DEALINGS IN THE SOFTWARE.
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Except as contained in this notice, the name of the copyright holder(s)
65fea56f17cd614bc8908264df980a62e1931468vboxsync * and author(s) shall not be used in advertising or otherwise to promote
65fea56f17cd614bc8908264df980a62e1931468vboxsync * the sale, use or other dealings in this Software without prior written
65fea56f17cd614bc8908264df980a62e1931468vboxsync * authorization from the copyright holder(s) and author(s).
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct {
65fea56f17cd614bc8908264df980a62e1931468vboxsync int *xvimage_ids; /* reference the subpictures in the XF86MCAdaptorRec */
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct {
65fea56f17cd614bc8908264df980a62e1931468vboxsync int surface_type_id; /* Driver generated. Must be unique on the port */
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned short max_width;
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned short max_height;
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned short subpicture_max_width;
65fea56f17cd614bc8908264df980a62e1931468vboxsync XF86MCImageIDList *compatible_subpictures; /* can be null, if none */
65fea56f17cd614bc8908264df980a62e1931468vboxsync xf86XvMCCreateContextProc
65fea56f17cd614bc8908264df980a62e1931468vboxsync DIX will fill everything out in the context except the driver_priv.
65fea56f17cd614bc8908264df980a62e1931468vboxsync The port_priv holds the private data specified for the port when
65fea56f17cd614bc8908264df980a62e1931468vboxsync Xv was initialized by the driver.
65fea56f17cd614bc8908264df980a62e1931468vboxsync The driver may store whatever it wants in driver_priv and edit
65fea56f17cd614bc8908264df980a62e1931468vboxsync the width, height and flags. If the driver wants to return something
65fea56f17cd614bc8908264df980a62e1931468vboxsync to the client it can allocate space in priv and specify the number
65fea56f17cd614bc8908264df980a62e1931468vboxsync of 32 bit words in num_priv. This must be dynamically allocated
65fea56f17cd614bc8908264df980a62e1931468vboxsync space because DIX will free it after it passes it to the client.
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef int (*xf86XvMCCreateContextProcPtr) (ScrnInfoPtr pScrn,
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef void (*xf86XvMCDestroyContextProcPtr) (ScrnInfoPtr pScrn,
65fea56f17cd614bc8908264df980a62e1931468vboxsync xf86XvMCCreateSurfaceProc
65fea56f17cd614bc8908264df980a62e1931468vboxsync DIX will fill everything out in the surface except the driver_priv.
65fea56f17cd614bc8908264df980a62e1931468vboxsync The driver may store whatever it wants in driver_priv. The driver
65fea56f17cd614bc8908264df980a62e1931468vboxsync may pass data back to the client in the same manner as the
65fea56f17cd614bc8908264df980a62e1931468vboxsync xf86XvMCCreateContextProc.
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef int (*xf86XvMCCreateSurfaceProcPtr) (ScrnInfoPtr pScrn,
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef void (*xf86XvMCDestroySurfaceProcPtr) (ScrnInfoPtr pScrn,
65fea56f17cd614bc8908264df980a62e1931468vboxsync xf86XvMCCreateSubpictureProc
65fea56f17cd614bc8908264df980a62e1931468vboxsync DIX will fill everything out in the subpicture except the driver_priv,
65fea56f17cd614bc8908264df980a62e1931468vboxsync num_palette_entries, entry_bytes and component_order. The driver may
65fea56f17cd614bc8908264df980a62e1931468vboxsync store whatever it wants in driver_priv and edit the width and height.
65fea56f17cd614bc8908264df980a62e1931468vboxsync If it is a paletted subpicture the driver needs to fill out the
65fea56f17cd614bc8908264df980a62e1931468vboxsync num_palette_entries, entry_bytes and component_order. These are
65fea56f17cd614bc8908264df980a62e1931468vboxsync not communicated to the client until the time the surface is
65fea56f17cd614bc8908264df980a62e1931468vboxsync The driver may pass data back to the client in the same manner as the
65fea56f17cd614bc8908264df980a62e1931468vboxsync xf86XvMCCreateContextProc.
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef int (*xf86XvMCCreateSubpictureProcPtr) (ScrnInfoPtr pScrn,
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef void (*xf86XvMCDestroySubpictureProcPtr) (ScrnInfoPtr pScrn,
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct {
65fea56f17cd614bc8908264df980a62e1931468vboxsync xf86XvMCDestroySubpictureProcPtr DestroySubpicture;
65fea56f17cd614bc8908264df980a62e1931468vboxsync xf86XvMCScreenInit
65fea56f17cd614bc8908264df980a62e1931468vboxsync Unlike Xv, the adaptor data is not copied from this structure.
65fea56f17cd614bc8908264df980a62e1931468vboxsync This structure's data is used so it must stick around for the
65fea56f17cd614bc8908264df980a62e1931468vboxsync life of the server. Note that it's an array of pointers not
65fea56f17cd614bc8908264df980a62e1931468vboxsync an array of structures.
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool xf86XvMCScreenInit(ScreenPtr pScreen,
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec(void);
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif /* _XF86XVMC_H */