[MPlayer-dev-eng] Re: PATCH RFC frameno options with cdsize

Jan Gutter jan at ist.co.za
Mon May 3 14:30:45 CEST 2004


I dropped the patch... Freaking Evolution!
(Flame retardant suit still on!)

--- MPlayer-1.0pre4/cfg-mencoder.h	2004-03-24 17:16:36.000000000 +0200
+++ MPlayer-1.0pre4-tiny/cfg-mencoder.h	2004-04-29 12:05:16.940653616 +0200
@@ -60,6 +60,8 @@
 
 extern m_option_t nuvopts_conf[];
 
+extern m_option_t framenoopts_conf[];
+
 m_option_t ovc_conf[]={
 	{"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_COPY, NULL},
 	{"frameno", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_FRAMENO, NULL},
@@ -230,6 +232,8 @@
 
 	{"nuvopts",  nuvopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 
+	{"framenoopts",  framenoopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+	
 #define MAIN_CONF
 #include "cfg-common.h"
 #undef MAIN_CONF
diff -urN MPlayer-1.0pre4/mencoder.c MPlayer-1.0pre4-tiny/mencoder.c
--- MPlayer-1.0pre4/mencoder.c	2004-04-17 18:46:40.000000000 +0200
+++ MPlayer-1.0pre4-tiny/mencoder.c	2004-04-29 12:47:45.362234648 +0200
@@ -227,6 +227,16 @@
 #endif
 #endif
 
+// frameno "codec" options
+unsigned int frameno_cdsize = 0; // Default behavior -- print old output
+char* frameno_filename = "frameno.avi"; // use frameno.avi
+
+m_option_t framenoopts_conf[]={
+  {"filename", &frameno_filename, CONF_TYPE_STRING, 0, 0, 0, NULL},
+  {"cdsize", &frameno_cdsize, CONF_TYPE_INT, M_OPT_RANGE, 0, 32000, NULL},
+  {NULL, NULL, 0, 0, 0, 0, NULL}
+};
+
 //static int vo_w=0, vo_h=0;
 
 //-------------------------- config stuff:
@@ -362,7 +372,6 @@
 
 m_entry_t* filelist = NULL;
 char* filename=NULL;
-char* frameno_filename="frameno.avi";
 
 int decoded_frameno=0;
 int next_frameno=-1;
@@ -1488,12 +1497,19 @@
     vobsub_out_close(vobsub_writer);
 
 if(out_video_codec==VCODEC_FRAMENO && mux_v->timer>100){
-    printf(MSGTR_RecommendedVideoBitrate,"650MB",(int)((650*1024*1024-muxer_f_size)/mux_v->timer/125));
-    printf(MSGTR_RecommendedVideoBitrate,"700MB",(int)((700*1024*1024-muxer_f_size)/mux_v->timer/125));
-    printf(MSGTR_RecommendedVideoBitrate,"800MB",(int)((800*1024*1024-muxer_f_size)/mux_v->timer/125));
-    printf(MSGTR_RecommendedVideoBitrate,"2 x 650MB",(int)((2*650*1024*1024-muxer_f_size)/mux_v->timer/125));
-    printf(MSGTR_RecommendedVideoBitrate,"2 x 700MB",(int)((2*700*1024*1024-muxer_f_size)/mux_v->timer/125));
-    printf(MSGTR_RecommendedVideoBitrate,"2 x 800MB",(int)((2*800*1024*1024-muxer_f_size)/mux_v->timer/125));
+    if(frameno_cdsize==0){
+        printf(MSGTR_RecommendedVideoBitrate,"650MB",(int)((650*1024*1024-muxer_f_size)/mux_v->timer/125));
+        printf(MSGTR_RecommendedVideoBitrate,"700MB",(int)((700*1024*1024-muxer_f_size)/mux_v->timer/125));
+        printf(MSGTR_RecommendedVideoBitrate,"800MB",(int)((800*1024*1024-muxer_f_size)/mux_v->timer/125));
+        printf(MSGTR_RecommendedVideoBitrate,"2 x 650MB",(int)((2*650*1024*1024-muxer_f_size)/mux_v->timer/125));
+        printf(MSGTR_RecommendedVideoBitrate,"2 x 700MB",(int)((2*700*1024*1024-muxer_f_size)/mux_v->timer/125));
+        printf(MSGTR_RecommendedVideoBitrate,"2 x 800MB",(int)((2*800*1024*1024-muxer_f_size)/mux_v->timer/125));
+    }
+    else{
+        char tmp[80];
+        sprintf(tmp,"%dMB",frameno_cdsize);
+        printf(MSGTR_RecommendedVideoBitrate,tmp,(int)((frameno_cdsize*1024*1024-muxer_f_size)/mux_v->timer/125));
+    }
 }
 
 printf(MSGTR_VideoStreamResult,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cdsize.patch
Type: text/x-patch
Size: 3229 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040503/65110af8/attachment.bin>


More information about the MPlayer-dev-eng mailing list