diff options
Diffstat (limited to 'src/xvmc/intel_xvmc.h')
-rw-r--r-- | src/xvmc/intel_xvmc.h | 53 |
1 files changed, 46 insertions, 7 deletions
diff --git a/src/xvmc/intel_xvmc.h b/src/xvmc/intel_xvmc.h index 1d6ff7123..fd1326e16 100644 --- a/src/xvmc/intel_xvmc.h +++ b/src/xvmc/intel_xvmc.h @@ -1,4 +1,29 @@ - +/* + * Copyright © 2007 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Authors: + * Zhenyu Wang <zhenyu.z.wang@intel.com> + * + */ #ifndef INTEL_XVMC_H #define INTEL_XVMC_H @@ -16,6 +41,7 @@ #include <xf86drm.h> #include "i830_common.h" #include "i830_hwmc.h" +#include <X11/X.h> #include <X11/Xlibint.h> #include <X11/Xutil.h> #include <fourcc.h> @@ -83,13 +109,21 @@ struct _intel_xvmc_driver { char busID[32]; int fd; /* drm file handler */ void *private; - /* XXX: api hooks */ - int (*init)(/*XXX*/); - void (*fini)(/*XXX*/); - int (*create_context)(Display* display, XvMCContext *context, int priv_count, CARD32 *priv_data); + /* XXX: remove? */ + int (*init)(void); + void (*fini)(void); + + /* driver specific xvmc callbacks */ + int (*create_context)(Display* display, XvMCContext *context, + int priv_count, CARD32 *priv_data); + int (*destroy_context)(Display* display, XvMCContext *context); - int (*create_surface)(Display* display, XvMCContext *context, XvMCSurface *surface); + + int (*create_surface)(Display* display, XvMCContext *context, + XvMCSurface *surface); + int (*destroy_surface)(Display* display, XvMCSurface *surface); + int (*render_surface)(Display *display, XvMCContext *context, unsigned int picture_structure, XvMCSurface *target_surface, @@ -100,13 +134,18 @@ struct _intel_xvmc_driver { unsigned int first_macroblock, XvMCMacroBlockArray *macroblock_array, XvMCBlockArray *blocks); - int (*put_surface)(Display *display,XvMCSurface *surface, + + /* XXX this should be same for all drivers */ + int (*put_surface)(Display *display, XvMCSurface *surface, Drawable draw, short srcx, short srcy, unsigned short srcw, unsigned short srch, short destx, short desty, unsigned short destw, unsigned short desth, int flags); + int (*get_surface_status)(Display *display, XvMCSurface *surface, int *stat); + + /* XXX more for vld */ }; extern struct _intel_xvmc_driver i915_xvmc_mc_driver; |