private void Start() { _config = ImmersifyCmdConfigMgr.Instance as ImmersifyCmdConfigMgr; _stereoVideoMode = _config.stereoMode; if (_stereoVideoMode == StereoVideoMode.MONO) { DisplayMonoVideo(); } else { // Just setup the first frame: // If the video is stereo, but the viewer is mono, just the left video is displayed. DisplayLeftEyeVideo(); } }
protected override void ParseArgument(string key, string value) { key = key.ToLower(); value = value.ToLower(); if (key.Equals("-videopathtype")) { if (value.Equals("streamingassets")) { videoPathType = ImmersifyPlugin.PathType.StreamingAssets; } else if (value.Equals("absolutepath")) { videoPathType = ImmersifyPlugin.PathType.AbsolutePath; } } else if (key.Equals("-audiopathtype")) { if (value.Equals("streamingassets")) { _audioPathType = ImmersifyPlugin.PathType.StreamingAssets; _audioPathTypeGotSetExplicitly = true; } else if (value.Equals("absolutepath")) { _audioPathType = ImmersifyPlugin.PathType.AbsolutePath; _audioPathTypeGotSetExplicitly = true; } } else if (key.Equals("-videofile")) { videoFile = value; Debug.Log("Videofile got set: " + value); } else if (key.Equals("-audiofile")) { audioFile = value; Debug.Log("Audiofile got set: " + value); } //else if (key.Equals("-videowidth")) //{ // int resultWidth; // if (ValueToInt(value, out resultWidth)) // { // videoWidth = resultWidth; // } //} //else if (key.Equals("-videoheight")) //{ // int resultHeight; // if (ValueToInt(value, out resultHeight)) // { // videoHeight = resultHeight; // } //} else if (key.Equals("-videoframerate")) { float resultFramerate; if (ValueToFloat(value, out resultFramerate)) { videoFramerate = resultFramerate; } } //else if(key.Equals("-chromasubsampling")) //{ // int resultSubsampling; // if (ValueToInt(value, out resultSubsampling)) // { // switch (resultSubsampling) // { // case 444: // chromaSubsampling = ImmersifyPlugin.ChromaSubsampling._444; // break; // case 422: // chromaSubsampling = ImmersifyPlugin.ChromaSubsampling._422; // break; // case 420: // chromaSubsampling = ImmersifyPlugin.ChromaSubsampling._420; // break; // default: // Debug.LogWarning("Could not handle chroma subsampling " + resultSubsampling); // break; // } // } //} else if (key.Equals("-maxqueue")) { int resultMaxQueue; if (ValueToInt(value, out resultMaxQueue)) { maxQueue = Mathf.Max(1, resultMaxQueue); // maxQueue must not be 0 or negative. } } else if (key.Equals("-stereomode")) { if (value.Equals("mono")) { stereoMode = ImmersifyPlugin.StereoVideoMode.MONO; } else if (value == "topbottom") { stereoMode = ImmersifyPlugin.StereoVideoMode.TOP_BOTTOM; } else if (value == "sidebyside") { stereoMode = ImmersifyPlugin.StereoVideoMode.LEFT_RIGHT; } } else if (key.Equals("-invertleftright")) { bool resultValue; if (ValueToBool(value, out resultValue)) { invertLeftRight = resultValue; } } else if (key.Equals("-videoisupsidedown")) { bool resultValue; if (ValueToBool(value, out resultValue)) { videoIsUpsideDown = resultValue; } } else { base.ParseArgument(key, value); } }