[Mplayer-cvslog] CVS: main/libmpdemux mf.c,1.2,1.3 mf.h,1.1,1.2

Atmosfear atmos4 at mplayer.dev.hu
Tue Mar 26 06:25:17 CET 2002


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

Modified Files:
	mf.c mf.h 
Log Message:
Fileslist support for mf demuxer, delemited by ',' and change mf fps to float.


Index: mf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/mf.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mf.c	7 Feb 2002 12:07:47 -0000	1.2
+++ mf.c	26 Mar 2002 05:25:15 -0000	1.3
@@ -21,7 +21,7 @@
 int    mf_support = 0;
 int    mf_w = 352;
 int    mf_h = 288;
-int    mf_fps = 25;
+float  mf_fps = 25.0;
 char * mf_type = "jpg";
 
 int stream_open_mf(char * filename,stream_t * stream)
@@ -34,8 +34,33 @@
  int           error_count = 0;
  int	       count = 0;
 
- fname=malloc( strlen( filename ) + 32 );
  mf=calloc( 1,sizeof( mf_t ) );
+
+ if( strchr( filename,',') )
+  { 
+   fname=malloc( 255 ); 
+   mp_msg( MSGT_STREAM,MSGL_INFO,"[mf] filelist: %s\n",filename );
+ 
+   while ( ( fname=strsep( &filename,"," ) ) )
+    {
+     if ( stat( fname,&fs ) ) 
+      {
+       mp_msg( MSGT_STREAM,MSGL_V,"[mf] file not found: '%s'\n",fname );
+      }
+      else
+      {
+       mf->names=realloc( mf->names,( mf->nr_of_files + 1 ) * sizeof( char* ) );
+       mf->names[mf->nr_of_files]=strdup( fname );
+//       mp_msg( MSGT_STREAM,MSGL_V,"[mf] added file %d.: %s\n",mf->nr_of_files,mf->names[mf->nr_of_files] );
+       mf->nr_of_files++;
+      }
+    }
+   goto exit_mf;
+  } 
+
+ fname=malloc( strlen( filename ) + 32 );
+
+ mp_msg( MSGT_STREAM,MSGL_INFO,"[mf] number of files: %d\n",mf->nr_of_files );
  
  if ( !strchr( filename,'%' ) )
   {

Index: mf.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/mf.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mf.h	6 Feb 2002 19:23:49 -0000	1.1
+++ mf.h	26 Mar 2002 05:25:15 -0000	1.2
@@ -5,7 +5,7 @@
 extern int    mf_support;
 extern int    mf_w;
 extern int    mf_h;
-extern int    mf_fps;
+extern float  mf_fps;
 extern char * mf_type;
 
 typedef struct
@@ -14,4 +14,4 @@
  char ** names;
 } mf_t;
 
-#endif
\ No newline at end of file
+#endif




More information about the MPlayer-cvslog mailing list