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