{"id":5307,"date":"2004-06-16T22:16:47","date_gmt":"2004-06-17T06:16:47","guid":{"rendered":"http:\/\/www.ikillspies.com\/blog\/2004\/06\/16\/5307\/"},"modified":"2004-06-16T22:16:47","modified_gmt":"2004-06-17T06:16:47","slug":"dvd-buttons","status":"publish","type":"post","link":"http:\/\/www.ikillspies.com\/?p=5307","title":{"rendered":"DVD buttons"},"content":{"rendered":"<p>I made buttons on my DVD that set the subtitle language and the commentary audio track&#8230; but I wanted the menu to also show which track was active, independent of which button the cursor was selecting.<\/p>\n<p \/>\nFor example, suppose the Vietnamese subtitles are active- <\/p>\n<ul>\n<li>when on the subtitles menu, the user can move the cursor over any of the items representing different languages&#8217; subtitles.  <\/li>\n<li>But there will be a graphic conveying that the active subtitles are in Vietnamese.  Possibly just a sign saying SUBTITLES:  VIETNAMESE<\/li>\n<li>When the user selects Vietnamese, nothing happens, because those subtitles are already active.<\/li>\n<li>When the user selects Spanish, the graphic changes to SPANISH<\/li>\n<\/ul>\n<p \/>\nWell, I did it.  How?<br \/>\n  Basically there are two tricks here:<\/p>\n<ol>\n<li>there is a different menu for every choice of data stream for a given single track.  For Subtitles, there is:\n<ol>\n<li>No subtitles<\/li>\n<li>English subtitles<\/li>\n<li>Spanish subtitles<\/li>\n<li>Japanese subtitles<\/li>\n<li>Vietnamese subtitles<\/li>\n<\/ol>\n<p>The state of the active subtitle is reflected in which version of the Subtitles menu being displayed;<br \/>\nselecting one of the buttons for another language will link to that particular menu.<\/li>\n<li>there is a central Subtitles page which forwards to the appropriate Subtitles page.  The page runs a script and queries a register to see the current subtitle setting.  All other menus forward to this central page and not to the individual subtitle pages<\/li>\n<\/ol>\n<p>The feature track should run a script at its termination to see which menu it should be returning to!  I have renamed all my variables so I don&#8217;t get confused.  Their values are occaisionally bitwise ANDed with the SPRM values:<\/p>\n<ul>\n<lI><b>SPRM 0<\/b> is the current menu language (e.g. &#8220;en&#8221;=0x656E for English)<\/li>\n<p><lI><b>SPRM 1<\/b> is the current audio stream number&#8230; starting with 0 (add one to get stream number)<\/li>\n<p><lI><b>SPRM 16<\/b> is the initial audio language code for this DVD player<\/li>\n<p><lI><b>SPRM 2<\/b> is the current subtitle stream number-<\/p>\n<ul>\n<li>range is 0 through 31&#8230; (add one to get stream number)  <\/li>\n<li>&#8220;on&#8221; flag is decimal 64 = binary 01000000 = 0x40<\/li>\n<\/ul>\n<\/li>\n<p><lI><b>SPRM 18<\/b> is the initial subtitle language code for this DVD player<\/li>\n<\/ul>\n<p>Links:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.kenstone.net\/fcp_homepage\/dvd_sp2_subtitles.html\">DVD Subtitles (Ken Stone)<\/a><\/li>\n<li><a href=\"http:\/\/www.dmnforums.com\/cgi-bin\/readwholethread.cgi?forum=astarte_dvd&#38;post=040407141146.htm&#38;toppostid=2854\">forum posting on DMN Forums<\/a><\/li>\n<li><a href=\"http:\/\/www.edithouse.com.au\/information\/scripting.html\">DVD Scripting by Alistair Jackson<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I made buttons on my DVD that set the subtitle language and the commentary audio track&#8230; but I wanted the menu to also show which track was active, independent of which button the cursor was selecting. For example, suppose the Vietnamese subtitles are active- when on the subtitles menu, the user can move the cursor [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-5307","post","type-post","status-publish","format-standard","hentry","category-looky"],"_links":{"self":[{"href":"http:\/\/www.ikillspies.com\/index.php?rest_route=\/wp\/v2\/posts\/5307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ikillspies.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ikillspies.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ikillspies.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ikillspies.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5307"}],"version-history":[{"count":0,"href":"http:\/\/www.ikillspies.com\/index.php?rest_route=\/wp\/v2\/posts\/5307\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.ikillspies.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ikillspies.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5307"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ikillspies.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}