[Mplayer-cvslog] CVS: main/libmpcodecs vd_libmpeg2.c,1.4,1.5

Arpi of Ize arpi at mplayer.dev.hu
Sat Mar 16 21:36:26 CET 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mplayer:/var/tmp.root/cvs-serv31549

Modified Files:
	vd_libmpeg2.c 
Log Message:
mpegpes support

Index: vd_libmpeg2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_libmpeg2.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vd_libmpeg2.c	16 Mar 2002 01:10:31 -0000	1.4
+++ vd_libmpeg2.c	16 Mar 2002 20:36:24 -0000	1.5
@@ -48,9 +48,23 @@
 
 // decode a frame
 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
-    mp_image_t* mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_DRAW_CALLBACK,
-	sh->disp_w, sh->disp_h);
-    mpeg2_decode_data(sh->video_out, data, data+len,flags&3); // decode
+    mp_image_t* mpi;
+    if(sh->codec->outfmt[sh->outfmtidx]==IMGFMT_MPEGPES){
+	static vo_mpegpes_t packet;
+	mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0,
+	    sh->disp_w, sh->disp_h);
+	// hardware decoding:
+//	mpeg2_decode_data(video_out, start, start+in_size,3); // parse headers
+	packet.data=data;
+	packet.size=len-4;
+	packet.timestamp=sh->timer*90000.0;
+	packet.id=0x1E0; //+sh_video->ds->id;
+	mpi->planes[0]=(uint8_t*)(&packet);
+    } else {
+	mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_DRAW_CALLBACK,
+	    sh->disp_w, sh->disp_h);
+	mpeg2_decode_data(sh->video_out, data, data+len,flags&3); // decode
+    }
     return mpi;
 }
 




More information about the MPlayer-cvslog mailing list