[MPlayer-dev-eng] pts and video filters

Michael Niedermayer michaelni at gmx.at
Thu Jan 26 21:07:11 CET 2006


Hi

attached patch outlines how that could be done, alternatively a pts field
could be added to mp_image_t
oppinions?

-- 
Michael
-------------- next part --------------
Index: vf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.c,v
retrieving revision 1.122
diff -u -r1.122 vf.c
--- vf.c	22 Jan 2006 18:11:35 -0000	1.122
+++ vf.c	26 Jan 2006 19:56:23 -0000
@@ -630,8 +630,8 @@
     return flags;
 }
 
-int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi){
-    return vf->next->put_image(vf->next,mpi);
+int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi, double pts){
+    return vf->next->put_image(vf->next,mpi, pts);
 }
 
 void vf_next_draw_slice(struct vf_instance_s* vf,unsigned char** src, int * stride,int w, int h, int x, int y){
Index: vf.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.h,v
retrieving revision 1.28
diff -u -r1.28 vf.h
--- vf.h	11 Sep 2005 06:41:04 -0000	1.28
+++ vf.h	26 Jan 2006 19:56:23 -0000
@@ -37,7 +37,7 @@
     void (*get_image)(struct vf_instance_s* vf,
         mp_image_t *mpi);
     int (*put_image)(struct vf_instance_s* vf,
-        mp_image_t *mpi);
+        mp_image_t *mpi, double pts);
     void (*start_slice)(struct vf_instance_s* vf,
         mp_image_t *mpi);
     void (*draw_slice)(struct vf_instance_s* vf,
@@ -96,7 +96,7 @@
 	unsigned int flags, unsigned int outfmt);
 int vf_next_control(struct vf_instance_s* vf, int request, void* data);
 int vf_next_query_format(struct vf_instance_s* vf, unsigned int fmt);
-int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi);
+int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi, double pts);
 void vf_next_draw_slice (struct vf_instance_s* vf, unsigned char** src, int* stride, int w,int h, int x, int y);
 
 vf_instance_t* append_filters(vf_instance_t* last);
Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_video.c,v
retrieving revision 1.164
diff -u -r1.164 dec_video.c
--- dec_video.c	18 Oct 2005 11:11:25 -0000	1.164
+++ dec_video.c	26 Jan 2006 19:56:23 -0000
@@ -336,7 +336,7 @@
 
 //vo_draw_image(video_out,mpi);
 vf=sh_video->vfilter;
-ret = vf->put_image(vf,mpi); // apply video filters and call the leaf vo/ve
+ret = vf->put_image(vf,mpi, MP_NOPTS_VALUE); // apply video filters and call the leaf vo/ve
 if(ret>0) vf->control(vf,VFCTRL_DRAW_OSD,NULL);
 
     t2=GetTimer()-t2;


More information about the MPlayer-dev-eng mailing list