comparison libvo/vo_xover.c @ 16171:fd51fd1ff231

Fix the return types of all (six) libvo API functions. Used to be uint32_t, but return values can be negative (VO_ERROR, VO_NOTAVAIL and VO_NOTIMPL), so it's changed to int now.
author ivo
date Fri, 05 Aug 2005 01:24:37 +0000
parents 91d210e8a19c
children d75953576ae4
comparison
equal deleted inserted replaced
16170:7c5d6c82e5ed 16171:fd51fd1ff231
202 } 202 }
203 203
204 /* connect to server, create and map window, 204 /* connect to server, create and map window,
205 * allocate colors and (shared) memory 205 * allocate colors and (shared) memory
206 */ 206 */
207 static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, 207 static int config(uint32_t width, uint32_t height, uint32_t d_width,
208 uint32_t d_height, uint32_t flags, char *title, uint32_t format) 208 uint32_t d_height, uint32_t flags, char *title, uint32_t format)
209 { 209 {
210 XVisualInfo vinfo; 210 XVisualInfo vinfo;
211 // XSizeHints hint; 211 // XSizeHints hint;
212 XSetWindowAttributes xswa; 212 XSetWindowAttributes xswa;
375 static void flip_page(void) 375 static void flip_page(void)
376 { 376 {
377 mp_msg(MSGT_VO, MSGL_FATAL, "xover error: didn't used sub vo flip_page!\n"); 377 mp_msg(MSGT_VO, MSGL_FATAL, "xover error: didn't used sub vo flip_page!\n");
378 } 378 }
379 379
380 static uint32_t draw_slice(uint8_t *src[], int stride[], 380 static int draw_slice(uint8_t *src[], int stride[],
381 int w, int h, int x, int y) 381 int w, int h, int x, int y)
382 { 382 {
383 UNUSED(src); 383 UNUSED(src);
384 UNUSED(stride); 384 UNUSED(stride);
385 UNUSED(w); 385 UNUSED(w);
388 UNUSED(y); 388 UNUSED(y);
389 mp_msg(MSGT_VO, MSGL_FATAL, "xover error: didn't used sub vo draw_slice!\n"); 389 mp_msg(MSGT_VO, MSGL_FATAL, "xover error: didn't used sub vo draw_slice!\n");
390 return 1; 390 return 1;
391 } 391 }
392 392
393 static uint32_t draw_frame(uint8_t *src[]) 393 static int draw_frame(uint8_t *src[])
394 { 394 {
395 UNUSED(src); 395 UNUSED(src);
396 mp_msg(MSGT_VO, MSGL_FATAL, "xover error: didn't used sub vo draw_frame!\n"); 396 mp_msg(MSGT_VO, MSGL_FATAL, "xover error: didn't used sub vo draw_frame!\n");
397 return 1; 397 return 1;
398 } 398 }
408 video_out_xover.draw_slice = draw_slice; 408 video_out_xover.draw_slice = draw_slice;
409 video_out_xover.flip_page = flip_page; 409 video_out_xover.flip_page = flip_page;
410 video_out_xover.draw_osd = draw_osd; 410 video_out_xover.draw_osd = draw_osd;
411 } 411 }
412 412
413 static uint32_t preinit(const char *arg) 413 static int preinit(const char *arg)
414 { 414 {
415 int i; 415 int i;
416 416
417 if(!arg) { 417 if(!arg) {
418 mp_msg(MSGT_VO, MSGL_ERR, "VO XOverlay need a subdriver\n"); 418 mp_msg(MSGT_VO, MSGL_ERR, "VO XOverlay need a subdriver\n");
445 video_out_xover.flip_page = sub_vo->flip_page; 445 video_out_xover.flip_page = sub_vo->flip_page;
446 video_out_xover.draw_osd = sub_vo->draw_osd; 446 video_out_xover.draw_osd = sub_vo->draw_osd;
447 return 0; 447 return 0;
448 } 448 }
449 449
450 static uint32_t control(uint32_t request, void *data, ...) 450 static int control(uint32_t request, void *data, ...)
451 { 451 {
452 if(!sub_vo) return VO_ERROR; 452 if(!sub_vo) return VO_ERROR;
453 switch (request) { 453 switch (request) {
454 case VOCTRL_GUISUPPORT: 454 case VOCTRL_GUISUPPORT:
455 return VO_TRUE; 455 return VO_TRUE;