<titleset>
<titles>
<pgc>
<pre>g1=g1+1;</pre>
<vob file="vmgm1.mpg"></vob>
<button>{g6=1;call vmgm menu;}</button>
<button>{g5=1;call vmgm menu;}</button>
<button>{g4=1;call vmgm menu;}</button>
<button>{g3=1;call vmgm menu;}</button>
<button>{g7=1;call vmgm menu;}</button>
<post>call vmgm menu;</post>
</pgc>
</titles>
</titleset>
(2)利用pre和post特性实现菜单或title的跳转
因为只有VMGM能够调用别的TitleSet菜单,单个TitleSet 不能调用别的TitleSet菜单,因此需要在末端titleset的button上对各菜单赋值,点下相应按钮,对应的寄存器变量被赋值,再完成vmgm menu回调,在vmgm menu的pre字段对各寄存器变量进行判断,跳转到对应的TitleSet菜单。
赋值、回调vmgm:
代码:
<vob file="vmgm1.mpg"></vob>
<button>{g6=1;call vmgm menu;}</button>
<button>{g5=1;call vmgm menu;}</button>
<button>{g4=1;call vmgm menu;}</button>
<button>{g3=1;call vmgm menu;}</button>
<button>{g7=1;call vmgm menu;}</button>
判断、条件跳转:
代码:
<menus>
<pgc entry="title">
<pre>{if (g3 eq 1) {g3=0;jump titleset 3 menu;}
if (g6 eq 1) {g6=0;jump titleset 1 menu;}
if (g5 eq 1) {g5=0;jump titleset 1 menu;}
if (g4 eq 1) {g4=0;jump titleset 2 menu;}
if (g7 eq 1) {g7=0;jump title 1;}
if (g8 eq 1) {g8=0;jump title 2;}
if (g9 eq 1) {g9=0;jump title 3;}
}
</pre>
各寄存器使用完后尽量恢复初值,防止后续调用逻辑错乱,因为只有在fpc初始化的变量才是一次性的,fpc只在光盘插入时调用一次,VMGM 和TitleSet Menu是随时待CALL的。
2.关于TitleSet Menu的处理技巧
代码:
代码示例:
<dvdauthor dest="d:\dvd1\">
<vmgm>
<fpc>{g1=0;g2=0;g3=0;jump title 3;}</fpc>
<menus>
<pgc entry="title">
<pre>if (g3 eq 1) {g3=0;jump title 1;}</pre>
<vob file="vmgm1.mpg"></vob>
<button>jump title 1;</button>
<button>jump titleset 1 menu;</button>
<post>if (g1 eq 2) jump titleset 1 menu; else jump title 3;</post>
</pgc>
</menus>
</vmgm>
<titleset>
<menus>
<pgc entry="root">
<pre>g2=g2+1;</pre>
<vob file="menuA1.mpg"></vob>
<button>jump title 2 chapter 1;</button>
<button>jump title 2 chapter 2;</button>
<button>jump title 2 chapter 3;</button>
<button>jump title 2 chapter 4;</button>
<button>jump title 2 chapter 5;</button>
<button>jump title 2 chapter 6;</button>
<button>jump title 1 chapter 2;</button>
<button>jump title 1 chapter 3;</button>
<button>jump title 2 chapter 1;</button>
<button>jump title 1 chapter 4;</button>
<button>jump title 1 chapter 5;</button>
<button>jump title 1 chapter 6;</button>
<button>jump title 1 chapter 7;</button>
<button>jump title 1 chapter 8;</button>
<button>jump title 1 chapter 9;</button>
<button>jump title 1 chapter 10;</button>
<button>jump title 1 chapter 11;</button>
<button>jump menu 2;</button>
<post>if (g2 eq 2) {g2=0;jump title 2 chapter 1;} else jump menu 2;</post>
</pgc>
<pgc>
<vob file="menuB1.mpg"></vob>
<button>jump title 1 chapter 12;</button>
<button>jump title 1 chapter 13;</button>
<button>jump title 1 chapter 14;</button>
<button>jump title 1 chapter 15;</button>
<button>jump title 1 chapter 16;</button>
<button>jump title 1 chapter 17;</button>
<button>jump title 1 chapter 18;</button>
<button>jump title 1 chapter 12;</button>
<button>jump title 1 chapter 19;</button>
<button>jump title 1 chapter 20;</button>
<button>jump title 1 chapter 21;</button>
<button>jump title 1 chapter 22;</button>
<button>jump title 1 chapter 23;</button>
<button>jump title 1 chapter 24;</button>
<button>jump title 1 chapter 25;</button>
<button>jump menu 1;</button>
<post>jump menu 1;</post>
</pgc>
</menus>
<titles>
<pgc>
<vob file="RTVII.vob" chapters="
00:00:00,
00:28:23,
00:32:14,
00:35:47,
00:37:51,
00:41:57,
00:44:02,
00:48:19,
00:52:26,
00:55:01,
01:00:44,
01:02:54,
01:06:03,
01:07:47,
01:09:17,
01:10:58,
01:12:49,
01:14:55,
01:17:05,
01:19:02,
01:21:08,
01:22:36,
01:24:07,
01:25:58,
01:27:50
">
</vob>
<post>call menu;</post>
</pgc>
<pgc>
<vob file="RTVII.vob">
<cell start="00:01:13" end="00:04:02" chapter="1" program="1" ></cell>
<cell start="00:04:03" end="00:06:33" chapter="1" program="1" ></cell>
<cell start="00:06:34" end="00:09:02" chapter="1" program="1" ></cell>
<cell start="00:09:03" end="00:11:52" chapter="1" program="1" ></cell>
<cell start="00:12:11" end="00:14:37" chapter="1" program="1" ></cell>
<cell start="00:17:12" end="00:20:58" chapter="1" program="1" ></cell>
</vob>
<post>jump title 1 chapter 2;</post>
</pgc>
</titles>
</titleset>
<titleset>
<titles>
<pgc>
<pre>g1=g1+1;</pre>
<vob file="vmgm1.mpg"></vob>
<button>{g3=1;call vmgm menu;}</button>
<button>{g1=2;call vmgm menu;}</button>
<post>call vmgm menu;</post>
</pgc>
</titles>
</titleset>
</dvdauthor>
(1)利用pre和post特性实现菜单循环和计划播放
代码: