[Mplayer-cvslog] CVS: main/libmpdemux demux_mov.c,1.90,1.91 demuxer.c,1.129,1.130

Arpi of Ize arpi at mplayerhq.hu
Mon Jan 13 03:42:09 CET 2003


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv18211/libmpdemux

Modified Files:
	demux_mov.c demuxer.c 
Log Message:
patch adds support for MOV-Reference-Files.
it uses d_video queue to store playlist entries as strz.
It also makes sure, that unnecessary items like qt5gateQT are removed and
that the url/basepath is added to "local files"
by Fabian Franz <FabianFranz at gmx.de>


Index: demux_mov.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mov.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- demux_mov.c	12 Jan 2003 20:11:20 -0000	1.90
+++ demux_mov.c	13 Jan 2003 02:42:06 -0000	1.91
@@ -356,6 +356,8 @@
 	      int ref=0;
 	      skipped+=i;
 	      mp_msg(MSGT_DEMUX,MSGL_INFO,"MOV: Reference Media file!!!\n");
+	      //set demuxer type to playlist ...
+	      demuxer->type=DEMUXER_TYPE_PLAYLIST;
 	      while(i>0){
 	          int len=stream_read_dword(demuxer->stream)-8;
 		  int fcc=stream_read_dword(demuxer->stream);
@@ -369,10 +371,21 @@
 		      int tmp=stream_read_dword(demuxer->stream);
 		      int type=stream_read_dword_le(demuxer->stream);
 	              int slen=stream_read_dword(demuxer->stream);
-		      char* s=malloc(slen+1);
-		      stream_read(demuxer->stream,s,slen);
-		      s[slen]=0;
-		      mp_msg(MSGT_DEMUX,MSGL_INFO,"REF: [%.4s] %s\n",&type,s);
+		      //char* s=malloc(slen+1);
+		      //stream_read(demuxer->stream,s,slen);
+		      
+		      //FIXME: also store type & data_rate ?
+		      ds_read_packet(demuxer->video, 
+			demuxer->stream,
+			slen,
+			0,
+			stream_tell(demuxer->stream),
+			0 // no flags 
+		      );
+		      flags|=4;
+		      mp_msg(MSGT_DEMUX,MSGL_V,"Added reference to playlist\n");
+		      //s[slen]=0;
+		      //mp_msg(MSGT_DEMUX,MSGL_INFO,"REF: [%.4s] %s\n",&type,s);
 		      len-=12+slen;i-=12+slen; break;
 		    }
 		  case MOV_FOURCC('r','m','d','r'): {
@@ -433,6 +446,9 @@
 	return 1;
     }
     free(priv);
+
+    if (flags==5) // reference & header sent
+        return 1;
 
     if(flags==1)
 	mp_msg(MSGT_DEMUX,MSGL_WARN,"MOV: missing data (mdat) chunk! Maybe broken file...\n");

Index: demuxer.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- demuxer.c	12 Jan 2003 19:55:59 -0000	1.129
+++ demuxer.c	13 Jan 2003 02:42:06 -0000	1.130
@@ -650,7 +650,7 @@
   demuxer=new_demuxer(stream,DEMUXER_TYPE_MOV,audio_id,video_id,dvdsub_id);
   if(mov_check_file(demuxer)){
       mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_Detected_XXX_FileFormat,"QuickTime/MOV");
-      file_format=DEMUXER_TYPE_MOV;
+      file_format=demuxer->type;
   } else {
       free_demuxer(demuxer);
       demuxer = NULL;



More information about the MPlayer-cvslog mailing list