[Mplayer-cvslog] CVS: main cfg-mencoder.h,1.49,1.50 cfgparser.c,1.52,1.53 mencoder.c,1.150,1.151

Arpi of Ize arpi at mplayerhq.hu
Thu Aug 29 22:50:51 CEST 2002


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

Modified Files:
	cfg-mencoder.h cfgparser.c mencoder.c 
Log Message:
new mencoder option -info, to store copyright, title, encoder version etc in AVI
based on patch by "Andriy N. Gritsenko" <andrej at lucky.net>


Index: cfg-mencoder.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mencoder.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- cfg-mencoder.h	5 Aug 2002 13:41:32 -0000	1.49
+++ cfg-mencoder.h	29 Aug 2002 20:50:48 -0000	1.50
@@ -93,6 +93,26 @@
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
+struct config info_conf[]={
+	{"name", &info_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"artist", &info_artist, CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"genre", &info_genre, CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"subject", &info_subject, CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"copyright", &info_copyright, CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"srcform", &info_sourceform, CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"comment", &info_comment, CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"help", "\nAvailable INFO fields:\n"
+	"   name      - title of the subject of the file\n"
+	"   artist    - artist or author of the original subject of the file\n"
+	"   genre     - original work category\n"
+	"   subject   - contents of the file\n"
+	"   copyright - copyright information for the file\n"
+	"   srcform   - original form of the material that was digitized\n"
+	"   comment   - general comments about the file or the subject of the file\n"
+	"\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+	{NULL, NULL, 0, 0, 0, 0, NULL}
+};
+
 static config_t mencoder_opts[]={
 	/* name, pointer, type, flags, min, max */
 	{"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, /* this must be the first!!! */
@@ -129,6 +149,9 @@
 	{"vobsubout", &vobsub_out, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{"vobsuboutindex", &vobsub_out_index, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
 	{"vobsuboutid", &vobsub_out_id, CONF_TYPE_STRING, 0, 0, 0, NULL},
+
+	// info header strings
+	{"info", info_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 
 #ifdef HAVE_DIVX4ENCORE
 	{"divx4opts", divx4opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},

Index: cfgparser.c
===================================================================
RCS file: /cvsroot/mplayer/main/cfgparser.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- cfgparser.c	28 Aug 2002 16:55:40 -0000	1.52
+++ cfgparser.c	29 Aug 2002 20:50:48 -0000	1.53
@@ -707,7 +707,7 @@
 			    /* clear out */
 			    subopt[0] = subparam[0] = 0;
 			    
-			    sscanf_ret = sscanf(token, "%[^=]=%s", subopt, subparam);
+			    sscanf_ret = sscanf(token, "%[^=]=%[^:]", subopt, subparam);
 
 			    mp_msg(MSGT_CFGPARSER, MSGL_DBG3, "token: '%s', i=%d, subopt='%s', subparam='%s' (ret: %d)\n", token, i, subopt, subparam, sscanf_ret);
 			    switch(sscanf_ret)

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -r1.150 -r1.151
--- mencoder.c	28 Aug 2002 21:32:30 -0000	1.150
+++ mencoder.c	29 Aug 2002 20:50:48 -0000	1.151
@@ -164,6 +164,15 @@
 float sub_last_pts = -303;
 #endif
 
+// infos are empty by default
+char *info_name=NULL;
+char *info_artist=NULL;
+char *info_genre=NULL;
+char *info_subject=NULL;
+char *info_copyright=NULL;
+char *info_sourceform=NULL;
+char *info_comment=NULL;
+
 
 
 //char *out_audio_codec=NULL; // override audio codec




More information about the MPlayer-cvslog mailing list