annotate libvo/vo_xv.c @ 614:f83ec60bce49

fprintf(stderr converted to printf(
author szabii
date Tue, 24 Apr 2001 11:30:57 +0000
parents 77e0094f0cce
children 41d6eec69b60
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
2 /*
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
3 * vo_xv.c, X11 Xv interface
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 *
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
5 * Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved.
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 * Hacked into mpeg2dec by
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
8 *
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 * Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11 * Xv image suuport by Gerd Knorr <kraxel@goldbach.in-berlin.de>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 #include <stdio.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 #include <stdlib.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 #include <string.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 #include "config.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 #include "video_out.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 #include "video_out_internal.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22 LIBVO_EXTERN(xv)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 #include <X11/Xlib.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 #include <X11/Xutil.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 #include <X11/extensions/XShm.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 #include <errno.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
29 #include "x11_common.h"
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
30
354
7de9e48c83a5 memcpy() moved mmx.h -> fastmemcpy.h
arpi_esp
parents: 350
diff changeset
31 #include "fastmemcpy.h"
350
601822cc8c52 applied MMX2 memcpy() patch by Nick Kurshev
arpi_esp
parents: 326
diff changeset
32
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
33 static vo_info_t vo_info =
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34 {
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
35 "X11/Xv",
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
36 "xv",
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
37 "Gerd Knorr <kraxel@goldbach.in-berlin.de>",
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
38 ""
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 /* since it doesn't seem to be defined on some platforms */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 int XShmGetEventBase(Display*);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 /* local data */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45 static unsigned char *ImageData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 /* X11 related variables */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 static Display *mydisplay;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 static Window mywindow;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 static GC mygc;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 static XImage *myximage;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 static int depth, bpp, mode;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 static XWindowAttributes attribs;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 #include <X11/extensions/Xv.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 #include <X11/extensions/Xvlib.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 // FIXME: dynamically allocate this stuff
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 static void allocate_xvimage(int);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 static unsigned int ver,rel,req,ev,err;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 static unsigned int formats, adaptors,i,xv_port,xv_format;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 static XvAdaptorInfo *ai;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 static XvImageFormatValues *fo;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 static XvImage *xvimage[1];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 #include <sys/ipc.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66 #include <sys/shm.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67 #include <X11/extensions/XShm.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 static int Shmem_Flag;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70 static int Quiet_Flag;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71 static XShmSegmentInfo Shminfo[1];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 static int gXErrorFlag;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 static int CompletionType = -1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75 static uint32_t image_width;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76 static uint32_t image_height;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77 static uint32_t image_format;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
79 static Window mRoot;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
80 static uint32_t drwX,drwY,drwWidth,drwHeight,drwBorderWidth,drwDepth;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
81 static uint32_t drwcX,drwcY,dwidth,dheight,mFullscreen;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
82
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
83 /*
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
84 * connect to server, create and map window,
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
85 * allocate colors and (shared) memory
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
86 */
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
87 static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88 {
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
89 int screen;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
90 char *hello = (title == NULL) ? "Xv render" : title;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
91 char *name = ":0.0";
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
92 XSizeHints hint;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
93 XVisualInfo vinfo;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
94 XEvent xev;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
96 XGCValues xgcv;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
97 XSetWindowAttributes xswa;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
98 unsigned long xswamask;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
99
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
100 image_height = height;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
101 image_width = width;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
102 image_format=format;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
103
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
104 mFullscreen=fullscreen;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
105 dwidth=d_width; dheight=d_height;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
106
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
107 if(getenv("DISPLAY")) name = getenv("DISPLAY");
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
108
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
109 mydisplay = XOpenDisplay(name);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
110
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
111 if (mydisplay == NULL)
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
112 {
614
f83ec60bce49 fprintf(stderr converted to printf(
szabii
parents: 612
diff changeset
113 printf("Can't open display\n");
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
114 return -1;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
115 }
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
116
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
117 screen = DefaultScreen(mydisplay);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
118
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
119 hint.x = 0;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
120 hint.y = 0;
611
a188733d60de -xy-x-y bug fixed.
pontscho
parents: 450
diff changeset
121 hint.width = d_width;
a188733d60de -xy-x-y bug fixed.
pontscho
parents: 450
diff changeset
122 hint.height = d_height;
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
123 if ( fullscreen )
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
124 {
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
125 hint.width=vo_screenwidth;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
126 hint.height=vo_screenheight;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
127 }
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
128 hint.flags = PPosition | PSize;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
129 XGetWindowAttributes(mydisplay, DefaultRootWindow(mydisplay), &attribs);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
130 depth=attribs.depth;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
131 if (depth != 15 && depth != 16 && depth != 24 && depth != 32) depth = 24;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
132 XMatchVisualInfo(mydisplay, screen, depth, TrueColor, &vinfo);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
133
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
134 xswa.background_pixel = 0;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
135 xswa.border_pixel = 0;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
136 xswamask = CWBackPixel | CWBorderPixel;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
137
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
138 mywindow = XCreateWindow(mydisplay, RootWindow(mydisplay,screen),
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
139 hint.x, hint.y, hint.width, hint.height,
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
140 0, depth,CopyFromParent,vinfo.visual,xswamask,&xswa);
384
b0e4e5744899 Autohide X11 cursor
lgb
parents: 354
diff changeset
141 vo_hidecursor(mydisplay,mywindow);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
142
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
143 XSelectInput(mydisplay, mywindow, StructureNotifyMask | KeyPressMask );
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
144 XSetStandardProperties(mydisplay, mywindow, hello, hello, None, NULL, 0, &hint);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
145 if ( fullscreen ) vo_x11_decoration( mydisplay,mywindow,0 );
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
146 XMapWindow(mydisplay, mywindow);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
147 XFlush(mydisplay);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
148 XSync(mydisplay, False);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
149
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
150 mygc = XCreateGC(mydisplay, mywindow, 0L, &xgcv);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
151
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
152 xv_port = 0;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
153 if (Success == XvQueryExtension(mydisplay,&ver,&rel,&req,&ev,&err))
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
154 {
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
155 /* check for Xvideo support */
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
156 if (Success != XvQueryAdaptors(mydisplay,DefaultRootWindow(mydisplay), &adaptors,&ai))
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
157 {
614
f83ec60bce49 fprintf(stderr converted to printf(
szabii
parents: 612
diff changeset
158 printf("Xv: XvQueryAdaptors failed");
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
159 return -1;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
160 }
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
161 /* check adaptors */
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
162 for (i = 0; i < adaptors; i++)
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
163 {
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
164 if ((ai[i].type & XvInputMask) && (ai[i].type & XvImageMask) && (xv_port == 0)) xv_port = ai[i].base_id;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
165 }
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
166 /* check image formats */
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
167 if (xv_port != 0)
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
168 {
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
169 fo = XvListImageFormats(mydisplay, xv_port, (int*)&formats);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
170 xv_format=0;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
171 for(i = 0; i < formats; i++)
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
172 {
614
f83ec60bce49 fprintf(stderr converted to printf(
szabii
parents: 612
diff changeset
173 printf("Xvideo image format: 0x%x (%4.4s) %s\n", fo[i].id,(char*)&fo[i].id, (fo[i].format == XvPacked) ? "packed" : "planar");
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
174
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
175 if (fo[i].id == format)
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
176 {
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
177 xv_format = fo[i].id;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
178 }
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
179 }
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
180 if (!xv_format) xv_port = 0;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
181 }
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
183 if (xv_port != 0)
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
184 {
614
f83ec60bce49 fprintf(stderr converted to printf(
szabii
parents: 612
diff changeset
185 printf( "using Xvideo port %d for hw scaling\n",xv_port );
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
186
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
187 allocate_xvimage(0);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
188
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
189 XGetGeometry( mydisplay,mywindow,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth );
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
190 drwX=0; drwY=0;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
191 XTranslateCoordinates( mydisplay,mywindow,mRoot,0,0,&drwcX,&drwcY,&mRoot );
614
f83ec60bce49 fprintf(stderr converted to printf(
szabii
parents: 612
diff changeset
192 printf( "[xv] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
193
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
194 if ( mFullscreen )
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
195 {
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
196 drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
197 drwcX+=drwX;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
198 drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
199 drwcY+=drwY;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
200 drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
201 drwHeight=(dheight > vo_screenheight?vo_screenheight:dheight);
614
f83ec60bce49 fprintf(stderr converted to printf(
szabii
parents: 612
diff changeset
202 printf( "[xv-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
203 }
322
4e69a8e2700a Screensaver and monitor powersafe function is switched off when playing a
laaz
parents: 249
diff changeset
204
324
720c640332c8 Szebb es jobb screensaver-kikapcsolo resz
laaz
parents: 322
diff changeset
205 saver_off(mydisplay); // turning off screen saver
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
206 return 0;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
207 }
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
208 }
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
209
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
210 printf("Sorry, Xv not supported by this X11 version/driver\n");
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
211 printf("******** Try with -vo x11 or -vo sdl *********\n");
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
212 return 1;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
213 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
214
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
215 static const vo_info_t * get_info(void)
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
216 { return &vo_info; }
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
217
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
218 static void allocate_xvimage(int foo)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
219 {
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
220 /*
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
221 * allocate XvImages. FIXME: no error checking, without
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
222 * mit-shm this will bomb...
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
223 */
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
224 xvimage[foo] = XvShmCreateImage(mydisplay, xv_port, xv_format, 0, image_width, image_height, &Shminfo[foo]);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
225
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
226 Shminfo[foo].shmid = shmget(IPC_PRIVATE, xvimage[foo]->data_size, IPC_CREAT | 0777);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
227 Shminfo[foo].shmaddr = (char *) shmat(Shminfo[foo].shmid, 0, 0);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
228 Shminfo[foo].readOnly = False;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
229
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
230 xvimage[foo]->data = Shminfo[foo].shmaddr;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
231 XShmAttach(mydisplay, &Shminfo[foo]);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
232 XSync(mydisplay, False);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
233 shmctl(Shminfo[foo].shmid, IPC_RMID, 0);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
234 memset(xvimage[foo]->data,128,xvimage[foo]->data_size);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
235 return;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
236 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
237
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
238 static void check_events(void)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
239 {
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
240 int e=vo_x11_check_events(mydisplay);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
241 if(e&VO_EVENT_RESIZE)
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
242 {
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
243 XGetGeometry( mydisplay,mywindow,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth );
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
244 drwX=0; drwY=0;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
245 XTranslateCoordinates( mydisplay,mywindow,mRoot,0,0,&drwcX,&drwcY,&mRoot );
614
f83ec60bce49 fprintf(stderr converted to printf(
szabii
parents: 612
diff changeset
246 printf( "[xv] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
247
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
248 if ( mFullscreen )
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
249 {
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
250 drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
251 drwcX+=drwX;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
252 drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
253 drwcY+=drwY;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
254 drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
255 drwHeight=(dheight > vo_screenheight?vo_screenheight:dheight);
614
f83ec60bce49 fprintf(stderr converted to printf(
szabii
parents: 612
diff changeset
256 printf( "[xv-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
257 }
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
258 }
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
259 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
260
247
dd107cd7686d OSD/SUB support
arpi_esp
parents: 182
diff changeset
261
326
f6b5c2dbc88e OSD alpha renderers moved to osd.c
arpi_esp
parents: 324
diff changeset
262 //void vo_draw_alpha_yv12(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride);
f6b5c2dbc88e OSD alpha renderers moved to osd.c
arpi_esp
parents: 324
diff changeset
263 //void vo_draw_alpha_yuy2(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride);
f6b5c2dbc88e OSD alpha renderers moved to osd.c
arpi_esp
parents: 324
diff changeset
264
247
dd107cd7686d OSD/SUB support
arpi_esp
parents: 182
diff changeset
265 static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
dd107cd7686d OSD/SUB support
arpi_esp
parents: 182
diff changeset
266 int x,y;
dd107cd7686d OSD/SUB support
arpi_esp
parents: 182
diff changeset
267
408
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
268 switch (xv_format) {
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
269 case IMGFMT_YV12:
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
270 case IMGFMT_I420:
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
271 case IMGFMT_IYUV:
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
272 vo_draw_alpha_yv12(w,h,src,srca,stride,xvimage[0]->data+image_width*y0+x0,image_width);
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
273 break;
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
274 case IMGFMT_YUY2:
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
275 case IMGFMT_YVYU:
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
276 vo_draw_alpha_yuy2(w,h,src,srca,stride,xvimage[0]->data+2*(image_width*y0+x0),2*image_width);
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
277 break;
450
ce10c892074f fixed osd for UYVY image format
atmosfear
parents: 408
diff changeset
278 case IMGFMT_UYVY:
ce10c892074f fixed osd for UYVY image format
atmosfear
parents: 408
diff changeset
279 vo_draw_alpha_yuy2(w,h,src,srca,stride,xvimage[0]->data+2*(image_width*y0+x0)+1,2*image_width);
ce10c892074f fixed osd for UYVY image format
atmosfear
parents: 408
diff changeset
280 break;
408
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
281 }
247
dd107cd7686d OSD/SUB support
arpi_esp
parents: 182
diff changeset
282
dd107cd7686d OSD/SUB support
arpi_esp
parents: 182
diff changeset
283 }
dd107cd7686d OSD/SUB support
arpi_esp
parents: 182
diff changeset
284
612
77e0094f0cce some warnings killed
szabii
parents: 611
diff changeset
285 extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0,
77e0094f0cce some warnings killed
szabii
parents: 611
diff changeset
286 int w,int h, unsigned char* src, unsigned char *srca,
77e0094f0cce some warnings killed
szabii
parents: 611
diff changeset
287 int stride));
77e0094f0cce some warnings killed
szabii
parents: 611
diff changeset
288
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
289 static void flip_page(void)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
290 {
247
dd107cd7686d OSD/SUB support
arpi_esp
parents: 182
diff changeset
291 vo_draw_text(image_width,image_height,draw_alpha);
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
292 check_events();
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
293 XvShmPutImage(mydisplay, xv_port, mywindow, mygc, xvimage[0],
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
294 0, 0, image_width, image_height,
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
295 drwX,drwY,drwWidth,(mFullscreen?drwHeight - 1:drwHeight),
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
296 False);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
297 XFlush(mydisplay);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
298 return;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
299 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
300
247
dd107cd7686d OSD/SUB support
arpi_esp
parents: 182
diff changeset
301
dd107cd7686d OSD/SUB support
arpi_esp
parents: 182
diff changeset
302
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
303 static uint32_t draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
304 {
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
305 uint8_t *src;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
306 uint8_t *dst;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
307 int i;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
308
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
309 dst = xvimage[0]->data + image_width * y + x;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
310 src = image[0];
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
311 if(w==stride[0] && w==image_width) memcpy(dst,src,w*h);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
312 else
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
313 for(i=0;i<h;i++)
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
314 {
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
315 memcpy(dst,src,w);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
316 src+=stride[0];
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
317 dst+=image_width;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
318 }
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
319
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
320 x/=2;y/=2;w/=2;h/=2;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
321
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
322 dst = xvimage[0]->data + image_width * image_height + image_width/2 * y + x;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
323 src = image[2];
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
324 if(w==stride[2] && w==image_width/2) memcpy(dst,src,w*h);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
325 else
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
326 for(i=0;i<h;i++)
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
327 {
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
328 memcpy(dst,src,w);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
329 src+=stride[2];
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
330 dst+=image_width/2;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
331 }
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
332 dst = xvimage[0]->data + image_width * image_height * 5 / 4 + image_width/2 * y + x;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
333 src = image[1];
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
334 if(w==stride[1] && w==image_width/2) memcpy(dst,src,w*h);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
335 else
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
336 for(i=0;i<h;i++)
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
337 {
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
338 memcpy(dst,src,w);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
339 src+=stride[1];
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
340 dst+=image_width/2;
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
341 }
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
342 return 0;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
343 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
344
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
345 static uint32_t draw_frame(uint8_t *src[])
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
346 {
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
347 int foo;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
348
408
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
349 switch (xv_format) {
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
350 case IMGFMT_YUY2:
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
351 case IMGFMT_UYVY:
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
352 case IMGFMT_YVYU:
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
353
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
354 // YUY2 packed, flipped
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
355 #if 0
408
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
356 int i;
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
357 unsigned short *s=(unsigned short *)src[0];
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
358 unsigned short *d=(unsigned short *)xvimage[0]->data;
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
359 s+=image_width*image_height;
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
360 for(i=0;i<image_height;i++) {
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
361 s-=image_width;
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
362 memcpy(d,s,image_width*2);
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
363 d+=image_width;
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
364 }
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
365 #else
408
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
366 memcpy(xvimage[0]->data,src[0],image_width*image_height*2);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
367 #endif
408
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
368 break;
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
369
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
370 case IMGFMT_YV12:
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
371 case IMGFMT_I420:
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
372 case IMGFMT_IYUV:
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
373
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
374 // YV12 planar
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
375 memcpy(xvimage[0]->data,src[0],image_width*image_height);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
376 memcpy(xvimage[0]->data+image_width*image_height,src[2],image_width*image_height/4);
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
377 memcpy(xvimage[0]->data+image_width*image_height*5/4,src[1],image_width*image_height/4);
408
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
378 break;
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
379 }
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
380
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
381 return 0;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
382 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
383
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
384 static uint32_t query_format(uint32_t format)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
385 {
408
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
386
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
387 // umm, this is a kludge, we need to ask the server.. (see init function above)
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
388 return 1;
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
389 /*
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
390 switch(format)
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
391 {
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
392 case IMGFMT_YV12:
408
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
393 case IMGFMT_YUY2:
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
394 return 1;
182
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
395 }
80a7b40f201a *** empty log message ***
pontscho
parents: 31
diff changeset
396 return 0;
408
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 384
diff changeset
397 */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
398 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
399
322
4e69a8e2700a Screensaver and monitor powersafe function is switched off when playing a
laaz
parents: 249
diff changeset
400 static void uninit(void) {
324
720c640332c8 Szebb es jobb screensaver-kikapcsolo resz
laaz
parents: 322
diff changeset
401 saver_on(mydisplay); // screen saver back on
322
4e69a8e2700a Screensaver and monitor powersafe function is switched off when playing a
laaz
parents: 249
diff changeset
402 }
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
403
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
404
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
405