Mercurial > mplayer.hg
changeset 4355:4167864cfb0a
Add -nosound/-sound and -ovc null to mencoder.
author | kmkaplan |
---|---|
date | Sat, 26 Jan 2002 16:32:06 +0000 |
parents | 5018e8014ebd |
children | fa6f2467125c |
files | cfg-common.h cfg-mencoder.h cfg-mplayer.h mencoder.c |
diffstat | 4 files changed, 23 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/cfg-common.h Sat Jan 26 16:31:14 2002 +0000 +++ b/cfg-common.h Sat Jan 26 16:32:06 2002 +0000 @@ -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
--- a/cfg-mencoder.h Sat Jan 26 16:31:14 2002 +0000 +++ b/cfg-mencoder.h Sat Jan 26 16:32:06 2002 +0000 @@ -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} };
--- a/cfg-mplayer.h Sat Jan 26 16:31:14 2002 +0000 +++ b/cfg-mplayer.h Sat Jan 26 16:32:06 2002 +0000 @@ -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},
--- a/mencoder.c Sat Jan 26 16:31:14 2002 +0000 +++ b/mencoder.c Sat Jan 26 16:32:06 2002 +0000 @@ -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);