Mercurial > mplayer.hg
annotate libvo/vo_gl.c @ 6794:77980ab4e296
- add preferences support (first try)
- fix some playlist bug
- fix some equ bug
- fix some redraw bug
- fix dvd playing
- fix file open dialog box
- etc.
author | pontscho |
---|---|
date | Thu, 25 Jul 2002 20:26:38 +0000 |
parents | 2001affedb75 |
children | ce67cc1f0beb |
rev | line source |
---|---|
1 | 1 #define DISP |
2 | |
3 // this can be 3 or 4 (regarding 24bpp and 32bpp) | |
4 #define BYTES_PP 3 | |
5 | |
6 #define TEXTUREFORMAT_32BPP | |
7 | |
8 /* | |
9 * video_out_gl.c, X11/OpenGL interface | |
10 * based on video_out_x11 by Aaron Holtzman, | |
11 * and WS opengl window manager by Pontscho/Fresh! | |
12 */ | |
13 | |
14 #include <stdio.h> | |
15 #include <stdlib.h> | |
16 #include <string.h> | |
17 #include <math.h> | |
4737
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4658
diff
changeset
|
18 #include <errno.h> |
1 | 19 |
20 #include "config.h" | |
21 #include "video_out.h" | |
22 #include "video_out_internal.h" | |
23 | |
24 | |
25 LIBVO_EXTERN(gl) | |
26 | |
27 #include <X11/Xlib.h> | |
28 #include <X11/Xutil.h> | |
29 //#include <X11/keysym.h> | |
30 #include <GL/glx.h> | |
31 #include <errno.h> | |
2732 | 32 #include "../postproc/rgb2rgb.h" |
1 | 33 |
34 #include <GL/gl.h> | |
35 | |
31 | 36 #include "x11_common.h" |
2057 | 37 #include "aspect.h" |
31 | 38 |
1 | 39 static vo_info_t vo_info = |
40 { | |
41 "X11 (OpenGL)", | |
42 "gl", | |
43 "Arpad Gereoffy <arpi@esp-team.scene.hu>", | |
44 "" | |
45 }; | |
46 | |
47 /* private prototypes */ | |
1109 | 48 // static void Display_Image (unsigned char *ImageData); |
1 | 49 |
50 /* local data */ | |
51 static unsigned char *ImageData=NULL; | |
52 | |
53 /* X11 related variables */ | |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
54 //static Display *mydisplay; |
6095 | 55 //static Window vo_window; |
1 | 56 //static GC mygc; |
57 //static XImage *myximage; | |
58 //static int depth,mode; | |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
59 //static XWindowAttributes attribs; |
1109 | 60 //static int texture_id=1; |
1 | 61 |
62 static GLXContext wsGLXContext; | |
63 //XVisualInfo * wsVisualInfo; | |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
64 static int wsGLXAttrib[] = { GLX_RGBA, |
1 | 65 GLX_RED_SIZE,1, |
66 GLX_GREEN_SIZE,1, | |
67 GLX_BLUE_SIZE,1, | |
68 // GLX_DEPTH_SIZE,16, | |
69 GLX_DOUBLEBUFFER, | |
70 None }; | |
71 | |
72 | |
73 static uint32_t image_width; | |
74 static uint32_t image_height; | |
75 static uint32_t image_format; | |
76 static uint32_t image_bpp; | |
77 static uint32_t image_bytes; | |
78 | |
79 static uint32_t texture_width; | |
80 static uint32_t texture_height; | |
81 | |
612 | 82 static void resize(int x,int y){ |
1290 | 83 printf("[gl] Resize: %dx%d\n",x,y); |
1 | 84 glViewport( 0, 0, x, y ); |
85 | |
86 glMatrixMode(GL_PROJECTION); | |
87 glLoadIdentity(); | |
88 glOrtho(0, image_width, image_height, 0, -1,1); | |
89 | |
90 glMatrixMode(GL_MODELVIEW); | |
91 glLoadIdentity(); | |
92 } | |
93 | |
94 /* connect to server, create and map window, | |
95 * allocate colors and (shared) memory | |
96 */ | |
97 static uint32_t | |
4448
ab4ec4b99531
change init to config in vo_gl and vo_md5 like in the other vo_ modules -- fixes crash caused by the changeover
rfelker
parents:
4440
diff
changeset
|
98 config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format,const vo_tune_info_t *info) |
1 | 99 { |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
100 // int screen; |
1 | 101 unsigned int fg, bg; |
102 char *hello = (title == NULL) ? "OpenGL rulez" : title; | |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
103 // char *name = ":0.0"; |
1 | 104 XSizeHints hint; |
105 XVisualInfo *vinfo; | |
106 XEvent xev; | |
107 | |
1109 | 108 // XGCValues xgcv; |
1 | 109 XSetWindowAttributes xswa; |
110 unsigned long xswamask; | |
111 | |
112 image_height = height; | |
113 image_width = width; | |
114 image_format = format; | |
115 | |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
116 if(!vo_init()) return -1; |
1 | 117 |
2249
48f0ac1e9d13
Update to new (cleaner, more bugfree, better) aspect api. vo_gl vo_gl2 and vo_xmga are untested!
atmos4
parents:
2057
diff
changeset
|
118 aspect_save_orig(width,height); |
48f0ac1e9d13
Update to new (cleaner, more bugfree, better) aspect api. vo_gl vo_gl2 and vo_xmga are untested!
atmos4
parents:
2057
diff
changeset
|
119 aspect_save_prescale(d_width,d_height); |
48f0ac1e9d13
Update to new (cleaner, more bugfree, better) aspect api. vo_gl vo_gl2 and vo_xmga are untested!
atmos4
parents:
2057
diff
changeset
|
120 aspect_save_screenres(vo_screenwidth,vo_screenheight); |
48f0ac1e9d13
Update to new (cleaner, more bugfree, better) aspect api. vo_gl vo_gl2 and vo_xmga are untested!
atmos4
parents:
2057
diff
changeset
|
121 |
48f0ac1e9d13
Update to new (cleaner, more bugfree, better) aspect api. vo_gl vo_gl2 and vo_xmga are untested!
atmos4
parents:
2057
diff
changeset
|
122 aspect(&d_width,&d_height,A_NOZOOM); |
2040 | 123 #ifdef X11_FULLSCREEN |
6095 | 124 // if( flags&0x01 ){ // (-fs) |
125 // aspect(&d_width,&d_height,A_ZOOM); | |
126 // } | |
2040 | 127 #endif |
1 | 128 hint.x = 0; |
129 hint.y = 0; | |
130 hint.width = d_width; | |
131 hint.height = d_height; | |
132 hint.flags = PPosition | PSize; | |
133 | |
134 /* Get some colors */ | |
135 | |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
136 bg = WhitePixel(mDisplay, mScreen); |
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
137 fg = BlackPixel(mDisplay, mScreen); |
1 | 138 |
139 /* Make the window */ | |
140 | |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
141 // XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &attribs); |
1 | 142 |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
143 // XMatchVisualInfo(mDisplay, screen, depth, TrueColor, &vinfo); |
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
144 vinfo=glXChooseVisual( mDisplay,mScreen,wsGLXAttrib ); |
1290 | 145 if (vinfo == NULL) |
146 { | |
147 printf("[gl] no GLX support present\n"); | |
148 return -1; | |
149 } | |
1 | 150 |
151 xswa.background_pixel = 0; | |
152 xswa.border_pixel = 1; | |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
153 // xswa.colormap = XCreateColormap(mDisplay, mRootWin, vinfo.visual, AllocNone); |
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
154 xswa.colormap = XCreateColormap(mDisplay, mRootWin, vinfo->visual, AllocNone); |
1 | 155 xswamask = CWBackPixel | CWBorderPixel | CWColormap; |
156 // xswamask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask | CWCursor | CWOverrideRedirect | CWSaveUnder | CWX | CWY | CWWidth | CWHeight; | |
157 | |
6095 | 158 vo_window = XCreateWindow(mDisplay, mRootWin, |
1 | 159 hint.x, hint.y, hint.width, hint.height, 4, vinfo->depth,CopyFromParent,vinfo->visual,xswamask,&xswa); |
1137
4c7b219e126c
patch: some X11 compliance fixed: set ClassHint and better fullscreen mode
arpi_esp
parents:
1109
diff
changeset
|
160 |
6095 | 161 vo_x11_classhint( mDisplay,vo_window,"gl" ); |
162 vo_hidecursor(mDisplay,vo_window); | |
1 | 163 |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
164 wsGLXContext=glXCreateContext( mDisplay,vinfo,NULL,True ); |
1 | 165 // XStoreName( wsDisplay,wsMyWin,wsSysName ); |
166 | |
167 // printf("GLXcontext ok\n"); | |
168 | |
6095 | 169 // if ( flags&0x01 ) vo_x11_decoration( mDisplay,vo_window,0 ); |
1 | 170 |
6095 | 171 XSelectInput(mDisplay, vo_window, StructureNotifyMask); |
1 | 172 |
173 /* Tell other applications about this window */ | |
174 | |
6095 | 175 XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint); |
1 | 176 |
177 /* Map window. */ | |
178 | |
6095 | 179 XMapWindow(mDisplay, vo_window); |
180 if ( flags&1 ) vo_x11_fullscreen(); | |
4017 | 181 #ifdef HAVE_XINERAMA |
6095 | 182 vo_x11_xinerama_move(mDisplay,vo_window); |
4017 | 183 #endif |
1 | 184 |
185 /* Wait for map. */ | |
186 do | |
187 { | |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
188 XNextEvent(mDisplay, &xev); |
1 | 189 } |
6095 | 190 while (xev.type != MapNotify || xev.xmap.event != vo_window); |
1 | 191 |
6095 | 192 XSelectInput(mDisplay, vo_window, NoEventMask); |
1 | 193 |
6095 | 194 glXMakeCurrent( mDisplay,vo_window,wsGLXContext ); |
1 | 195 |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
196 XFlush(mDisplay); |
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
197 XSync(mDisplay, False); |
1 | 198 |
6095 | 199 // mygc = XCreateGC(mDisplay, vo_window, 0L, &xgcv); |
1 | 200 |
6095 | 201 // myximage = XGetImage(mDisplay, vo_window, 0, 0, |
1 | 202 // width, image_height, AllPlanes, ZPixmap); |
203 // ImageData = myximage->data; | |
204 // bpp = myximage->bits_per_pixel; | |
205 | |
6095 | 206 //XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!! |
207 XSelectInput(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask | |
4658 | 208 #ifdef HAVE_NEW_INPUT |
209 | ButtonPressMask | ButtonReleaseMask | |
210 #endif | |
211 ); | |
1 | 212 |
213 // printf("Window setup ok\n"); | |
214 | |
215 #if 0 | |
216 // If we have blue in the lowest bit then obviously RGB | |
217 mode = ((myximage->blue_mask & 0x01) != 0) ? MODE_RGB : MODE_BGR; | |
218 #ifdef WORDS_BIGENDIAN | |
219 if (myximage->byte_order != MSBFirst) | |
220 #else | |
221 if (myximage->byte_order != LSBFirst) | |
222 #endif | |
223 { | |
1302 | 224 printf("[gl] no support for non-native XImage byte order!\n"); |
1 | 225 return -1; |
226 } | |
227 | |
228 printf("DEPTH=%d BPP=%d\n",depth,bpp); | |
229 #endif | |
230 | |
231 /* | |
232 * If depth is 24 then it may either be a 3 or 4 byte per pixel | |
233 * format. We can't use bpp because then we would lose the | |
234 * distinction between 15/16bit depth (2 byte formate assumed). | |
235 * | |
236 * FIXME - change yuv2rgb_init to take both depth and bpp | |
237 * parameters | |
238 */ | |
239 | |
240 texture_width=32; | |
241 while(texture_width<image_width) texture_width*=2; | |
242 while(texture_width<image_height) texture_width*=2; | |
243 texture_height=texture_width; | |
244 | |
245 if(format==IMGFMT_YV12){ | |
246 yuv2rgb_init(8*BYTES_PP, MODE_BGR); | |
1290 | 247 printf("[gl] YUV init OK!\n"); |
1 | 248 image_bpp=8*BYTES_PP; |
249 image_bytes=BYTES_PP; | |
250 } else { | |
251 image_bpp=format&0xFF; | |
252 image_bytes=(image_bpp+7)/8; | |
253 } | |
254 | |
255 ImageData=malloc(texture_width*texture_height*image_bytes); | |
256 memset(ImageData,128,texture_width*texture_height*image_bytes); | |
257 | |
258 glDisable(GL_BLEND); | |
259 glDisable(GL_DEPTH_TEST); | |
260 glDepthMask(GL_FALSE); | |
261 glDisable(GL_CULL_FACE); | |
262 | |
263 glEnable(GL_TEXTURE_2D); | |
264 | |
1290 | 265 printf("[gl] Creating %dx%d texture...\n",texture_width,texture_height); |
1 | 266 |
267 #if 1 | |
268 // glBindTexture(GL_TEXTURE_2D, texture_id); | |
269 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, GL_LINEAR); | |
270 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_LINEAR); | |
271 #ifdef TEXTUREFORMAT_32BPP | |
272 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, texture_width, texture_height, 0, | |
273 #else | |
274 glTexImage2D(GL_TEXTURE_2D, 0, BYTES_PP, texture_width, texture_height, 0, | |
275 #endif | |
276 (image_bytes==4)?GL_RGBA:GL_BGR, GL_UNSIGNED_BYTE, ImageData); | |
277 #endif | |
278 | |
279 resize(d_width,d_height); | |
280 | |
281 glClearColor( 1.0f,0.0f,1.0f,0.0f ); | |
282 glClear( GL_COLOR_BUFFER_BIT ); | |
283 | |
284 // printf("OpenGL setup OK!\n"); | |
285 | |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
286 saver_off(mDisplay); // turning off screen saver |
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
287 |
1 | 288 return 0; |
289 } | |
290 | |
291 static const vo_info_t* | |
292 get_info(void) | |
293 { | |
294 return &vo_info; | |
295 } | |
296 | |
31 | 297 static void check_events(void) |
1 | 298 { |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
299 int e=vo_x11_check_events(mDisplay); |
31 | 300 if(e&VO_EVENT_RESIZE) resize(vo_dwidth,vo_dheight); |
301 } | |
1 | 302 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1302
diff
changeset
|
303 static void draw_osd(void) |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1302
diff
changeset
|
304 { |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1302
diff
changeset
|
305 } |
31 | 306 |
307 static void | |
308 flip_page(void) | |
309 { | |
310 | |
1 | 311 // glEnable(GL_TEXTURE_2D); |
312 // glBindTexture(GL_TEXTURE_2D, texture_id); | |
313 | |
314 glColor3f(1,1,1); | |
315 glBegin(GL_QUADS); | |
316 glTexCoord2f(0,0);glVertex2i(0,0); | |
317 glTexCoord2f(0,1);glVertex2i(0,texture_height); | |
318 glTexCoord2f(1,1);glVertex2i(texture_width,texture_height); | |
319 glTexCoord2f(1,0);glVertex2i(texture_width,0); | |
320 glEnd(); | |
321 | |
322 // glFlush(); | |
323 glFinish(); | |
6095 | 324 glXSwapBuffers( mDisplay,vo_window ); |
325 | |
1 | 326 } |
327 | |
328 //static inline uint32_t draw_slice_x11(uint8_t *src[], uint32_t slice_num) | |
329 static uint32_t draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y) | |
330 { | |
331 int i; | |
332 int dstride=w*BYTES_PP; | |
333 | |
334 // dstride=(dstride+15)&(~15); | |
335 | |
336 yuv2rgb(ImageData, src[0], src[1], src[2], | |
337 w,h, dstride, stride[0],stride[1]); | |
338 | |
339 // emms (); | |
340 | |
341 for(i=0;i<h;i++){ | |
342 glTexSubImage2D( GL_TEXTURE_2D, // target | |
343 0, // level | |
344 x, // x offset | |
345 y+i, // y offset | |
346 w, // width | |
347 1, // height | |
348 (BYTES_PP==4)?GL_RGBA:GL_RGB, // format | |
349 GL_UNSIGNED_BYTE, // type | |
350 ImageData+i*dstride ); // *pixels | |
351 } | |
352 | |
353 return 0; | |
354 } | |
355 | |
356 static inline uint32_t | |
357 draw_frame_x11_yv12(uint8_t *src[]) | |
358 { | |
359 int i; | |
360 // printf("Converting YUV->RGB...\n"); | |
361 yuv2rgb(ImageData, src[0], src[1], src[2], | |
362 image_width, image_height, | |
363 image_width*BYTES_PP, image_width, image_width/2 ); | |
364 // printf("Ready!\n"); | |
365 | |
366 // emms (); | |
367 | |
368 for(i=0;i<image_height;i++){ | |
369 glTexSubImage2D( GL_TEXTURE_2D, // target | |
370 0, // level | |
371 0, // x offset | |
372 i, // y offset | |
373 image_width, // width | |
374 1, // height | |
375 (BYTES_PP==4)?GL_RGBA:GL_RGB, // format | |
376 GL_UNSIGNED_BYTE, // type | |
377 ImageData+i*BYTES_PP*image_width ); // *pixels | |
378 } | |
379 | |
380 // Display_Image(ImageData); | |
381 return 0; | |
382 } | |
383 | |
384 | |
385 static inline uint32_t | |
386 draw_frame_x11_bgr(uint8_t *src[]) | |
387 { | |
388 int i; | |
389 uint8_t *s=src[0]; | |
390 uint8_t *de=&ImageData[3*image_width]; | |
391 | |
392 for(i=0;i<image_height;i++){ | |
393 uint8_t *d=ImageData; | |
394 while(d<de){ | |
395 d[0]=s[2]; | |
396 d[1]=s[1]; | |
397 d[2]=s[0]; | |
398 s+=3;d+=3; | |
399 } | |
400 glTexSubImage2D( GL_TEXTURE_2D, // target | |
401 0, // level | |
402 0, // x offset | |
403 // image_height-1-i, // y offset | |
404 i, // y offset | |
405 image_width, // width | |
406 1, // height | |
407 (image_bytes==4)?GL_RGBA:GL_RGB, // format | |
408 GL_UNSIGNED_BYTE, // type | |
409 ImageData); // *pixels | |
410 } | |
411 | |
412 // Display_Image(ImageData); | |
413 return 0; | |
414 } | |
415 | |
416 static inline uint32_t | |
417 draw_frame_x11_rgb(uint8_t *src[]) | |
418 { | |
419 int i; | |
420 uint8_t *ImageData=src[0]; | |
421 | |
422 for(i=0;i<image_height;i++){ | |
423 glTexSubImage2D( GL_TEXTURE_2D, // target | |
424 0, // level | |
425 0, // x offset | |
426 // image_height-1-i, // y offset | |
427 i, // y offset | |
428 image_width, // width | |
429 1, // height | |
430 (image_bytes==4)?GL_RGBA:GL_RGB, // format | |
431 GL_UNSIGNED_BYTE, // type | |
432 ImageData+i*image_bytes*image_width ); // *pixels | |
433 } | |
434 | |
435 // Display_Image(ImageData); | |
436 return 0; | |
437 } | |
438 | |
439 | |
440 static uint32_t | |
441 draw_frame(uint8_t *src[]) | |
442 { | |
443 if(image_format==IMGFMT_YV12) | |
444 return draw_frame_x11_yv12(src); | |
445 else | |
446 if((image_format&IMGFMT_RGB_MASK)==IMGFMT_RGB) | |
447 return draw_frame_x11_rgb(src); | |
448 else | |
449 return draw_frame_x11_bgr(src); | |
450 } | |
451 | |
452 static uint32_t | |
453 query_format(uint32_t format) | |
454 { | |
455 switch(format){ | |
456 case IMGFMT_YV12: | |
6212 | 457 return VFCAP_CSP_SUPPORTED; |
1 | 458 case IMGFMT_RGB|24: |
459 case IMGFMT_BGR|24: | |
6212 | 460 return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW; |
1 | 461 } |
462 return 0; | |
463 } | |
464 | |
465 | |
466 static void | |
467 uninit(void) | |
468 { | |
6095 | 469 if ( !vo_config_count ) return; |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
470 saver_on(mDisplay); // screen saver back on |
6095 | 471 vo_x11_uninit(); |
1 | 472 } |
4352 | 473 |
474 static uint32_t preinit(const char *arg) | |
475 { | |
4737
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4658
diff
changeset
|
476 if(arg) |
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4658
diff
changeset
|
477 { |
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4658
diff
changeset
|
478 printf("[gl] Unknown subdevice: %s\n",arg); |
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4658
diff
changeset
|
479 return ENOSYS; |
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4658
diff
changeset
|
480 } |
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4658
diff
changeset
|
481 return 0; |
4352 | 482 } |
483 | |
4596 | 484 static uint32_t control(uint32_t request, void *data, ...) |
4352 | 485 { |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4448
diff
changeset
|
486 switch (request) { |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4448
diff
changeset
|
487 case VOCTRL_QUERY_FORMAT: |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4448
diff
changeset
|
488 return query_format(*((uint32_t*)data)); |
6095 | 489 case VOCTRL_FULLSCREEN: |
490 vo_x11_fullscreen(); | |
491 return VO_TRUE; | |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4448
diff
changeset
|
492 } |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4448
diff
changeset
|
493 return VO_NOTIMPL; |
4352 | 494 } |