Commit 9c84543e authored by Zhenyu Wang's avatar Zhenyu Wang

add missing license header for new files

parent 90e4eafd
/*
/* public interface file */ * Copyright © 2007 Intel Corporation
*
#include <X11/X.h> * Permission is hereby granted, free of charge, to any person obtaining a
#include <X11/Xlibint.h> * copy of this software and associated documentation files (the "Software"),
#include <fourcc.h> * to deal in the Software without restriction, including without limitation
#include <X11/extensions/Xv.h> * the rights to use, copy, modify, merge, publish, distribute, sublicense,
#include <X11/extensions/Xvlib.h> * and/or sell copies of the Software, and to permit persons to whom the
#include <X11/extensions/XvMC.h> * Software is furnished to do so, subject to the following conditions:
#include <X11/extensions/XvMClib.h> *
#include <xf86drm.h> * The above copyright notice and this permission notice (including the next
#include <drm_sarea.h> * 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>
*
*/
#include "intel_xvmc.h" #include "intel_xvmc.h"
#include "xf86dri.h"
#include "driDrawable.h"
static struct _intel_xvmc_driver* xvmc_driver = NULL; static struct _intel_xvmc_driver* xvmc_driver = NULL;
static int error_base; static int error_base;
......
/*
* 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 #ifndef INTEL_XVMC_H
#define INTEL_XVMC_H #define INTEL_XVMC_H
...@@ -16,6 +41,7 @@ ...@@ -16,6 +41,7 @@
#include <xf86drm.h> #include <xf86drm.h>
#include "i830_common.h" #include "i830_common.h"
#include "i830_hwmc.h" #include "i830_hwmc.h"
#include <X11/X.h>
#include <X11/Xlibint.h> #include <X11/Xlibint.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <fourcc.h> #include <fourcc.h>
...@@ -83,13 +109,21 @@ struct _intel_xvmc_driver { ...@@ -83,13 +109,21 @@ struct _intel_xvmc_driver {
char busID[32]; char busID[32];
int fd; /* drm file handler */ int fd; /* drm file handler */
void *private; void *private;
/* XXX: api hooks */ /* XXX: remove? */
int (*init)(/*XXX*/); int (*init)(void);
void (*fini)(/*XXX*/); void (*fini)(void);
int (*create_context)(Display* display, XvMCContext *context, int priv_count, CARD32 *priv_data);
/* 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 (*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 (*destroy_surface)(Display* display, XvMCSurface *surface);
int (*render_surface)(Display *display, XvMCContext *context, int (*render_surface)(Display *display, XvMCContext *context,
unsigned int picture_structure, unsigned int picture_structure,
XvMCSurface *target_surface, XvMCSurface *target_surface,
...@@ -100,13 +134,18 @@ struct _intel_xvmc_driver { ...@@ -100,13 +134,18 @@ struct _intel_xvmc_driver {
unsigned int first_macroblock, unsigned int first_macroblock,
XvMCMacroBlockArray *macroblock_array, XvMCMacroBlockArray *macroblock_array,
XvMCBlockArray *blocks); 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, Drawable draw, short srcx, short srcy,
unsigned short srcw, unsigned short srch, unsigned short srcw, unsigned short srch,
short destx, short desty, short destx, short desty,
unsigned short destw, unsigned short desth, unsigned short destw, unsigned short desth,
int flags); int flags);
int (*get_surface_status)(Display *display, XvMCSurface *surface, int *stat); int (*get_surface_status)(Display *display, XvMCSurface *surface, int *stat);
/* XXX more for vld */
}; };
extern struct _intel_xvmc_driver i915_xvmc_mc_driver; extern struct _intel_xvmc_driver i915_xvmc_mc_driver;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment