[Mplayer-cvslog] CVS: main cfg-common.h,1.37,1.38 configure,1.420,1.421 mencoder.c,1.114,1.115 mplayer.c,1.462,1.463
Arpi of Ize
arpi at mplayer.dev.hu
Fri Apr 12 12:40:40 CEST 2002
- Previous message: [Mplayer-cvslog] CVS: main/input input.c,1.29,1.30
- Next message: [Mplayer-cvslog] CVS: main/libmpdemux aviwrite.c,1.6,1.7 aviwrite.h,1.3,1.4 demuxer.c,1.89,1.90 tv.c,1.25,1.26 tv.h,1.13,1.14 tvi_bsdbt848.c,1.2,1.3 tvi_def.h,1.6,1.7 tvi_dummy.c,1.7,1.8 tvi_v4l.c,1.19,1.20 video.c,1.14,1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv31429
Modified Files:
cfg-common.h configure mencoder.c mplayer.c
Log Message:
BSD-BT848 TV update patch by Charles Henrich <henrich at sigbus.com>
- tvi interface changes, grab_audio/video now returns timestamp!
- tv demuxer gets 'ds' hint too
- some verbose skip/dup counters to mencoder
- tvi_bsdbt848.c updates
- aviwrite/mencoder size types int->off_t
Index: cfg-common.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-common.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- cfg-common.h 6 Apr 2002 22:05:00 -0000 1.37
+++ cfg-common.h 12 Apr 2002 10:40:37 -0000 1.38
@@ -107,7 +107,11 @@
#ifdef USE_TV
struct config tvopts_conf[]={
{"on", &tv_param_on, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+#ifdef HAVE_TV_BSDBT848
+ {"immediatemode", &tv_param_immediate, CONF_TYPE_FLAG, 0, 0, 0, NULL},
+#endif
{"noaudio", &tv_param_noaudio, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+ {"audiorate", &tv_param_audiorate, CONF_TYPE_INT, 0, 0, 0, NULL},
{"driver", &tv_param_driver, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"device", &tv_param_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"freq", &tv_param_freq, CONF_TYPE_STRING, 0, 0, 0, NULL},
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.420
retrieving revision 1.421
diff -u -r1.420 -r1.421
--- configure 10 Apr 2002 10:19:43 -0000 1.420
+++ configure 12 Apr 2002 10:40:37 -0000 1.421
@@ -3228,6 +3228,21 @@
fi
fi
+echocheck "ftello()"
+# if we dont have ftello map it to ftell
+cat > $TMPC << EOF
+#include <stdio.h>
+int main (void) { ftello(stdin); return 0; }
+EOF
+_ftello=no
+cc_check && _ftello=yes
+if test "$_ftello" = yes ; then
+ _def_ftello='#define HAVE_FTELLO 1'
+else
+ _def_ftello='#undef HAVE_FTELLO'
+fi
+echores "$_ftello"
+
# Determine OS dependent libs
if cygwin ; then
_confcygwin='TARGET_CYGWIN = yes'
@@ -3506,6 +3521,13 @@
/* Define this if your system has the header file for the OSS sound interface */
$_def_sys_soundcard
+
+/* Define this if your system uses ftello() for off_t seeking */
+
+$_def_ftello
+#ifndef HAVE_FTELLO
+# define ftello(a) ftell(a)
+#endif
/* Define this if your system has the "malloc.h" header file */
$_def_malloc
Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- mencoder.c 12 Apr 2002 00:15:03 -0000 1.114
+++ mencoder.c 12 Apr 2002 10:40:37 -0000 1.115
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
+#include <sys/time.h>
#include "config.h"
#include "mp_msg.h"
@@ -212,6 +213,7 @@
}
}
+
//---------------------------------------------------------------------------
void *vo_spudec=NULL;
@@ -278,9 +280,17 @@
int file_format=DEMUXER_TYPE_UNKNOWN;
int i;
+uint32_t ptimer_start;
+uint32_t audiorate=0;
+uint32_t videorate=0;
+uint32_t audiosamples=1;
+uint32_t videosamples=1;
+uint32_t skippedframes=0;
+uint32_t duplicatedframes=0;
+
aviwrite_stream_t* mux_a=NULL;
aviwrite_stream_t* mux_v=NULL;
-int muxer_f_size=0;
+off_t muxer_f_size=0;
#ifdef HAVE_MP3LAME
lame_global_flags *lame;
@@ -714,6 +724,13 @@
demux_seek(demuxer, d, 1);
}
+if(tv_param_on == 1)
+ {
+ fprintf(stderr,"Forcing audio preload to 0, max pts correction to 0\n");
+ audio_preload = 0.0;
+ default_max_pts_correction = 0;
+ }
+
while(!eof){
float frame_time=0;
@@ -724,7 +741,7 @@
int in_size;
int skip_flag=0; // 1=skip -1=duplicate
- if((end_at_type == END_AT_SIZE && end_at <= ftell(muxer_f)) ||
+ if((end_at_type == END_AT_SIZE && end_at <= ftello(muxer_f)) ||
(end_at_type == END_AT_TIME && end_at < sh_video->timer))
break;
@@ -737,6 +754,9 @@
// get audio:
while(mux_a->timer-audio_preload<mux_v->timer){
int len=0;
+
+ ptimer_start = GetTimerMS();
+
if(mux_a->h.dwSampleSize){
// CBR - copy 0.5 sec of audio
switch(mux_a->codec){
@@ -796,14 +816,19 @@
mux_a->buffer_len-=len;
memcpy(mux_a->buffer,mux_a->buffer+len,mux_a->buffer_len);
}
+
+
+ audiosamples++;
+ audiorate+= (GetTimerMS() - ptimer_start);
}
}
// get video frame!
+
in_size=video_read_frame(sh_video,&frame_time,&start,force_fps);
if(in_size<0){ eof=1; break; }
sh_video->timer+=frame_time; ++decoded_frameno;
-
+
v_timer_corr-=frame_time-(float)mux_v->h.dwScale/mux_v->h.dwRate;
if(demuxer2){ // 3-pass encoding, read control file (frameno.avi)
@@ -816,7 +841,7 @@
if(len==4) next_frameno=start[0];
}
if(eof) break;
- if(skip_flag) printf("!!!!!!!!!!!!\n");
+ // if(skip_flag) printf("!!!!!!!!!!!!\n");
skip_flag=next_frameno-decoded_frameno;
// find next frame:
while(next_frameno<=decoded_frameno){
@@ -868,6 +893,8 @@
}
#endif
+ptimer_start = GetTimerMS();
+
switch(mux_v->codec){
case VCODEC_COPY:
mux_v->buffer=start;
@@ -884,17 +911,22 @@
if(!blit_frame) aviwrite_write_chunk(muxer,mux_v,muxer_f,0,0); // empty.
}
+videosamples++;
+videorate+=(GetTimerMS() - ptimer_start);
+
if(skip_flag<0){
// duplicate frame
- printf("\nduplicate %d frame(s)!!! \n",-skip_flag);
+ if(!tv_param_on && !verbose) printf("\nduplicate %d frame(s)!!! \n",-skip_flag);
while(skip_flag<0){
+ duplicatedframes++;
aviwrite_write_chunk(muxer,mux_v,muxer_f,0,0);
++skip_flag;
}
} else
if(skip_flag>0){
// skip frame
- printf("\nskip frame!!! \n");
+ if(!tv_param_on && !verbose) printf("\nskip frame!!! \n");
+ skippedframes++;
--skip_flag;
}
@@ -961,6 +993,19 @@
(int)demuxer->filepos,
(int)demuxer->movi_end);
#else
+ 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,
+ (p>0.001) ? (int)((t/p-t)/60) : 0,
+ (p>0.001) ? (int)(ftello(muxer_f)/p/1024/1024) : 0,
+ v_pts_corr,
+ (mux_v->timer>1) ? (int)(mux_v->size/mux_v->timer/125) : 0,
+ (mux_a && mux_a->timer>1) ? (int)(mux_a->size/mux_a->timer/125) : 0,
+ audiorate/audiosamples, videorate/videosamples,
+ duplicatedframes, skippedframes
+ );
+ } 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,
@@ -972,7 +1017,6 @@
);
#endif
}
-
fflush(stdout);
@@ -992,7 +1036,7 @@
printf("\nWriting AVI index...\n");
aviwrite_write_index(muxer,muxer_f);
-muxer_f_size=ftell(muxer_f);
+muxer_f_size=ftello(muxer_f);
printf("Fixup AVI header...\n");
fseek(muxer_f,0,SEEK_SET);
aviwrite_write_header(muxer,muxer_f); // update header
@@ -1005,10 +1049,10 @@
}
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);
+ (float)(mux_v->size/mux_v->timer*8.0f/1000.0f), (int)(mux_v->size/mux_v->timer), (int)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);
+ (float)(mux_a->size/mux_a->timer*8.0f/1000.0f), (int)(mux_a->size/mux_a->timer), (int)mux_a->size, (float)mux_a->timer);
if(stream) free_stream(stream); // kill cache thread
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.462
retrieving revision 1.463
diff -u -r1.462 -r1.463
--- mplayer.c 7 Apr 2002 18:00:40 -0000 1.462
+++ mplayer.c 12 Apr 2002 10:40:37 -0000 1.463
@@ -546,6 +546,10 @@
#endif
+#ifdef HAVE_TV_BSDBT848
+ tv_param_immediate = 1;
+#endif
+
if ( argv[0] )
if(!strcmp(argv[0],"gmplayer") ||
(strrchr(argv[0],'/') && !strcmp(strrchr(argv[0],'/'),"/gmplayer") ) )
- Previous message: [Mplayer-cvslog] CVS: main/input input.c,1.29,1.30
- Next message: [Mplayer-cvslog] CVS: main/libmpdemux aviwrite.c,1.6,1.7 aviwrite.h,1.3,1.4 demuxer.c,1.89,1.90 tv.c,1.25,1.26 tv.h,1.13,1.14 tvi_bsdbt848.c,1.2,1.3 tvi_def.h,1.6,1.7 tvi_dummy.c,1.7,1.8 tvi_v4l.c,1.19,1.20 video.c,1.14,1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list