comparison libvo/vo_sdl.c @ 437:6937ae376998

some additional changes to support different image formats
author atmosfear
date Sun, 15 Apr 2001 15:45:26 +0000
parents b61c5c4484f8
children 198b46b739d8
comparison
equal deleted inserted replaced
436:e67f565a6ec8 437:6937ae376998
375 //static int sdl_setup (int width, int height) 375 //static int sdl_setup (int width, int height)
376 { 376 {
377 struct sdl_priv_s *priv = &sdl_priv; 377 struct sdl_priv_s *priv = &sdl_priv;
378 unsigned int sdl_format; 378 unsigned int sdl_format;
379 379
380 380 sdl_format = format;
381 switch(format){ 381 switch(format){
382 case IMGFMT_YV12: 382 case IMGFMT_YV12:
383 sdl_format=SDL_YV12_OVERLAY; 383 printf("\nSDL: Using 0x%X (YV12) image format\n", format); break;
384 printf("SDL: Using YV12 image format\n"); 384 case IMGFMT_IYUV:
385 break; 385 printf("\nSDL: Using 0x%X (IYUV) image format\n", format); break;
386 case IMGFMT_YUY2: 386 case IMGFMT_YUY2:
387 sdl_format=SDL_YUY2_OVERLAY; 387 printf("\nSDL: Using 0x%X (YUY2) image format\n", format); break;
388 printf("SDL: Using YUY2 image format\n"); 388 case IMGFMT_UYVY:
389 break; 389 printf("\nSDL: Using 0x%X (UYVY) image format\n", format); break;
390 case IMGFMT_UYVY: 390 case IMGFMT_YVYU:
391 sdl_format=SDL_UYVY_OVERLAY; 391 printf("\nSDL: Using 0x%X (YVYU) image format\n", format); break;
392 printf("SDL: Using UYVY image format\n"); 392 case IMGFMT_I420:
393 break; 393 printf("\nSDL: Using 0x%X (I420) image format\n", format);
394 default: 394 printf("SDL: Mapping I420 to IYUV (untested please report if it works)\n");
395 printf("SDL: Unsupported image format (0x%X)\n",format); 395 sdl_format = SDL_IYUV_OVERLAY;
396 return -1; 396 break;
397 } 397 default:
398 printf("\nSDL: Unsupported image format (0x%X)\n",format);
399 return -1;
400 }
398 401
399 sdl_open (NULL, NULL); 402 sdl_open (NULL, NULL);
400 403
401 /* Set output window title */ 404 /* Set output window title */
402 SDL_WM_SetCaption (".: MPlayer : F = Fullscreen/Windowed : C = Cycle Fullscreen Resolutions :.", "SDL Video Out"); 405 SDL_WM_SetCaption (".: MPlayer : F = Fullscreen/Windowed : C = Cycle Fullscreen Resolutions :.", "SDL Video Out");