comparison libmpcodecs/vf_vo.c @ 7687:a9a19a991a70

support for VFCAP_ACCEPT_STRIDE in vo drivers
author arpi
date Wed, 09 Oct 2002 22:32:04 +0000
parents a894e99c1e51
children 1f8961f2b34c
comparison
equal deleted inserted replaced
7686:4fa4e58587c2 7687:a9a19a991a70
37 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Description: %s\n",info->name); 37 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Description: %s\n",info->name);
38 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Author: %s\n", info->author); 38 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Author: %s\n", info->author);
39 if(info->comment && strlen(info->comment) > 0) 39 if(info->comment && strlen(info->comment) > 0)
40 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Comment: %s\n", info->comment); 40 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Comment: %s\n", info->comment);
41 } 41 }
42
43 // save vo's stride capability for the wanted colorspace:
44 vf->default_caps=query_format(vf,outfmt) & VFCAP_ACCEPT_STRIDE;
42 45
43 if(video_out->config(width,height,d_width,d_height,flags,"MPlayer",outfmt)) 46 if(video_out->config(width,height,d_width,d_height,flags,"MPlayer",outfmt))
44 return 0; 47 return 0;
45 ++vo_config_count; 48 ++vo_config_count;
46 return 1; 49 return 1;
93 // first check, maybe the vo/vf plugin implements draw_image using mpi: 96 // first check, maybe the vo/vf plugin implements draw_image using mpi:
94 if(video_out->control(VOCTRL_DRAW_IMAGE,mpi)==VO_TRUE) return 1; // done. 97 if(video_out->control(VOCTRL_DRAW_IMAGE,mpi)==VO_TRUE) return 1; // done.
95 // nope, fallback to old draw_frame/draw_slice: 98 // nope, fallback to old draw_frame/draw_slice:
96 if(!(mpi->flags&(MP_IMGFLAG_DIRECT|MP_IMGFLAG_DRAW_CALLBACK))){ 99 if(!(mpi->flags&(MP_IMGFLAG_DIRECT|MP_IMGFLAG_DRAW_CALLBACK))){
97 // blit frame: 100 // blit frame:
98 if(mpi->flags&MP_IMGFLAG_PLANAR) 101 // if(mpi->flags&MP_IMGFLAG_PLANAR)
102 if(vf->default_caps&VFCAP_ACCEPT_STRIDE)
99 video_out->draw_slice(mpi->planes,mpi->stride,mpi->w,mpi->h,mpi->x,mpi->y); 103 video_out->draw_slice(mpi->planes,mpi->stride,mpi->w,mpi->h,mpi->x,mpi->y);
100 else 104 else
101 video_out->draw_frame(mpi->planes); 105 video_out->draw_frame(mpi->planes);
102 } 106 }
103 return 1; 107 return 1;