OpenNI.Context.OpenFileRecordingEx C# (CSharp) Method

OpenFileRecordingEx() public method

public OpenFileRecordingEx ( string fileName ) : ProductionNode
fileName string
return ProductionNode
        public ProductionNode OpenFileRecordingEx(string fileName)
        {
            IntPtr hPlayer;
            int status = SafeNativeMethods.xnContextOpenFileRecordingEx(this.InternalObject, fileName, out hPlayer);
            WrapperUtils.ThrowOnError(status);
            return new Player(this, hPlayer, false);
        }

Usage Example

コード例 #1
0
    public void Awake()
    {
        Debug.Log("Initing OpenNI" + (LoadFromXML ? "(" + XMLFilename + ")" : ""));
        try {
            this.context = LoadFromXML ? new Context(XMLFilename) : new Context();
        }
        catch (Exception ex) {
            Debug.LogError("Error opening OpenNI context: " + ex.Message);
            return;
        }

        // add license manually if not loading from XML
        if (!LoadFromXML) {
            License ll = new License();
            ll.Key = LicenseKey;
            ll.Vendor = LicenseVendor;
            context.AddLicense(ll);
        }

        if (LoadFromRecording)
        {
            context.OpenFileRecordingEx(RecordingFilename);
            Player player = openNode(NodeType.Player) as Player;
            player.PlaybackSpeed = 0.0;
            StartCoroutine(ReadNextFrameFromRecording(player));
        }

        this.Depth = openNode(NodeType.Depth) as DepthGenerator;
        this.mirrorCap = this.Depth.MirrorCapability;
        if (!LoadFromRecording) {
            this.mirrorCap.SetMirror(Mirror);
            mirrorState = Mirror;
        }
    }
All Usage Examples Of OpenNI.Context::OpenFileRecordingEx