comparison libvo/vo_syncfb.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 05aa13cdf92f
children a107276371a8
comparison
equal deleted inserted replaced
16170:7c5d6c82e5ed 16171:fd51fd1ff231
247 dest32 += (bespitch - _config.src_width) / 2; 247 dest32 += (bespitch - _config.src_width) / 2;
248 } 248 }
249 } 249 }
250 250
251 //static uint32_t draw_slice(uint8_t *src[], uint32_t slice_num) 251 //static uint32_t draw_slice(uint8_t *src[], uint32_t slice_num)
252 static uint32_t 252 static int
253 draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y) 253 draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y)
254 { 254 {
255 255
256 if ( vid_data == NULL ) return 0; 256 if ( vid_data == NULL ) return 0;
257 257
318 } 318 }
319 // printf("Flip %d\n", bufinfo.offset); 319 // printf("Flip %d\n", bufinfo.offset);
320 320
321 } 321 }
322 322
323 static uint32_t draw_frame(uint8_t *src[]) 323 static int draw_frame(uint8_t *src[])
324 { 324 {
325 printf("DRAW FRAME!!!\n"); 325 printf("DRAW FRAME!!!\n");
326 if ( conf_palette == VIDEO_PALETTE_YUV422 ) { 326 if ( conf_palette == VIDEO_PALETTE_YUV422 ) {
327 write_frame_YUV422(src[0],src[1], src[2]); 327 write_frame_YUV422(src[0],src[1], src[2]);
328 } else if ( conf_palette == VIDEO_PALETTE_YUV420P2 ) { 328 } else if ( conf_palette == VIDEO_PALETTE_YUV420P2 ) {
333 333
334 flip_page(); 334 flip_page();
335 return 0; 335 return 0;
336 } 336 }
337 337
338 static uint32_t 338 static int
339 query_format(uint32_t format) 339 query_format(uint32_t format)
340 { 340 {
341 switch(format){ 341 switch(format){
342 case IMGFMT_YV12: 342 case IMGFMT_YV12:
343 // case IMGFMT_RGB|24: 343 // case IMGFMT_RGB|24:
345 return VFCAP_CSP_SUPPORTED; 345 return VFCAP_CSP_SUPPORTED;
346 } 346 }
347 return 0; 347 return 0;
348 } 348 }
349 349
350 static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) 350 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)
351 { 351 {
352 uint_32 frame_size; 352 uint_32 frame_size;
353 353
354 f = open("/dev/syncfb",O_RDWR); 354 f = open("/dev/syncfb",O_RDWR);
355 355
441 441
442 static void check_events(void) 442 static void check_events(void)
443 { 443 {
444 } 444 }
445 445
446 static uint32_t preinit(const char *arg) 446 static int preinit(const char *arg)
447 { 447 {
448 if(arg) 448 if(arg)
449 { 449 {
450 printf("vo_syncfb: Unknown subdevice: %s\n",arg); 450 printf("vo_syncfb: Unknown subdevice: %s\n",arg);
451 return ENOSYS; 451 return ENOSYS;
452 } 452 }
453 return 0; 453 return 0;
454 } 454 }
455 455
456 static uint32_t control(uint32_t request, void *data, ...) 456 static int control(uint32_t request, void *data, ...)
457 { 457 {
458 switch (request) { 458 switch (request) {
459 case VOCTRL_QUERY_FORMAT: 459 case VOCTRL_QUERY_FORMAT:
460 return query_format(*((uint32_t*)data)); 460 return query_format(*((uint32_t*)data));
461 } 461 }