comparison libmpcodecs/vd.c @ 5156:1c250c1da93c

libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
author arpi
date Sun, 17 Mar 2002 02:30:29 +0000
parents cff03e88d331
children 0dab2d783817
comparison
equal deleted inserted replaced
5155:ff8d788ecfde 5156:1c250c1da93c
100 int screen_size_xy=0; 100 int screen_size_xy=0;
101 float movie_aspect=-1.0; 101 float movie_aspect=-1.0;
102 int vo_flags=0; 102 int vo_flags=0;
103 103
104 static vo_tune_info_t vtune; 104 static vo_tune_info_t vtune;
105
106 static mp_image_t* static_images[2];
107 static mp_image_t* temp_images[1];
108 static mp_image_t* export_images[1];
109 static int static_idx=0;
105 110
106 int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt){ 111 int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt){
107 int i,j; 112 int i,j;
108 unsigned int out_fmt=0; 113 unsigned int out_fmt=0;
109 int screen_size_x=0;//SCREEN_SIZE_X; 114 int screen_size_x=0;//SCREEN_SIZE_X;
180 } else { 185 } else {
181 mp_msg(MSGT_CPLAYER,MSGL_INFO,"Movie-Aspect is undefined - no prescaling applied.\n"); 186 mp_msg(MSGT_CPLAYER,MSGL_INFO,"Movie-Aspect is undefined - no prescaling applied.\n");
182 } 187 }
183 } 188 }
184 189
190 { const vo_info_t *info = video_out->get_info();
191 mp_msg(MSGT_CPLAYER,MSGL_INFO,"VO: [%s] %dx%d => %dx%d %s %s%s%s%s\n",info->short_name,
192 sh->disp_w,sh->disp_h,
193 screen_size_x,screen_size_y,
194 vo_format_name(out_fmt),
195 fullscreen?"fs ":"",
196 vidmode?"vm ":"",
197 softzoom?"zoom ":"",
198 (flip==1)?"flip ":"");
199 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Description: %s\n",info->name);
200 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Author: %s\n", info->author);
201 if(info->comment && strlen(info->comment) > 0)
202 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Comment: %s\n", info->comment);
203 }
204
185 // Time to config libvo! 205 // Time to config libvo!
186 mp_msg(MSGT_CPLAYER,MSGL_V,"video_out->init(%dx%d->%dx%d,flags=%d,'%s',0x%X)\n", 206 mp_msg(MSGT_CPLAYER,MSGL_V,"video_out->init(%dx%d->%dx%d,flags=%d,'%s',0x%X)\n",
187 sh->disp_w,sh->disp_h, 207 sh->disp_w,sh->disp_h,
188 screen_size_x,screen_size_y, 208 screen_size_x,screen_size_y,
189 fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3), 209 fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3),
196 "MPlayer",out_fmt,&vtune)){ 216 "MPlayer",out_fmt,&vtune)){
197 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CannotInitVO); 217 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CannotInitVO);
198 return 0; // exit_player(MSGTR_Exit_error); 218 return 0; // exit_player(MSGTR_Exit_error);
199 } 219 }
200 220
221 #define FREE_MPI(mpi) if(mpi){if(mpi->flags&MP_IMGFLAG_ALLOCATED) free(mpi->planes[0]); free(mpi); mpi=NULL;}
222 FREE_MPI(static_images[0])
223 FREE_MPI(static_images[1])
224 FREE_MPI(temp_images[0])
225 FREE_MPI(export_images[0])
226 #undef FREE_MPI
201 return 1; 227 return 1;
202 } 228 }
203
204 static mp_image_t* static_images[2];
205 static mp_image_t* temp_images[1];
206 static mp_image_t* export_images[1];
207 static int static_idx=0;
208 229
209 // mp_imgtype: buffering type, see mp_image.h 230 // mp_imgtype: buffering type, see mp_image.h
210 // mp_imgflag: buffer requirements (read/write, preserve, stride limits), see mp_image.h 231 // mp_imgflag: buffer requirements (read/write, preserve, stride limits), see mp_image.h
211 // returns NULL or allocated mp_image_t* 232 // returns NULL or allocated mp_image_t*
212 // Note: buffer allocation may be moved to mpcodecs_config_vo() later... 233 // Note: buffer allocation may be moved to mpcodecs_config_vo() later...