[Mplayer-cvslog] CVS: main cfg-common.h,1.27,1.28 cfg-mencoder.h,1.22,1.23 cfg-mplayer.h,1.128,1.129 mencoder.c,1.61,1.62

Kim Minh Kaplan CVS kmkaplan at mplayer.dev.hu
Sat Jan 26 17:32:09 CET 2002


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

Modified Files:
	cfg-common.h cfg-mencoder.h cfg-mplayer.h mencoder.c 
Log Message:
Add -nosound/-sound and -ovc null to mencoder.


Index: cfg-common.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-common.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- cfg-common.h	24 Jan 2002 23:02:59 -0000	1.27
+++ cfg-common.h	26 Jan 2002 16:32:06 -0000	1.28
@@ -60,6 +60,8 @@
 #ifdef USE_FAKE_MONO
 	{"stereo", &fakemono, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
 #endif
+	{"sound", &has_audio, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+	{"nosound", &has_audio, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
 	{"afm", &audio_family, CONF_TYPE_INT, CONF_MIN, 0, 16, NULL}, // keep ranges in sync
 	{"vfm", &video_family, CONF_TYPE_INT, CONF_MIN, 0, 14, NULL}, // with codec-cfg.c

Index: cfg-mencoder.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mencoder.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- cfg-mencoder.h	19 Jan 2002 16:59:59 -0000	1.22
+++ cfg-mencoder.h	26 Jan 2002 16:32:06 -0000	1.23
@@ -71,7 +71,8 @@
 	{"divx4", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_DIVX4, NULL},
 	{"raw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAW, NULL},
 	{"lavc", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBAVCODEC, NULL},
-	{"help", "\nAvailable codecs:\n   copy\n   frameno\n   divx4\n   raw\n   lavc\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+	{"null", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NULL, NULL},
+	{"help", "\nAvailable codecs:\n   copy\n   frameno\n   divx4\n   raw\n   lavc\n    null\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 

Index: cfg-mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -r1.128 -r1.129
--- cfg-mplayer.h	23 Jan 2002 16:54:29 -0000	1.128
+++ cfg-mplayer.h	26 Jan 2002 16:32:06 -0000	1.129
@@ -184,8 +184,6 @@
 	{"sstep", &step_sec, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
 	{"noloop", &loop_times, CONF_TYPE_FLAG, 0, 0, -1, NULL},
 	{"loop", &loop_times, CONF_TYPE_INT, CONF_RANGE, -1, 10000, NULL},
-	{"sound", &has_audio, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nosound", &has_audio, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 	{"abs", &ao_data.buffersize, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
 	{"delay", &audio_delay, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0, NULL},
 

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- mencoder.c	24 Jan 2002 23:02:59 -0000	1.61
+++ mencoder.c	26 Jan 2002 16:32:06 -0000	1.62
@@ -4,6 +4,7 @@
 #define VCODEC_DIVX4 2
 #define VCODEC_RAW 3
 #define VCODEC_LIBAVCODEC 4
+#define VCODEC_NULL 5
 
 #define ACODEC_COPY 0
 #define ACODEC_PCM 1
@@ -96,6 +97,7 @@
 int video_id=-1;
 int dvdsub_id=-1;
 
+static int has_audio=1;
 char *audio_codec=NULL; // override audio codec
 char *video_codec=NULL; // override video codec
 int audio_family=-1;     // override audio codec family 
@@ -419,6 +421,8 @@
   }
 #endif
 
+  if(!has_audio) audio_id=-2; /* do NOT read audio packets... */
+
   //demuxer=demux_open(stream,file_format,video_id,audio_id,dvdsub_id);
   demuxer=demux_open(stream,file_format,audio_id,video_id,dvdsub_id);
   if(!demuxer){
@@ -657,6 +661,16 @@
     mux_v->bih->biCompression=mmioFOURCC('F','r','N','o');
     mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8);
     break;
+case VCODEC_NULL:
+    mux_v->bih=malloc(sizeof(BITMAPINFOHEADER));
+    mux_v->bih->biSize=sizeof(BITMAPINFOHEADER);
+    mux_v->bih->biWidth=vo_w;
+    mux_v->bih->biHeight=vo_h;
+    mux_v->bih->biPlanes=1;
+    mux_v->bih->biBitCount=24;
+    mux_v->bih->biCompression=0;
+    mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8);
+    break;
 case VCODEC_DIVX4:
 #ifndef HAVE_DIVX4ENCORE
     printf("No support for Divx4 encore compiled in\n");
@@ -784,6 +798,7 @@
 switch(mux_v->codec){
 case VCODEC_COPY:
 case VCODEC_RAW:
+case VCODEC_NULL:
     break;
 case VCODEC_FRAMENO:
     decoded_frameno=0;
@@ -1299,6 +1314,8 @@
 	AV_delay, c_total, v_pts_corr );
 
 }
+else
+    printf("V:%6.1f \r", d_video->pts );
 
 #if 0
     mp_msg(MSGT_AVSYNC,MSGL_STATUS,"A:%6.1f V:%6.1f A-V:%7.3f ct:%7.3f  %3d/%3d  %2d%% %2d%% %4.1f%%  %d%%\r",
@@ -1340,8 +1357,8 @@
 aviwrite_write_header(muxer,muxer_f); // update header
 fclose(muxer_f);
 
-printf("\nVideo stream: %8.3f kbit/s  (%d bps)  size: %d bytes  %5.3f secs\n",
-    (float)(mux_v->size/mux_v->timer*8.0f/1000.0f), (int)(mux_v->size/mux_v->timer), mux_v->size, (float)mux_v->timer);
+printf("\nVideo stream: %8.3f kbit/s  (%d bps)  size: %d bytes  %5.3f secs  %d frames\n",
+    (float)(mux_v->size/mux_v->timer*8.0f/1000.0f), (int)(mux_v->size/mux_v->timer), mux_v->size, (float)mux_v->timer, decoded_frameno);
 if(sh_audio)
 printf("\nAudio stream: %8.3f kbit/s  (%d bps)  size: %d bytes  %5.3f secs\n",
     (float)(mux_a->size/mux_a->timer*8.0f/1000.0f), (int)(mux_a->size/mux_a->timer), mux_a->size, (float)mux_a->timer);




More information about the MPlayer-cvslog mailing list