[Mplayer-cvslog] CVS: main cfg-common.h,1.51,1.52 configure,1.542,1.543 mencoder.c,1.147,1.148 mp_msg.c,1.17,1.18 mp_msg.h,1.23,1.24 mplayer.c,1.548,1.549

Arpi of Ize arpi at mplayerhq.hu
Wed Aug 21 23:31:21 CEST 2002


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

Modified Files:
	cfg-common.h configure mencoder.c mp_msg.c mp_msg.h mplayer.c 
Log Message:
new v4l capture patch by Jindrich Makovicka <makovick at kmlinux.fjfi.cvut.cz>:
- multithreaded audio/video buffering (I know mplayer crew hates threads
  but it seems to me as the only way of doing reliable a/v capture)
- a/v timebase synchronization (sample count vs. gettimeofday)
- "immediate" mode support for mplayer
- fixed colorspace stuff - RGB?? and YUY2 modes now work as expected
- native ALSA audio capture
- separated audio input layer


Index: cfg-common.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-common.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- cfg-common.h	5 Aug 2002 17:23:22 -0000	1.51
+++ cfg-common.h	21 Aug 2002 21:31:17 -0000	1.52
@@ -197,6 +197,14 @@
 	{"input", &tv_param_input, CONF_TYPE_INT, 0, 0, 20, NULL},
 	{"outfmt", &tv_param_outfmt, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{"fps", &tv_param_fps, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL},
+#ifdef HAVE_TV_V4L
+	{"mono", &tv_param_mono, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+#ifdef HAVE_ALSA9
+	{"alsa", &tv_param_alsa, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+#endif
+	{"adevice", &tv_param_adevice, CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"audioid", &tv_param_audio_id, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL},
+#endif
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 #endif

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.542
retrieving revision 1.543
diff -u -r1.542 -r1.543
--- configure	21 Aug 2002 20:28:24 -0000	1.542
+++ configure	21 Aug 2002 21:31:18 -0000	1.543
@@ -1975,6 +1975,25 @@
 fi
 echores "$_vsscanf"
 
+echocheck "sys/sysinfo.h"
+cat > $TMPC << EOF
+#include <sys/sysinfo.h>
+int main(void) {
+  struct sysinfo s_info;
+  sysinfo(&s_info);
+  return 0;
+}
+EOF
+_sys_sysinfo=no
+cc_check && _sys_sysinfo=yes
+if test "$_sys_sysinfo" = yes ; then
+  _def_sys_sysinfo='#define HAVE_SYS_SYSINFO_H 1'
+  _inc_sysinfo='#include <sys/sysinfo.h>'
+else
+  _def_sys_sysinfo='#undef HAVE_SYS_SYSINFO_H'
+fi
+echores "$_sys_sysinfo"
+
 
 #########
 # VIDEO #
@@ -4419,6 +4438,9 @@
 /* Define this if your system has the header file for the OSS sound interface
  * in /usr/include */
 $_def_soundcard
+
+/* Define this if your system has the sysinfo header */
+$_def_sys_sysinfo
 
 /* Define this if your system uses ftello() for off_t seeking */
 

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -r1.147 -r1.148
--- mencoder.c	7 Aug 2002 18:24:25 -0000	1.147
+++ mencoder.c	21 Aug 2002 21:31:18 -0000	1.148
@@ -1126,7 +1126,7 @@
 	if(verbose) {
 		mp_msg(MSGT_AVSYNC,MSGL_STATUS,"Pos:%6.1fs %6df (%2d%%) %3dfps Trem:%4dmin %3dmb  A-V:%5.3f [%d:%d] A/Vms %d/%d D/S %d/%d \r",
 	    	mux_v->timer, decoded_frameno, (int)(p*100),
-	    	(t>1) ? (int)(decoded_frameno/t) : 0,
+	    	(t>1) ? (int)(decoded_frameno/t+0.5) : 0,
 	    	(p>0.001) ? (int)((t/p-t)/60) : 0, 
 	    	(p>0.001) ? (int)(ftello(muxer_f)/p/1024/1024) : 0,
 	    	v_pts_corr,
@@ -1138,7 +1138,7 @@
 	} else
 	mp_msg(MSGT_AVSYNC,MSGL_STATUS,"Pos:%6.1fs %6df (%2d%%) %3dfps Trem:%4dmin %3dmb  A-V:%5.3f [%d:%d]\r",
 	    mux_v->timer, decoded_frameno, (int)(p*100),
-	    (t>1) ? (int)(decoded_frameno/t) : 0,
+	    (t>1) ? (int)(decoded_frameno/t+0.5) : 0,
 	    (p>0.001) ? (int)((t/p-t)/60) : 0, 
 	    (p>0.001) ? (int)(ftell(muxer_f)/p/1024/1024) : 0,
 	    v_pts_corr,
@@ -1186,6 +1186,8 @@
  }
 
 } // while(!at_eof)
+
+if (demuxer) free_demuxer(demuxer);
 
 #ifdef HAVE_MP3LAME
 // fixup CBR mp3 audio header:

Index: mp_msg.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp_msg.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- mp_msg.c	5 Jun 2002 02:24:35 -0000	1.17
+++ mp_msg.c	21 Aug 2002 21:31:18 -0000	1.18
@@ -40,6 +40,11 @@
     }
 }
 
+int mp_msg_test(int mod, int lev)
+{
+    return lev <= mp_msg_levels[mod];
+}
+
 void mp_msg_c( int x, const char *format, ... ){
 #if 1
     va_list va;

Index: mp_msg.h
===================================================================
RCS file: /cvsroot/mplayer/main/mp_msg.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- mp_msg.h	3 Jun 2002 23:23:02 -0000	1.23
+++ mp_msg.h	21 Aug 2002 21:31:18 -0000	1.24
@@ -85,6 +85,7 @@
 
 void mp_msg_init();
 void mp_msg_set_level(int verbose);
+int mp_msg_test(int mod, int lev);
 
 #include "config.h"
 

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.548
retrieving revision 1.549
diff -u -r1.548 -r1.549
--- mplayer.c	21 Aug 2002 20:44:28 -0000	1.548
+++ mplayer.c	21 Aug 2002 21:31:18 -0000	1.549
@@ -268,6 +268,8 @@
 
 static stream_t* stream=NULL;
 
+static demuxer_t *demuxer=NULL;
+
 char* current_module=NULL; // for debugging
 
 int vo_gamma_brightness = 1000;
@@ -291,6 +293,7 @@
 #define INITED_STREAM 64
 #define INITED_INPUT    128
 #define INITED_VOBSUB  256
+#define INITED_DEMUXER  512
 #define INITED_ALL 0xFFFF
 
 void uninit_player(unsigned int mask){
@@ -306,6 +309,12 @@
     stream=NULL;
   }
 
+  if(mask&INITED_DEMUXER){
+    current_module="uninit_demuxer";
+    if(demuxer) free_demuxer(demuxer);
+    demuxer=NULL;
+  }
+
   if(mask&INITED_VO){
     inited_flags&=~INITED_VO;
     current_module="uninit_vo";
@@ -489,8 +498,6 @@
 float sub_last_pts = -303;
 #endif
 
-static demuxer_t *demuxer=NULL;
-
 static demux_stream_t *d_audio=NULL;
 static demux_stream_t *d_video=NULL;
 static demux_stream_t *d_dvdsub=NULL;
@@ -565,9 +572,7 @@
 
 #endif
 
-#ifdef HAVE_TV_BSDBT848
   tv_param_immediate = 1;
-#endif
 
   if ( argv[0] )
     if(!strcmp(argv[0],"gmplayer") ||
@@ -1076,6 +1081,8 @@
 
 demuxer=demux_open(stream,file_format,audio_id,video_id,dvdsub_id);
 if(!demuxer) goto goto_next_file; // exit_player(MSGTR_Exit_error); // ERROR
+
+inited_flags|=INITED_DEMUXER;
 
 current_module="demux_open2";
 




More information about the MPlayer-cvslog mailing list