summaryrefslogtreecommitdiff
path: root/client/xvaccelrenderer.h
diff options
context:
space:
mode:
Diffstat (limited to 'client/xvaccelrenderer.h')
-rw-r--r--client/xvaccelrenderer.h65
1 files changed, 51 insertions, 14 deletions
diff --git a/client/xvaccelrenderer.h b/client/xvaccelrenderer.h
index b6a37f3..588516f 100644
--- a/client/xvaccelrenderer.h
+++ b/client/xvaccelrenderer.h
@@ -1,14 +1,51 @@
-/* -*- mode: c++ -*- */
-#include "types.h"
-
-class XvAccelRender//: public AccelRender
-{
-public:
- XvAccelRender();
- uint8_t init(QWidget *window, uint32_t w, uint32_t h);
- uint8_t end(void);
- uint8_t display(uint8_t *ptr, uint32_t w, uint32_t h);
-};
-
-
-
+/* -*- mode: c++ -*- */
+#ifndef __XVACCELRENDERER_H__
+#define __XVACCELRENDERER_H__
+
+#include <assert.h>
+
+#include <QWidget>
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <X11/extensions/XShm.h>
+#include <X11/extensions/Xvlib.h>
+#include <X11/extensions/XShm.h>
+#include <errno.h>
+
+//typedef unsigned long int QWidget;
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned long int uint32_t;
+
+#define ADM_assert(x) assert(x)
+
+class XvAccelRender
+{
+public:
+ XvAccelRender();
+ uint8_t init(QWidget *window, uint32_t w, uint32_t h);
+ uint8_t end(void);
+ uint8_t display(uint8_t *ptr, uint32_t w, uint32_t h);
+
+ unsigned int width, height;
+
+private:
+ unsigned int xv_port;
+ uint32_t xv_format;
+ Display *xv_display;
+ XvImage *xvimage;
+ GC xv_gc;
+ XGCValues xv_xgc;
+ Window xv_win;
+ XShmSegmentInfo Shminfo;
+
+ uint8_t GUI_XvList(Display *dis, uint32_t port, uint32_t * fmt);
+ uint8_t GUI_XvInit(QWidget *window, uint32_t w, uint32_t h);
+ void GUI_XvEnd();
+ uint8_t GUI_XvDisplay(uint8_t * src, uint32_t w, uint32_t h);
+};
+
+#endif/*__XVACCELRENDERER_H__*/