[Mplayer-cvslog] CVS: main mplayer.c,1.81,1.82 cfg-mplayer.h,1.29,1.30

GEREOFFY arpi_esp at users.sourceforge.net
Fri Apr 20 20:28:15 CEST 2001


Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv24945

Modified Files:
	mplayer.c cfg-mplayer.h 
Log Message:
new options: -dumpaudio and -dumpvideo

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -C2 -r1.81 -r1.82
*** mplayer.c	2001/04/20 14:32:09	1.81
--- mplayer.c	2001/04/20 18:28:13	1.82
***************
*** 498,501 ****
--- 498,503 ----
  float sub_fps=0;
  int   sub_auto = 1;
+ char stream_dump_name=NULL;
+ int stream_dump_type=0;
  //int user_bpp=0;
  
***************
*** 929,932 ****
--- 931,952 ----
  
  fflush(stdout);
+ 
+ if(stream_dump_type){
+   FILE *f;
+   int len;
+   demux_stream_t *ds=(stream_dump_type==1)?d_audio:d_video;
+   demux_stream_t *ds2=(stream_dump_type!=1)?d_audio:d_video;
+   ds_free_packs(ds2); ds2->id=-2; // ignore this stream!
+   f=fopen(stream_dump_name?stream_dump_name:"stream.dump","wb");
+   if(!f){ printf("Can't open dump file!!!\n");exit(1); }
+   while(!ds->eof){
+     char* start;
+     int in_size=ds_get_packet(ds,&start);
+     if(in_size>0) fwrite(start,in_size,1,f);
+   }
+   fclose(f);
+   printf("core dumped :)\n");
+   exit(1);
+ }
  
  //================== Init AUDIO (codec) ==========================

Index: cfg-mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** cfg-mplayer.h	2001/04/20 14:32:09	1.29
--- cfg-mplayer.h	2001/04/20 18:28:13	1.30
***************
*** 63,66 ****
--- 63,71 ----
  	{"aid", &audio_id, CONF_TYPE_INT, CONF_RANGE, 0, 256},
  	{"vid", &video_id, CONF_TYPE_INT, CONF_RANGE, 0, 256},
+ 
+ 	{"dumpfile", &stream_dump_name, CONF_TYPE_STRING, 0, 0, 0},
+ 	{"dumpaudio", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 1},
+ 	{"dumpvideo", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 2},
+ 
  //	{"auds", &avi_header.audio_codec, CONF_TYPE_STRING, 0, 0, 0},
  //	{"vids", &avi_header.video_codec, CONF_TYPE_STRING, 0, 0, 0},


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list