comparison libmpcodecs/dec_video.c @ 17910:5ae29dc47c17

feed something (hopefully correct timestamps) into the video filter chain
author michael
date Tue, 21 Mar 2006 23:09:52 +0000
parents 20aca9baf5d8
children 11d7992b37cf
comparison
equal deleted inserted replaced
17909:f7048eaffa85 17910:5ae29dc47c17
302 return 1; // success 302 return 1; // success
303 } 303 }
304 304
305 extern int vo_directrendering; 305 extern int vo_directrendering;
306 306
307 int decode_video(sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame){ 307 int decode_video(sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame, double pts){
308 vf_instance_t* vf; 308 vf_instance_t* vf;
309 mp_image_t *mpi=NULL; 309 mp_image_t *mpi=NULL;
310 unsigned int t=GetTimer(); 310 unsigned int t=GetTimer();
311 unsigned int t2; 311 unsigned int t2;
312 double tt; 312 double tt;
334 334
335 if(!mpi || drop_frame) return 0; // error / skipped frame 335 if(!mpi || drop_frame) return 0; // error / skipped frame
336 336
337 //vo_draw_image(video_out,mpi); 337 //vo_draw_image(video_out,mpi);
338 vf=sh_video->vfilter; 338 vf=sh_video->vfilter;
339 ret = vf->put_image(vf,mpi, MP_NOPTS_VALUE); // apply video filters and call the leaf vo/ve 339 ret = vf->put_image(vf,mpi, pts); // apply video filters and call the leaf vo/ve
340 if(ret>0) vf->control(vf,VFCTRL_DRAW_OSD,NULL); 340 if(ret>0) vf->control(vf,VFCTRL_DRAW_OSD,NULL);
341 341
342 t2=GetTimer()-t2; 342 t2=GetTimer()-t2;
343 tt=t2*0.000001f; 343 tt=t2*0.000001f;
344 vout_time_usage+=tt; 344 vout_time_usage+=tt;