Mercurial > mplayer.hg
changeset 5352:cf2882606e72
Fileslist support for mf demuxer, delemited by ',' and change mf fps to float.
author | atmos4 |
---|---|
date | Tue, 26 Mar 2002 05:25:15 +0000 |
parents | eea0213d64c8 |
children | a9f3df4ee465 |
files | cfg-common.h libmpdemux/mf.c libmpdemux/mf.h |
diffstat | 3 files changed, 31 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/cfg-common.h Tue Mar 26 05:03:10 2002 +0000 +++ b/cfg-common.h Tue Mar 26 05:25:15 2002 +0000 @@ -159,14 +159,14 @@ extern int mf_support; extern int mf_w; extern int mf_h; -extern int mf_fps; +extern float mf_fps; extern char * mf_type; struct config mfopts_conf[]={ {"on", &mf_support, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"w", &mf_w, CONF_TYPE_INT, 0, 0, 0, NULL}, {"h", &mf_h, CONF_TYPE_INT, 0, 0, 0, NULL}, - {"fps", &mf_fps, CONF_TYPE_INT, 0, 0, 0, NULL}, + {"fps", &mf_fps, CONF_TYPE_FLOAT, 0, 0, 0, NULL}, {"type", &mf_type, CONF_TYPE_STRING, 0, 0, 0, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} };
--- a/libmpdemux/mf.c Tue Mar 26 05:03:10 2002 +0000 +++ b/libmpdemux/mf.c Tue Mar 26 05:25:15 2002 +0000 @@ -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; + 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 ); - mf=calloc( 1,sizeof( mf_t ) ); + + mp_msg( MSGT_STREAM,MSGL_INFO,"[mf] number of files: %d\n",mf->nr_of_files ); if ( !strchr( filename,'%' ) ) {
--- a/libmpdemux/mf.h Tue Mar 26 05:03:10 2002 +0000 +++ b/libmpdemux/mf.h Tue Mar 26 05:25:15 2002 +0000 @@ -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