windows-nt/Source/XPSP1/NT/multimedia/dshow/vidctl/msvidctl/viewdvd.htm

395 lines
11 KiB
HTML
Raw Permalink Normal View History

2020-09-26 03:20:57 -05:00
<HTML>
<HEAD>
<TITLE>ATL 3.0 test page for object MSVidCtl</TITLE>
</HEAD>
<BODY onload="window_onload()">
&nbsp;
<table border="1" width="89%" height="414">
<tr>
<td width="65%" height="383">
<OBJECT ID="MSVidCtl" CLASSID="CLSID:B0EDF163-910A-11D2-B632-00C04F79498E"
height="400" width="500"></OBJECT>
</td><td width="35%" height="383">
<p>Current Title: <INPUT id=CurrentTitle type=text size="4" name="CurrentTitle" value="0">&nbsp;
<p>Current Chapter: <INPUT id=CurrentChap type=text size="4" name="CurrentChap" value="0">&nbsp;</p>
<p>Current Time: <INPUT id=CurrentTime type=text value="00:00:00" size="7"></p>
<p>Current Event: <INPUT id=EventText type=text size="23">
<p>Current Subtitles:<INPUT id=SPLang type=text value="" size="10">
<p>Current Audio: <INPUT id=AudioLang type=text value="" size="10">
</p>
<p>
<INPUT id=Play type=button value="play" onclick="run_onClick()">
<INPUT id=Pause type=button value="pause" onclick="pause_onClick()">
<INPUT id=Stop type=button value="stop" onclick="stop_onClick()">
<INPUT id=RW type=button value="RW" onclick="RW_onClick()">
<INPUT id=FF type=button value="FF" onclick="FF_onClick()">
<INPUT id=PrevChap type=button value="|<" onclick="Prev_onClick()">
<INPUT id=NextChap type=button value=">|" onclick="Next_onClick()">
<p>
<INPUT id=Menu type=button value="menu" onclick="menu_onClick()">
<INPUT id=Resume type=button value="resume" onclick="resume_onClick()">
<INPUT id=Up type=button value="^" onclick="up_onClick()">
<INPUT id=Down type=button value="v" onclick="down_onClick()">
<INPUT id=Left type=button value="<" onclick="left_onClick()">
<INPUT id=Right type=button value=">" onclick="right_onClick()">
<INPUT id=Enter type=button value="enter" onclick="enter_onClick()">
<p>
<INPUT id=SP type=button value="subtitles" onclick="sp_onClick()">
<INPUT id=SPText type=text value="0" size="1">
<INPUT id=Audio type=button value="audio" onclick="audio_onClick()">
<INPUT id=AudioText type=text value="1" size="1">
<INPUT id=Angle type=button value="Angle" onclick="angle_onClick()">
<INPUT id=AngleText type=text value="0" size="1">
<p>
<INPUT id=Level type=button value="Parental Level" onclick="pg_onClick()">
<INPUT id=LevelText type=text value="8" size="1">
<INPUT id=Password type=password size="10">
<p>
<INPUT id=SaveBookmark type=button value="Save Bookmark" onclick="saveBookmark_onClick()">
<INPUT id=RestoreBookmark type=button value="Restore Bookmark" onclick="restoreBookmark_onClick()">
<p>&nbsp;
</td>
</tr>
</table>
<p>
<OBJECT ID="MSVidSegEvent" CLASSID="CLSID:781C7600-A6C3-4f7a-893E-C89B3E7B67E0">
</OBJECT>
<SCRIPT LANGUAGE="JScript" FOR=MSVidSegEvent EVENT="DVDNotify(event, param1, param2)">
OnDVDNotify(event, param1, param2)</SCRIPT>
<SCRIPT LANGUAGE="JScript" FOR=MSVidSegEvent EVENT="PlayForwards(bEnabled)">ProcessPFEvent(bEnabled)</SCRIPT>
<SCRIPT LANGUAGE="JScript" FOR=MSVidSegEvent EVENT="PlayBackwards(bEnabled)">ProcessPBEvent(bEnabled)</SCRIPT>
<SCRIPT LANGUAGE="JScript" FOR=MSVidSegEvent EVENT="ShowMenu(bEnabled)">ProcessShowMenuEvent(bEnabled)</SCRIPT>
<SCRIPT LANGUAGE="JScript" FOR=MSVidSegEvent EVENT="Resume(bEnabled)">ProcessResumeEvent(bEnabled)</SCRIPT>
<SCRIPT LANGUAGE="JScript" FOR=MSVidSegEvent EVENT="ChangeCurrentAudioStream(bEnabled)">ProcessAudEvent(bEnabled)</SCRIPT>
<SCRIPT LANGUAGE="JScript" FOR=MSVidSegEvent EVENT="ChangeCurrentSubpictureStream(bEnabled)">ProcessSPEvent(bEnabled)</SCRIPT>
<SCRIPT LANGUAGE="JScript" FOR=MSVidSegEvent EVENT="ChangeCurrentAngle(bEnabled)">ProcessAngleEvent(bEnabled)</SCRIPT>
<SCRIPT LANGUAGE="JScript" FOR=MSVidSegEvent EVENT="PlayAtTimeInTitle(bEnabled)">ProcessTimePlayEvent(bEnabled)</SCRIPT>
<SCRIPT LANGUAGE="JScript" FOR=MSVidSegEvent EVENT="PlayAtTime(bEnabled)">ProcessTimePlayEvent(bEnabled)</SCRIPT>
<SCRIPT LANGUAGE="JScript" FOR=MSVidSegEvent EVENT="PlayChapterInTitle(bEnabled)">ProcessChapterPlayEvent(bEnabled)</SCRIPT>
<SCRIPT LANGUAGE="JScript" FOR=MSVidSegEvent EVENT="PlayChapter(bEnabled)">ProcessChapterSearchEvent(bEnabled)</SCRIPT>
<SCRIPT language=JSCRIPT>
/*************************************************************/
/* Name: ProcessXXXEvent
/* Description: Process DVD events
/*************************************************************/
function ProcessPFEvent(param1)
{
FF.disabled = !param1;
}
function ProcessPBEvent(param1)
{
RW.disabled = !param1;
}
function ProcessShowMenuEvent(param1)
{
Menu.disabled = !param1;
}
function ProcessResumeEvent(param1)
{
Resume.disabled = !param1;
}
function ProcessAudEvent(param1)
{
Audio.disabled = !param1;
}
function ProcessSPEvent(param1)
{
SP.disabled = !param1;
}
function ProcessAngleEvent(param1)
{
Angle.disabled = !param1;
}
function ProcessChapterSearchEvent(param1)
{
PrevChap.disabled = !param1;
NextChap.disabled = !param1;
}
function ProcessChapterPlayEvent(param1)
{
PrevChap.disabled = !param1;
NextChap.disabled = !param1;
}
function ProcessTimePlayEvent(param1)
{
}
function ProcessTimeSearchEvent(param1)
{
}
// DVD event codes
var EC_DVDBASE = 256;
var EC_DVD_DOMAIN_CHANGE = EC_DVDBASE + 1;
var EC_DVD_TITLE_CHANGE = EC_DVDBASE + 2;
var EC_DVD_CHAPTER_START = EC_DVDBASE + 3;
var EC_DVD_AUDIO_STREAM_CHANGE = EC_DVDBASE + 4;
var EC_DVD_SUBPICTURE_STREAM_CHANGE = EC_DVDBASE + 5;
var EC_DVD_ANGLE_CHANGE = EC_DVDBASE + 6;
var EC_DVD_BUTTON_CHANGE = EC_DVDBASE + 7;
var EC_DVD_VALID_UOPS_CHANGE = EC_DVDBASE + 8;
var EC_DVD_STILL_ON = EC_DVDBASE + 9;
var EC_DVD_STILL_OFF = EC_DVDBASE + 10;
var EC_DVD_CURRENT_TIME = EC_DVDBASE + 11;
var EC_DVD_ERROR = EC_DVDBASE + 12;
var EC_DVD_WARNING = EC_DVDBASE + 13;
var EC_DVD_CHAPTER_AUTOSTOP = EC_DVDBASE + 14;
var EC_DVD_NO_FP_PGC = EC_DVDBASE + 15;
var EC_DVD_PLAYBACK_RATE_CHANGE = EC_DVDBASE + 16;
var EC_DVD_PARENTAL_LEVEL_CHANGE = EC_DVDBASE + 17;
var EC_DVD_PLAYBACK_STOPPED = EC_DVDBASE + 18;
var EC_DVD_ANGLES_AVAILABLE = EC_DVDBASE + 19;
var EC_DVD_PLAYING = EC_DVDBASE + 254;
var EC_DVD_PAUSED = EC_DVDBASE + 255;
var EC_DVD_DISC_EJECTED = EC_DVDBASE + 24;
var EC_DVD_DISC_INSERTED = EC_DVDBASE + 25;
var EC_DVD_CURRENT_HMSF_TIME = EC_DVDBASE + 26;
var EC_PAUSED = 14;
var DVD_ERROR_Unexpected= 1;
var DVD_ERROR_CopyProtectFail= 2;
var DVD_ERROR_InvalidDVD1_0Disc= 3;
var DVD_ERROR_InvalidDiscRegion= 4;
var DVD_ERROR_LowParentalLevel= 5;
var DVD_ERROR_MacrovisionFail= 6;
var DVD_ERROR_IncompatibleSystemAndDecoderRegions=7;
var DVD_ERROR_IncompatibleDiscAndDecoderRegions=8;
var DVD_ERROR_NoSubpictureStream= 99;
function window_onload()
{
MSVidCtl.View("DVD");
MSVidCtl.Build();
MSVidCtl.InputActive.EventHandler = MSVidSegEvent;
MSVidCtl.InputActive.RestorePreferredSettings();
MSVidCtl.Run();
}
function OnDVDNotify(event, param1, param2)
{
lEventCode = event;
if (lEventCode == EC_DVD_STILL_ON) {
text = "STILL_ON";
}
else if (lEventCode == EC_DVD_STILL_OFF) {
text = "STILL_OFF";
}
else if (lEventCode == EC_DVD_BUTTON_CHANGE) {
text = "BUTTON_CHANGE";
}
else if (lEventCode == EC_DVD_DOMAIN_CHANGE) {
text = "DOMAIN_CHANGE";
}
else if (lEventCode == EC_DVD_TITLE_CHANGE) {
text = "TITLE_CHANGE";
CurrentTitle.value = param1;
updateAudio();
updateSP();
}
else if (lEventCode == EC_DVD_CHAPTER_START) {
text = "CHAPTER_START";
CurrentChap.value = param1;
}
else if (lEventCode == EC_DVD_AUDIO_STREAM_CHANGE) {
text = "AUDIO_STREAM_CHANGE";
updateAudio();
}
else if (lEventCode == EC_DVD_SUBPICTURE_STREAM_CHANGE) {
text = "SUBPICTURE_STREAM_CHANGE";
updateSP();
}
else if (lEventCode == EC_DVD_ANGLE_CHANGE) {
text = "ANGLE_CHANGE";
}
else if (lEventCode == EC_DVD_VALID_UOPS_CHANGE) {
text = "VALID_UOPS_CHANGE";
}
else if (lEventCode == EC_DVD_CURRENT_HMSF_TIME) {
text = "CURRENT_HMSF_TIME";
CurrentTime.value = MSVidCtl.InputActive.DVDTimeCode2bstr(param1).substr(0, 8);
}
else if (lEventCode == EC_DVD_CURRENT_TIME) {
text = "CURRENT_TIME";
}
else if (event == EC_DVD_PAUSED ) {
text = "PAUSED";
}
else if (lEventCode == EC_DVD_PLAYING) {
text = "PLAYING";
}
else if (lEventCode == EC_DVD_PLAYBACK_RATE_CHANGE) {
text = "PLAYBACK_RATE_CHANGE";
}
else if (lEventCode == EC_DVD_ERROR) {
text = "ERROR";
}
else if (lEventCode == EC_DVD_PARENTAL_LEVEL_CHANGE) {
text = "PARENTAL_LEVEL_CHANGE";
}
else if (lEventCode == EC_DVD_PLAYBACK_STOPPED) {
text = "PLAYBACK_STOPPED";
}
else if (lEventCode == EC_DVD_ANGLES_AVAILABLE) {
text = "ANGLES_AVAILABLE";
//Angle.disabled = !param1;
}
else if (lEventCode == EC_DVD_DISC_EJECTED) {
text = "DISC_EJECTED";
}
else if (lEventCode == EC_DVD_DISC_INSERTED) {
text = "DISC_INSERTED";
}
EventText.value = text;
}
function saveBookmark_onClick()
{
MSVidCtl.InputActive.SaveBookmark();
}
function restoreBookmark_onClick()
{
MSVidCtl.InputActive.RestoreBookmark();
}
function pg_onClick()
{
MSVidCtl.InputActive.SelectParentalLevel(LevelText.value, "", Password.value);
MSVidCtl.InputActive.DVDAdm.SaveParentalLevel(LevelText.value, "", Password.value);
LevelText.value = MSVidCtl.InputActive.GetPlayerParentalLevel();
}
function sp_onClick()
{
MSVidCtl.InputActive.CurrentSubpictureStream = SPText.value;
updateSP();
}
function audio_onClick()
{
MSVidCtl.InputActive.CurrentAudioStream = AudioText.value;
updateAudio();
}
function angle_onClick()
{
MSVidCtl.InputActive.CurrentAngle = AngleText.value;
}
function menu_onClick()
{
MSVidCtl.InputActive.ShowMenu(3);
}
function resume_onClick()
{
MSVidCtl.InputActive.Resume();
}
function FF_onClick()
{
MSVidCtl.InputActive.PlayForwards(8.0);
}
function RW_onClick()
{
MSVidCtl.InputActive.PlayBackwards(8.0);
}
function Prev_onClick()
{
MSVidCtl.InputActive.PlayPrevChapter();
}
function Next_onClick()
{
MSVidCtl.InputActive.PlayNextChapter();
}
function run_onClick()
{
MSVidCtl.Run();
}
function pause_onClick()
{
MSVidCtl.Pause();
}
function stop_onClick()
{
MSVidCtl.Stop();
}
function up_onClick()
{
MSVidCtl.InputActive.SelectUpperButton();
}
function down_onClick()
{
MSVidCtl.InputActive.SelectLowerButton();
}
function left_onClick()
{
MSVidCtl.InputActive.SelectLeftButton();
}
function right_onClick()
{
MSVidCtl.InputActive.SelectRightButton();
}
function enter_onClick()
{
MSVidCtl.InputActive.ActivateButton();
}
function updateSP()
{
try {
if (MSVidCtl.InputActive.SubpictureOn)
SPLang.value = MSVidCtl.InputActive.GetSubpictureLanguage(MSVidCtl.InputActive.CurrentSubpictureStream);
else
SPLang.value = "";
}
catch(e) {
}
}
function updateAudio()
{
try {
AudioLang.value = MSVidCtl.InputActive.GetAudioLanguage(MSVidCtl.InputActive.CurrentAudioStream);
}
catch(e) {
}
}
</SCRIPT>
</BODY>
</HTML>