summaryrefslogtreecommitdiff
path: root/src/xvmc
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2007-10-23 22:16:55 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2007-10-23 22:16:55 +0800
commit9c84543eb0fde4643eb7529eb6b08eacf57c12d0 (patch)
tree82adf3f73a92a27c7d8abff3f749b7ab6586cdf8 /src/xvmc
parent90e4eafdf59edd966ed626107c3909b24737da8d (diff)
downloadxf86-video-intel-9c84543eb0fde4643eb7529eb6b08eacf57c12d0.tar.gz
xf86-video-intel-9c84543eb0fde4643eb7529eb6b08eacf57c12d0.tar.bz2
xf86-video-intel-9c84543eb0fde4643eb7529eb6b08eacf57c12d0.zip
add missing license header for new files
Diffstat (limited to 'src/xvmc')
-rw-r--r--src/xvmc/intel_xvmc.c41
-rw-r--r--src/xvmc/intel_xvmc.h53
2 files changed, 72 insertions, 22 deletions
diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c
index 8c770ceec..30df1efb6 100644
--- a/src/xvmc/intel_xvmc.c
+++ b/src/xvmc/intel_xvmc.c
@@ -1,19 +1,30 @@
-
-/* public interface file */
-
-#include <X11/X.h>
-#include <X11/Xlibint.h>
-#include <fourcc.h>
-#include <X11/extensions/Xv.h>
-#include <X11/extensions/Xvlib.h>
-#include <X11/extensions/XvMC.h>
-#include <X11/extensions/XvMClib.h>
-#include <xf86drm.h>
-#include <drm_sarea.h>
-
+/*
+ * 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>
+ *
+ */
#include "intel_xvmc.h"
-#include "xf86dri.h"
-#include "driDrawable.h"
static struct _intel_xvmc_driver* xvmc_driver = NULL;
static int error_base;
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;