Skip to content
Browse files

allow format specification at top level of control file

  • Loading branch information...
1 parent 8d183bd commit 61437449a1e1979b505de3f7a0e6dd3fe0a7afa6 Lawrence D'Oliveiro committed May 15, 2011
Showing with 22 additions and 1 deletion.
  1. +1 −1 doc/dvdauthor.sgml
  2. +21 −0 src/dvdcli.c
View
2 doc/dvdauthor.sgml
@@ -193,7 +193,7 @@ LANGUAGE DESCRIPTION for the format of <replaceable>commandlist.</replaceable></
Here is the basic structure of the control file:
</para>
<synopsis>
-&lt;dvdauthor [dest="<replaceable>output-dir</replaceable>"] [jumppad="1|on|yes" | allgprm="1|on|yes"]&gt;
+&lt;dvdauthor [dest="<replaceable>output-dir</replaceable>"] [jumppad="1|on|yes" | allgprm="1|on|yes"] [format="ntsc|pal"]&gt;
&lt;vmgm&gt;
[&lt;fpc&gt;<replaceable>commands;</replaceable>&lt;/fpc&gt;]
&lt;menus [lang="<replaceable>language-code</replaceable>"]&gt;
View
21 src/dvdcli.c
@@ -802,6 +802,26 @@ static void dvdauthor_allgprm(const char *s)
dvdauthor_enable_allgprm();
}
+static dvdauthor_video_format
+ (
+ const char * s
+ )
+ {
+ if (!strcmp(s, "ntsc") || !strcmp(s, "NTSC"))
+ {
+ default_video_format = VF_NTSC;
+ }
+ else if (!strcmp(s, "pal") || !strcmp(s, "PAL"))
+ {
+ default_video_format = VF_PAL;
+ }
+ else
+ {
+ fprintf(stderr, "ERR: Unrecognized video format \"%s\"\n", s);
+ parser_err = true;
+ } /*if*/
+ } /*dvdauthor_video_format*/
+
static void getfbase()
{
if (!writeoutput)
@@ -1340,6 +1360,7 @@ static struct elemattr attrs[]={
{"dvdauthor","dest",dvdauthor_outputdir},
{"dvdauthor","jumppad",dvdauthor_jumppad},
{"dvdauthor","allgprm",dvdauthor_allgprm},
+ {"dvdauthor","format",dvdauthor_video_format},
{"menus","lang",menus_lang},

0 comments on commit 6143744

Please sign in to comment.
Something went wrong with that request. Please try again.