Mercurial > mplayer.hg
annotate libvo/vo_syncfb.c @ 20482:16b90fde05c9
Always initialize libass to fix crashes caused by use without initialization.
Library init was only done if ass_enabled was true at program startup.
However there are at least 2 ways how MPlayer can later try to access
the library even if ass_enabled is false at that point:
- per-file options can turn on ass support later
- if the embeddedfonts option is enabled and the file has fonts
demux_mkv will call ass_process_font
author | uau |
---|---|
date | Sun, 29 Oct 2006 00:23:12 +0000 |
parents | a107276371a8 |
children | cea0eb833758 |
rev | line source |
---|---|
1 | 1 |
2 // How many MegaBytes of RAM is on your G200/G400 card? | |
3 #define RAM_SIZE 16 | |
4 | |
5 /* | |
6 * video_out_syncfb.c | |
7 * | |
8 * Copyright (C) Aaron Holtzman - Aug 1999 | |
9 * | |
10 * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. | |
11 * | |
12 * mpeg2dec is free software; you can redistribute it and/or modify | |
13 * it under the terms of the GNU General Public License as published by | |
14 * the Free Software Foundation; either version 2, or (at your option) | |
15 * any later version. | |
16 * | |
17 * mpeg2dec is distributed in the hope that it will be useful, | |
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 * GNU General Public License for more details. | |
21 * | |
22 * You should have received a copy of the GNU General Public License | |
23 * along with GNU Make; see the file COPYING. If not, write to | |
24 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
25 * | |
26 */ | |
27 | |
28 #include <stdio.h> | |
29 #include <stdlib.h> | |
30 #include <string.h> | |
4737
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4596
diff
changeset
|
31 #include <errno.h> |
1 | 32 |
33 #include "config.h" | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
34 #include "mp_msg.h" |
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
35 #include "help_mp.h" |
1 | 36 #include "video_out.h" |
37 #include "video_out_internal.h" | |
38 | |
39 #include <sys/ioctl.h> | |
40 #include <unistd.h> | |
41 #include <fcntl.h> | |
42 #include <sys/mman.h> | |
43 #include <linux/videodev.h> | |
44 | |
45 #include "drivers/syncfb/syncfb.h" | |
46 | |
354 | 47 #include "fastmemcpy.h" |
350 | 48 |
8148
5b39e79af5fe
removed get_info, using the same sheme as in libmpcodecs instead
alex
parents:
7124
diff
changeset
|
49 static vo_info_t info = |
1 | 50 { |
51 "Matrox G200/G400 Synchronous framebuffer (/dev/syncfb)", | |
52 "syncfb", | |
53 "Matthias Oelmann <mao@well.com>", | |
54 "" | |
55 }; | |
56 | |
8148
5b39e79af5fe
removed get_info, using the same sheme as in libmpcodecs instead
alex
parents:
7124
diff
changeset
|
57 LIBVO_EXTERN(syncfb) |
5b39e79af5fe
removed get_info, using the same sheme as in libmpcodecs instead
alex
parents:
7124
diff
changeset
|
58 |
1 | 59 /* deinterlacing on? looks only good in 50 Hz(PAL) or 60 Hz(NTSC) modes */ |
60 static int vo_conf_deinterlace = 0; | |
61 | |
62 /* 72/75 Hz Monitor frequency for progressive output */ | |
63 static int vo_conf_cinemode = 0; | |
64 | |
65 | |
4433 | 66 static syncfb_config_t _config; |
1 | 67 static syncfb_capability_t sfb_caps; |
68 | |
69 static syncfb_buffer_info_t bufinfo; | |
70 | |
71 static uint_8 *vid_data; | |
72 static uint_8 *frame_mem; | |
73 | |
74 static int debug_skip_first = 250; | |
75 static int dbg_singleframe = 0; | |
76 | |
77 static int conf_palette; | |
78 | |
79 static int f; | |
80 | |
81 | |
82 | |
83 /* | |
84 it seems that mpeg2dec never calls | |
85 draw_frame, so i could not test it.... | |
86 */ | |
87 | |
88 static void | |
89 write_frame_YUV422(uint_8 *y,uint_8 *cr, uint_8 *cb) | |
90 { | |
91 uint_8 *crp, *cbp; | |
92 uint_32 *dest32; | |
93 uint_32 bespitch,h,w; | |
94 | |
95 | |
4433 | 96 bespitch = _config.src_pitch; |
1 | 97 dest32 = (uint_32 *)vid_data; |
98 | |
4433 | 99 for(h=0; h < _config.src_height/2; h++) |
1 | 100 { |
101 cbp = cb; | |
102 crp = cr; | |
4433 | 103 for(w=0; w < _config.src_width/2; w++) |
1 | 104 { |
105 *dest32++ = (*y) + ((*cr)<<8) + ((*(y+1))<<16) + ((*cb)<<24); | |
106 y++; y++; cb++; cr++; | |
107 } | |
4433 | 108 dest32 += (bespitch - _config.src_width) / 2; |
1 | 109 |
4433 | 110 for(w=0; w < _config.src_width/2; w++) |
1 | 111 { |
112 *dest32++ = (*y) + ((*crp)<<8) + ((*(y+1))<<16) + ((*cbp)<<24); | |
113 y++; y++; cbp++; crp++; | |
114 } | |
4433 | 115 dest32 += (bespitch - _config.src_width) / 2; |
1 | 116 } |
117 } | |
118 | |
119 | |
120 static void | |
121 write_frame_YUV420P2(uint_8 *y,uint_8 *cr, uint_8 *cb) | |
122 { | |
123 uint_8 *dest, *tmp; | |
124 uint_32 bespitch,h,w; | |
125 | |
4433 | 126 bespitch = _config.src_pitch; |
1 | 127 dest = frame_mem + bufinfo.offset; |
128 | |
4433 | 129 for(h=0; h < _config.src_height; h++) |
1 | 130 { |
4433 | 131 memcpy(dest, y, _config.src_width); |
132 y += _config.src_width; | |
1 | 133 dest += bespitch; |
134 } | |
135 | |
136 dest = frame_mem + bufinfo.offset_p2; | |
4433 | 137 for(h=0; h < _config.src_height/2; h++) |
1 | 138 { |
139 tmp = dest; | |
4433 | 140 for(w=0; w < _config.src_width/2; w++) |
1 | 141 { |
142 *tmp++ = *cr++; | |
143 *tmp++ = *cb++; | |
144 } | |
145 dest += bespitch; | |
146 } | |
147 } | |
148 | |
149 static void | |
150 write_frame_YUV420P3(uint_8 *y,uint_8 *cr, uint_8 *cb) | |
151 { | |
152 } | |
153 | |
154 static void | |
155 write_slice_YUV420P2(uint_8 *y,uint_8 *cr, uint_8 *cb,uint_32 slice_num) | |
156 { | |
157 uint_8 *dest, *tmp; | |
158 uint_32 bespitch,h,w; | |
159 | |
4433 | 160 bespitch = _config.src_pitch; |
1 | 161 dest = frame_mem + bufinfo.offset + (bespitch * 16 * slice_num); |
162 | |
163 for(h=0; h < 16; h++) | |
164 { | |
4433 | 165 memcpy(dest, y, _config.src_width); |
166 y += _config.src_width; | |
1 | 167 dest += bespitch; |
168 } | |
169 | |
170 dest = frame_mem + bufinfo.offset_p2 + (bespitch * 16 * slice_num) /2; | |
171 for(h=0; h < 8; h++) | |
172 { | |
173 tmp = dest; | |
4433 | 174 for(w=0; w < _config.src_width/2; w++) |
1 | 175 { |
176 *tmp++ = *cr++; | |
177 *tmp++ = *cb++; | |
178 } | |
179 dest += bespitch; | |
180 } | |
181 } | |
182 | |
183 static void | |
184 write_slice_YUV420P3(uint_8 *y,uint_8 *cr, uint_8 *cb,int stride[],uint_32 ypos,uint_32 xsize,uint_32 ysize) | |
185 { | |
186 uint_8 *dest; | |
187 uint_32 bespitch,h; | |
188 | |
4433 | 189 bespitch = _config.src_pitch; |
1 | 190 |
191 dest = frame_mem + bufinfo.offset + (bespitch * ypos); | |
192 for(h=0; h < ysize; h++) | |
193 { | |
194 memcpy(dest, y, xsize); | |
195 y += stride[0]; | |
196 dest += bespitch; | |
197 } | |
198 | |
199 xsize/=2; | |
200 ysize/=2; | |
201 | |
202 dest = frame_mem + bufinfo.offset_p2 + (bespitch * ypos)/4; | |
203 for(h=0; h < ysize; h++) | |
204 { | |
205 memcpy(dest, cr, xsize); | |
206 cr += stride[1]; | |
207 dest += bespitch/2; | |
208 } | |
209 | |
210 dest = frame_mem + bufinfo.offset_p3 + (bespitch * ypos)/4; | |
211 for(h=0; h < ysize; h++) | |
212 { | |
213 memcpy(dest, cb, xsize); | |
214 cb += stride[2]; | |
215 dest += bespitch/2; | |
216 } | |
217 | |
218 | |
219 } | |
220 | |
221 | |
222 static void | |
223 write_slice_YUV422(uint_8 *y,uint_8 *cr, uint_8 *cb,uint_32 slice_num) | |
224 { | |
225 uint_8 *crp, *cbp; | |
226 uint_32 *dest32; | |
227 uint_32 bespitch,h,w; | |
228 | |
229 | |
4433 | 230 bespitch = _config.src_pitch; |
1 | 231 dest32 = (uint_32 *)(vid_data + (bespitch * 16 * slice_num) * 2); |
232 | |
233 for(h=0; h < 8; h++) | |
234 { | |
235 cbp = cb; | |
236 crp = cr; | |
4433 | 237 for(w=0; w < _config.src_width/2; w++) |
1 | 238 { |
239 *dest32++ = (*y) + ((*cr)<<8) + ((*(y+1))<<16) + ((*cb)<<24); | |
240 y++; y++; cb++; cr++; | |
241 } | |
4433 | 242 dest32 += (bespitch - _config.src_width) / 2; |
1 | 243 |
4433 | 244 for(w=0; w < _config.src_width/2; w++) |
1 | 245 { |
246 *dest32++ = (*y) + ((*crp)<<8) + ((*(y+1))<<16) + ((*cbp)<<24); | |
247 y++; y++; cbp++; crp++; | |
248 } | |
4433 | 249 dest32 += (bespitch - _config.src_width) / 2; |
1 | 250 } |
251 } | |
252 | |
253 //static uint32_t draw_slice(uint8_t *src[], uint32_t slice_num) | |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
15212
diff
changeset
|
254 static int |
1 | 255 draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y) |
256 { | |
257 | |
258 if ( vid_data == NULL ) return 0; | |
259 | |
260 write_slice_YUV420P3(src[0],src[1], src[2],stride,y,w,h); | |
261 | |
262 //printf("sorry, not syncfb/draw_slice() implemented yet...\n"); | |
263 | |
264 #if 0 | |
265 | |
266 if ( conf_palette == VIDEO_PALETTE_YUV422 ) { | |
267 write_slice_YUV422(src[0],src[1], src[2],slice_num); | |
268 } else if ( conf_palette == VIDEO_PALETTE_YUV420P2 ) { | |
269 write_slice_YUV420P2(src[0],src[1], src[2],slice_num); | |
270 } else if ( conf_palette == VIDEO_PALETTE_YUV420P3 ) { | |
271 write_slice_YUV420P3(src[0],src[1], src[2],slice_num); | |
272 } | |
273 #endif | |
274 | |
275 return 0; | |
276 } | |
277 | |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
614
diff
changeset
|
278 static void draw_osd(void) |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
614
diff
changeset
|
279 { |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
614
diff
changeset
|
280 } |
1 | 281 |
282 static void | |
283 flip_page(void) | |
284 { | |
285 | |
4433 | 286 // memset(frame_mem + bufinfo.offset_p2, 0x80, _config.src_width*config.src_height); |
1 | 287 ioctl(f,SYNCFB_COMMIT_BUFFER,&bufinfo); |
288 | |
289 if ( dbg_singleframe ) { | |
290 if ( debug_skip_first == 0 ) { | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
291 mp_msg(MSGT_VO,MSGL_INFO, "Press 'anykey' for field 1\n" ); |
1 | 292 getchar(); |
293 ioctl(f,SYNCFB_VBI,0); | |
294 } | |
295 | |
296 if ( debug_skip_first > 0 ) { | |
297 debug_skip_first--; | |
298 // debug_skip_first = 0; | |
299 if ( debug_skip_first == 0 ) { | |
300 ioctl(f,SYNCFB_VBI,0); | |
301 ioctl(f,SYNCFB_VBI,0); | |
302 ioctl(f,SYNCFB_VBI,0); | |
303 } | |
304 } | |
305 | |
306 if ( debug_skip_first == 0 ) { | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
307 mp_msg(MSGT_VO,MSGL_INFO, "Press 'anykey' for field 2\n" ); |
1 | 308 getchar(); |
309 ioctl(f,SYNCFB_VBI,0); | |
310 } | |
311 } | |
312 | |
313 ioctl(f,SYNCFB_REQUEST_BUFFER,&bufinfo); | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
314 if ( bufinfo.id == -1 ) mp_msg(MSGT_VO,MSGL_INFO, "Got buffer #%d\n", bufinfo.id ); |
1 | 315 |
316 vid_data = (uint_8 *)(frame_mem + bufinfo.offset); | |
317 if ( bufinfo.id == -1 ) { | |
318 //vid_data = frame_mem; | |
319 vid_data = NULL; | |
320 } | |
321 // printf("Flip %d\n", bufinfo.offset); | |
322 | |
323 } | |
324 | |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
15212
diff
changeset
|
325 static int draw_frame(uint8_t *src[]) |
1 | 326 { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
327 mp_msg(MSGT_VO,MSGL_INFO, "DRAW FRAME!!!\n"); |
1 | 328 if ( conf_palette == VIDEO_PALETTE_YUV422 ) { |
329 write_frame_YUV422(src[0],src[1], src[2]); | |
330 } else if ( conf_palette == VIDEO_PALETTE_YUV420P2 ) { | |
331 write_frame_YUV420P2(src[0],src[1], src[2]); | |
332 } else if ( conf_palette == VIDEO_PALETTE_YUV420P3 ) { | |
333 write_frame_YUV420P3(src[0],src[1], src[2]); | |
334 } | |
335 | |
336 flip_page(); | |
337 return 0; | |
338 } | |
339 | |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
15212
diff
changeset
|
340 static int |
1 | 341 query_format(uint32_t format) |
342 { | |
343 switch(format){ | |
344 case IMGFMT_YV12: | |
345 // case IMGFMT_RGB|24: | |
346 // case IMGFMT_BGR|24: | |
15212
05aa13cdf92f
replace VO and VF numeric flags with #defined identifiers
henry
parents:
8148
diff
changeset
|
347 return VFCAP_CSP_SUPPORTED; |
1 | 348 } |
349 return 0; | |
350 } | |
351 | |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
15212
diff
changeset
|
352 static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) |
1 | 353 { |
354 uint_32 frame_size; | |
355 | |
356 f = open("/dev/syncfb",O_RDWR); | |
357 | |
358 if(f == -1) | |
359 { | |
360 f = open("/dev/mga_vid",O_RDWR); | |
361 if(f == -1) | |
362 { | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
363 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SYNCFB_CouldntOpen); |
1 | 364 return(-1); |
365 } | |
366 } | |
367 | |
368 if (ioctl(f,SYNCFB_GET_CAPS,&sfb_caps)) perror("Error in mga_vid_config ioctl"); | |
369 if (ioctl(f,SYNCFB_GET_CONFIG,&config)) perror("Error in mga_vid_config ioctl"); | |
370 | |
371 if (sfb_caps.palettes & (1<<VIDEO_PALETTE_YUV420P3) ) { | |
4433 | 372 _config.src_palette= VIDEO_PALETTE_YUV420P3; |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
373 mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SYNCFB_UsingPaletteYuv420p3); |
1 | 374 }else if ( sfb_caps.palettes & (1<<VIDEO_PALETTE_YUV420P2) ) { |
4433 | 375 _config.src_palette= VIDEO_PALETTE_YUV420P2; |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
376 mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SYNCFB_UsingPaletteYuv420p2); |
1 | 377 } else if ( sfb_caps.palettes & (1<<VIDEO_PALETTE_YUV422) ) { |
4433 | 378 _config.src_palette= VIDEO_PALETTE_YUV422; |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
379 mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SYNCFB_UsingPaletteYuv420); |
1 | 380 } else { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
381 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SYNCFB_NoSupportedPaletteFound); |
1633 | 382 return -1; |
1 | 383 } |
384 | |
4433 | 385 // _config.src_palette= VIDEO_PALETTE_YUV422; |
1 | 386 |
387 if ( vo_conf_cinemode ) { | |
4433 | 388 _config.default_repeat = 3; |
1 | 389 } else { |
4433 | 390 _config.default_repeat = 2; |
1 | 391 } |
392 | |
4433 | 393 conf_palette = _config.src_palette; |
1 | 394 if ( vo_conf_deinterlace ) { |
4433 | 395 _config.syncfb_mode = SYNCFB_FEATURE_SCALE | SYNCFB_FEATURE_BLOCK_REQUEST | SYNCFB_FEATURE_DEINTERLACE; |
396 _config.default_repeat = 1; | |
1 | 397 } else { |
4433 | 398 _config.syncfb_mode = SYNCFB_FEATURE_SCALE | SYNCFB_FEATURE_BLOCK_REQUEST; |
1 | 399 } |
400 | |
4433 | 401 _config.fb_screen_size = (RAM_SIZE-4)*0x100000; //(1280 * 1024 * 32) / 8; |
402 _config.src_width = width; | |
403 _config.src_height= height; | |
1 | 404 |
4433 | 405 _config.image_width = d_width; |
406 _config.image_height= d_height; | |
407 //_config.image_width = 1024; | |
408 //_config.image_height= 576; | |
1 | 409 |
4433 | 410 _config.image_xorg= 0; |
411 _config.image_yorg= 0; | |
1 | 412 |
413 | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
414 mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SYNCFB_BesSourcerSize, width, height); |
1 | 415 |
416 ioctl(f,SYNCFB_ON,0); | |
4433 | 417 if (ioctl(f,SYNCFB_SET_CONFIG,&_config)) perror("Error in mga_vid_config ioctl"); |
1 | 418 |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
419 mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SYNCFB_FramebufferMemory, sfb_caps.memory_size, _config.buffers); |
1 | 420 |
421 frame_size = ((width + 31) & ~31) * height + (((width + 31) & ~31) * height) / 2; | |
422 frame_mem = (uint_8*)mmap(0,sfb_caps.memory_size,PROT_WRITE,MAP_SHARED,f,0); | |
423 | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
424 mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SYNCFB_RequestingFirstBuffer, bufinfo.id ); |
1 | 425 ioctl(f,SYNCFB_REQUEST_BUFFER,&bufinfo); |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
426 mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SYNCFB_GotFirstBuffer, bufinfo.id ); |
1 | 427 |
428 | |
429 vid_data = (uint_8 *)(frame_mem + bufinfo.offset); | |
430 | |
431 //clear the buffer | |
432 // memset(frame_mem,0x80,frame_size*2); | |
433 return 0; | |
434 } | |
435 | |
436 | |
437 static void | |
438 uninit(void) | |
439 { | |
440 if (ioctl(f,SYNCFB_OFF,0)) perror("Error in OFF ioctl"); | |
441 | |
442 } | |
443 | |
31 | 444 static void check_events(void) |
445 { | |
446 } | |
1 | 447 |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
15212
diff
changeset
|
448 static int preinit(const char *arg) |
4352 | 449 { |
4737
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4596
diff
changeset
|
450 if(arg) |
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4596
diff
changeset
|
451 { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
16171
diff
changeset
|
452 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SYNCFB_UnknownSubdevice,arg); |
4737
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4596
diff
changeset
|
453 return ENOSYS; |
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4596
diff
changeset
|
454 } |
32e1f5042f65
I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me'
nick
parents:
4596
diff
changeset
|
455 return 0; |
4352 | 456 } |
457 | |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
15212
diff
changeset
|
458 static int control(uint32_t request, void *data, ...) |
4352 | 459 { |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
460 switch (request) { |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
461 case VOCTRL_QUERY_FORMAT: |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
462 return query_format(*((uint32_t*)data)); |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
463 } |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
464 return VO_NOTIMPL; |
4352 | 465 } |