Mercurial > mplayer.hg
annotate libvo/vo_gl.c @ 7190:5137e9fb57e7
All RealVideo codecs liste on one line - less wasted space.
author | diego |
---|---|
date | Sat, 31 Aug 2002 13:05:33 +0000 |
parents | eca7dbad0166 |
children | ed7b05575aab |
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 | |
7124
eca7dbad0166
finally removed query_vaa, bes_da and vo_tune_info - the obsoleted libvo api
alex
parents:
7111
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) |
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); // !!!! |
6953
ce67cc1f0beb
ignore BadAccess error at XSelectInput() (grabbing mouse etc) with warning
arpi
parents:
6212
diff
changeset
|
207 vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask |
4658 | 208 | ButtonPressMask | ButtonReleaseMask |
209 ); | |
1 | 210 |
211 // printf("Window setup ok\n"); | |
212 | |
213 #if 0 | |
214 // If we have blue in the lowest bit then obviously RGB | |
215 mode = ((myximage->blue_mask & 0x01) != 0) ? MODE_RGB : MODE_BGR; | |
216 #ifdef WORDS_BIGENDIAN | |
217 if (myximage->byte_order != MSBFirst) | |
218 #else | |
219 if (myximage->byte_order != LSBFirst) | |
220 #endif | |
221 { | |
1302 | 222 printf("[gl] no support for non-native XImage byte order!\n"); |
1 | 223 return -1; |
224 } | |
225 | |
226 printf("DEPTH=%d BPP=%d\n",depth,bpp); | |
227 #endif | |
228 | |
229 /* | |
230 * If depth is 24 then it may either be a 3 or 4 byte per pixel | |
231 * format. We can't use bpp because then we would lose the | |
232 * distinction between 15/16bit depth (2 byte formate assumed). | |
233 * | |
234 * FIXME - change yuv2rgb_init to take both depth and bpp | |
235 * parameters | |
236 */ | |
237 | |
238 texture_width=32; | |
239 while(texture_width<image_width) texture_width*=2; | |
240 while(texture_width<image_height) texture_width*=2; | |
241 texture_height=texture_width; | |
242 | |
243 if(format==IMGFMT_YV12){ | |
244 yuv2rgb_init(8*BYTES_PP, MODE_BGR); | |
1290 | 245 printf("[gl] YUV init OK!\n"); |
1 | 246 image_bpp=8*BYTES_PP; |
247 image_bytes=BYTES_PP; | |
248 } else { | |
249 image_bpp=format&0xFF; | |
250 image_bytes=(image_bpp+7)/8; | |
251 } | |
252 | |
253 ImageData=malloc(texture_width*texture_height*image_bytes); | |
254 memset(ImageData,128,texture_width*texture_height*image_bytes); | |
255 | |
256 glDisable(GL_BLEND); | |
257 glDisable(GL_DEPTH_TEST); | |
258 glDepthMask(GL_FALSE); | |
259 glDisable(GL_CULL_FACE); | |
260 | |
261 glEnable(GL_TEXTURE_2D); | |
262 | |
1290 | 263 printf("[gl] Creating %dx%d texture...\n",texture_width,texture_height); |
1 | 264 |
265 #if 1 | |
266 // glBindTexture(GL_TEXTURE_2D, texture_id); | |
267 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, GL_LINEAR); | |
268 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_LINEAR); | |
269 #ifdef TEXTUREFORMAT_32BPP | |
270 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, texture_width, texture_height, 0, | |
271 #else | |
272 glTexImage2D(GL_TEXTURE_2D, 0, BYTES_PP, texture_width, texture_height, 0, | |
273 #endif | |
274 (image_bytes==4)?GL_RGBA:GL_BGR, GL_UNSIGNED_BYTE, ImageData); | |
275 #endif | |
276 | |
277 resize(d_width,d_height); | |
278 | |
279 glClearColor( 1.0f,0.0f,1.0f,0.0f ); | |
280 glClear( GL_COLOR_BUFFER_BIT ); | |
281 | |
282 // printf("OpenGL setup OK!\n"); | |
283 | |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
284 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
|
285 |
1 | 286 return 0; |
287 } | |
288 | |
289 static const vo_info_t* | |
290 get_info(void) | |
291 { | |
292 return &vo_info; | |
293 } | |
294 | |
31 | 295 static void check_events(void) |
1 | 296 { |
2041
ba8a225d1a18
now using x11_common stuff for X11 opening and w/h/bpp query
arpi
parents:
2040
diff
changeset
|
297 int e=vo_x11_check_events(mDisplay); |
31 | 298 if(e&VO_EVENT_RESIZE) resize(vo_dwidth,vo_dheight); |
299 } | |
1 | 300 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1302
diff
changeset
|
301 static void draw_osd(void) |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1302
diff
changeset
|
302 { |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1302
diff
changeset
|
303 } |
31 | 304 |
305 static void | |
306 flip_page(void) | |
307 { | |
308 | |
1 | 309 // glEnable(GL_TEXTURE_2D); |
310 // glBindTexture(GL_TEXTURE_2D, texture_id); | |
311 | |
312 glColor3f(1,1,1); | |
313 glBegin(GL_QUADS); | |
314 glTexCoord2f(0,0);glVertex2i(0,0); | |
315 glTexCoord2f(0,1);glVertex2i(0,texture_height); | |
316 glTexCoord2f(1,1);glVertex2i(texture_width,texture_height); | |
317 glTexCoord2f(1,0);glVertex2i(texture_width,0); | |
318 glEnd(); | |
319 | |
320 // glFlush(); | |
321 glFinish(); | |
6095 | 322 glXSwapBuffers( mDisplay,vo_window ); |
323 | |
1 | 324 } |
325 | |
326 //static inline uint32_t draw_slice_x11(uint8_t *src[], uint32_t slice_num) | |
327 static uint32_t draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y) | |
328 { | |
329 int i; | |
330 int dstride=w*BYTES_PP; | |
331 | |
332 // dstride=(dstride+15)&(~15); | |
333 | |
334 yuv2rgb(ImageData, src[0], src[1], src[2], | |
335 w,h, dstride, stride[0],stride[1]); | |
336 | |
337 // emms (); | |
338 | |
339 for(i=0;i<h;i++){ | |
340 glTexSubImage2D( GL_TEXTURE_2D, // target | |
341 0, // level | |
342 x, // x offset | |
343 y+i, // y offset | |
344 w, // width | |
345 1, // height | |
346 (BYTES_PP==4)?GL_RGBA:GL_RGB, // format | |
347 GL_UNSIGNED_BYTE, // type | |
348 ImageData+i*dstride ); // *pixels | |
349 } | |
350 | |
351 return 0; | |
352 } | |
353 | |
354 static inline uint32_t | |
355 draw_frame_x11_yv12(uint8_t *src[]) | |
356 { | |
357 int i; | |
358 // printf("Converting YUV->RGB...\n"); | |
359 yuv2rgb(ImageData, src[0], src[1], src[2], | |
360 image_width, image_height, | |
361 image_width*BYTES_PP, image_width, image_width/2 ); | |
362 // printf("Ready!\n"); | |
363 | |
364 // emms (); | |
365 | |
366 for(i=0;i<image_height;i++){ | |
367 glTexSubImage2D( GL_TEXTURE_2D, // target | |
368 0, // level | |
369 0, // x offset | |
370 i, // y offset | |
371 image_width, // width | |
372 1, // height | |
373 (BYTES_PP==4)?GL_RGBA:GL_RGB, // format | |
374 GL_UNSIGNED_BYTE, // type | |
375 ImageData+i*BYTES_PP*image_width ); // *pixels | |
376 } | |
377 | |
378 // Display_Image(ImageData); | |
379 return 0; | |
380 } | |
381 | |
382 | |
383 static inline uint32_t | |
384 draw_frame_x11_bgr(uint8_t *src[]) | |
385 { | |
386 int i; | |
387 uint8_t *s=src[0]; | |
388 uint8_t *de=&ImageData[3*image_width]; | |
389 | |
390 for(i=0;i<image_height;i++){ | |
391 uint8_t *d=ImageData; | |
392 while(d<de){ | |
393 d[0]=s[2]; | |
394 d[1]=s[1]; | |
395 d[2]=s[0]; | |
396 s+=3;d+=3; | |
397 } | |
398 glTexSubImage2D( GL_TEXTURE_2D, // target | |
399 0, // level | |
400 0, // x offset | |
401 // image_height-1-i, // y offset | |
402 i, // y offset | |
403 image_width, // width | |
404 1, // height | |
405 (image_bytes==4)?GL_RGBA:GL_RGB, // format | |
406 GL_UNSIGNED_BYTE, // type | |
407 ImageData); // *pixels | |
408 } | |
409 | |
410 // Display_Image(ImageData); | |
411 return 0; | |
412 } | |
413 | |
414 static inline uint32_t | |
415 draw_frame_x11_rgb(uint8_t *src[]) | |
416 { | |
417 int i; | |
418 uint8_t *ImageData=src[0]; | |
419 | |
420 for(i=0;i<image_height;i++){ | |
421 glTexSubImage2D( GL_TEXTURE_2D, // target | |
422 0, // level | |
423 0, // x offset | |
424 // image_height-1-i, // y offset | |
425 i, // y offset | |
426 image_width, // width | |
427 1, // height | |
428 (image_bytes==4)?GL_RGBA:GL_RGB, // format | |
429 GL_UNSIGNED_BYTE, // type | |
430 ImageData+i*image_bytes*image_width ); // *pixels | |
431 } | |
432 | |
433 // Display_Image(ImageData); | |
434 return 0; | |
435 } | |
436 | |
437 | |
438 static uint32_t | |
439 draw_frame(uint8_t *src[]) | |
440 { | |
441 if(image_format==IMGFMT_YV12) | |
442 return draw_frame_x11_yv12(src); | |
443 else | |
444 if((image_format&IMGFMT_RGB_MASK)==IMGFMT_RGB) | |
445 return draw_frame_x11_rgb(src); | |
446 else | |
447 return draw_frame_x11_bgr(src); | |
448 } | |
449 | |
450 static uint32_t | |
451 query_format(uint32_t format) | |
452 { | |
453 switch(format){ | |
454 case IMGFMT_YV12: | |
6212 | 455 return VFCAP_CSP_SUPPORTED; |
1 | 456 case IMGFMT_RGB|24: |
457 case IMGFMT_BGR|24: | |
6212 | 458 return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW; |
1 | 459 } |
460 return 0; | |
461 } | |
462 | |
463 | |
464 static void | |
465 uninit(void) | |
466 { | |
6095 | 467 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
|
468 saver_on(mDisplay); // screen saver back on |
6095 | 469 vo_x11_uninit(); |
1 | 470 } |
4352 | 471 |
472 static uint32_t preinit(const char *arg) | |
473 { | |
4737
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4658
diff
changeset
|
474 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
|
475 { |
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4658
diff
changeset
|
476 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
|
477 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
|
478 } |
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 0; |
4352 | 480 } |
481 | |
4596 | 482 static uint32_t control(uint32_t request, void *data, ...) |
4352 | 483 { |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4448
diff
changeset
|
484 switch (request) { |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4448
diff
changeset
|
485 case VOCTRL_QUERY_FORMAT: |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4448
diff
changeset
|
486 return query_format(*((uint32_t*)data)); |
6095 | 487 case VOCTRL_FULLSCREEN: |
488 vo_x11_fullscreen(); | |
489 return VO_TRUE; | |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4448
diff
changeset
|
490 } |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4448
diff
changeset
|
491 return VO_NOTIMPL; |
4352 | 492 } |