Example #1
0
        public virtual void callCallback(VSMXInterpreter interpreter, string name, VSMXBaseObject[] arguments)
        {
            VSMXBaseObject function = object.getPropertyValue(name);

            if (function is VSMXFunction)
            {
                //if (log.DebugEnabled)
                {
                    Console.WriteLine(string.Format("callCallback {0}, arguments={1}", name, arguments));
                }

                interpreter.interpretFunction((VSMXFunction)function, null, arguments);
            }
        }
Example #2
0
        public virtual void play(VSMXBaseObject @object, VSMXBaseObject pauseMode, VSMXBaseObject menuMode, VSMXBaseObject playListNumber, VSMXBaseObject chapterNumber, VSMXBaseObject videoNumber, VSMXBaseObject audioNumber, VSMXBaseObject audioFlag, VSMXBaseObject subtitleNumber, VSMXBaseObject subtitleFlag, VSMXBaseObject unknownBool)
        {
            //if (log.DebugEnabled)
            {
//JAVA TO C# CONVERTER TODO TASK: The following line has a Java format specifier which cannot be directly translated to .NET:
//ORIGINAL LINE: Console.WriteLine(String.format("MoviePlayer.play pauseMode=%d, menuMode=%d, playListNumber=%d, chapterNumber=%d, videoNumber=0x%X, audioNumber=0x%X, audioFlag=0x%X, subtitleNumber=%d, subtitleFlag=0x%X, unknownBool=%b", pauseMode.getIntValue(), menuMode.getIntValue(), playListNumber.getIntValue(), chapterNumber.getIntValue(), videoNumber.getIntValue(), audioNumber.getIntValue(), audioFlag.getIntValue(), subtitleNumber.getIntValue(), subtitleFlag.getIntValue(), unknownBool.getBooleanValue()));
                Console.WriteLine(string.Format("MoviePlayer.play pauseMode=%d, menuMode=%d, playListNumber=%d, chapterNumber=%d, videoNumber=0x%X, audioNumber=0x%X, audioFlag=0x%X, subtitleNumber=%d, subtitleFlag=0x%X, unknownBool=%b", pauseMode.IntValue, menuMode.IntValue, playListNumber.IntValue, chapterNumber.IntValue, videoNumber.IntValue, audioNumber.IntValue, audioFlag.IntValue, subtitleNumber.IntValue, subtitleFlag.IntValue, unknownBool.BooleanValue));
            }
            playing = true;
            bool previousMenuMode = this.menuMode;

            this.menuMode       = menuMode.BooleanValue;
            this.playListNumber = playListNumber.IntValue;
            this.chapterNumber  = chapterNumber.IntValue;
            this.videoNumber    = videoNumber.IntValue;
            this.audioNumber    = audioNumber.IntValue;
            this.audioFlag      = audioFlag.IntValue;
            this.subtitleNumber = subtitleNumber.IntValue;
            this.subtitleFlag   = subtitleFlag.IntValue;

            if (umdVideoPlayer != null)
            {
                umdVideoPlayer.play(this.playListNumber, this.chapterNumber, this.videoNumber, this.audioNumber, this.audioFlag, this.subtitleNumber, this.subtitleFlag);
            }

            // Going to menu mode?
            if (!previousMenuMode && this.menuMode)
            {
                // Call the "controller.onMenu" callback
                VSMXBaseObject callback = controller.getPropertyValue("onMenu");
                if (callback is VSMXFunction)
                {
                    VSMXBaseObject[] arguments = new VSMXBaseObject[0];
                    interpreter.interpretFunction((VSMXFunction)callback, null, arguments);
                }
            }
        }