Exemplo n.º 1
0
        /// <summary>
        /// Wire up the video processing behaviors
        /// </summary>
        private void WireUpVideoProcessingBehaviors()
        {
            if (this.state.UseColor)
            {
                this.InitializeVideoStreamBehavior  = this.DoOpenVideoStream;
                this.ReadColorFrameOnDemandBehavior = this.DoReadColorFrame;

                if (this.state.IsWebCamServiceUpdateEnabled)
                {
                    this.ReadColorFrameForAlternateBehavior = this.DoReadColorFrame;
                    this.InitializeWebCamAlternateBehavior  = this.DoInitializeWebcamAlternate;
                    this.StartPollingBehavior          = this.DoPollKinectCamera;
                    this.UpdateWebCamAlternateBehavior = this.DoUpdateWebCamAlternate;

                    if (this.state.ColorImageFormat == ColorImageFormat.RawYuvResolution640x480Fps15)
                    {
                        this.ProcessVisualImageForWebCamAlternateBehavior =
                            this.DoProcessVisualImageForWebCamAlternateYUVRaw;
                    }
                    else
                    {
                        this.ProcessVisualImageForWebCamAlternateBehavior =
                            this.DoProcessVisualImageForWebCamAlternateRgbYuv;
                    }
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Wire up the skeletal tracking behaviors
 /// </summary>
 private void WireUpSkeletalTrackingBehaviors()
 {
     if (this.state.UseSkeletalTracking)
     {
         this.ReadSkeletalFrameBehavior        = this.DoReadSkeletalFrame;
         this.InitializeSkeletalEngineBehavior = this.DoEnableSkeletalStream;
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Wire up the depth processing behaviors
        /// </summary>
        private void WireUpDepthProcessingBehaviors()
        {
            if (this.state.UseDepth)
            {
                this.ReadDepthFrameOnDemandBehavior = this.DoReadDepthFrame;
                this.InitializeDepthStreamBehavior  = this.DoOpenDepthStream;

                if (this.state.IsDepthServiceUpdateEnabled)
                {
                    this.ReadDepthFrameForAlternateBehavior  = this.DoReadDepthFrame;
                    this.InitializeDepthCamAlternateBehavior = this.DoInitializeDepthCamAlternate;
                    this.StartPollingBehavior            = this.DoPollKinectCamera;
                    this.UpdateDepthCamAlternateBehavior = this.DoUpdateDepthCamAlternate;
                    this.ProcessDepthDataForDepthCamAlternateBehavior =
                        this.DoProcessDepthAndPlayerIndexDataForDepthCamAlternate;
                }
            }
        }