Ejemplo n.º 1
0
        private void btStart_Click(object sender, EventArgs e)
        {
            if (VideoCapture.Filter_Supported_EVR())
            {
                VideoCapture1.Video_Renderer.Video_Renderer = VFVideoRenderer.EVR;
            }
            else if (VideoCapture.Filter_Supported_VMR9())
            {
                VideoCapture1.Video_Renderer.Video_Renderer = VFVideoRenderer.VMR9;
            }
            else
            {
                VideoCapture1.Video_Renderer.Video_Renderer = VFVideoRenderer.VideoRenderer;
            }

            kinect.SensorID          = cbKinectDevice.SelectedIndex;
            kinect.Video_Format      = (VFKinectVideoFormat)cbVideoSourceFormat.SelectedIndex;
            kinect.Video_DepthFormat = (VFKinectDepthFormat)cbDepthSourceFormat.SelectedIndex;

            if (rbUseVideoSource.Checked)
            {
                kinect.Video_Source = VFKinectVideoSource.Video;
            }
            else
            {
                kinect.Video_Source = VFKinectVideoSource.DepthGrayscale;
            }

            VideoCapture1.Audio_CaptureDevice        = cbAudioCaptureDevice.Text;
            VideoCapture1.Audio_CaptureDevice_Format = cbAudioCaptureFormat.Text;
            VideoCapture1.Audio_RecordAudio          = true;
            VideoCapture1.Audio_PlayAudio            = true;

            if (rbPreview.Checked)
            {
                VideoCapture1.Mode = VFVideoCaptureMode.KinectPreview;
            }
            else
            {
                VideoCapture1.Mode = VFVideoCaptureMode.KinectCapture;

                VideoCapture1.Output_Filename = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\VisioForge\\" + "output.mp4";

                var mp4Output = new VFMP4Output();
                ApplyMP4Settings(ref mp4Output);
                VideoCapture1.Output_Format = mp4Output;
            }

            VideoCapture1.Audio_PlayAudio = false;

            kinect.Gestures_Recognizer_Enabled = cbDetectGestures.Checked;

            edGestures.Text = string.Empty;

            kinect.Init(VideoCapture1.Core);
            kinect.Start();
        }
Ejemplo n.º 2
0
        private void btStart_Click(object sender, EventArgs e)
        {
            kinect.SensorID = cbKinectDevice.SelectedIndex;

            if (rbUseVideoSource.Checked)
            {
                kinect.Video_Source = VFKinectVideoSource.Video;
            }
            else
            {
                kinect.Video_Source = VFKinectVideoSource.DepthGrayscale;
            }

            VideoCapture1.Audio_CaptureDevice        = cbAudioCaptureDevice.Text;
            VideoCapture1.Audio_CaptureDevice_Format = cbAudioCaptureFormat.Text;
            VideoCapture1.Audio_RecordAudio          = true;
            VideoCapture1.Audio_PlayAudio            = true;

            if (rbPreview.Checked)
            {
                VideoCapture1.Mode = VFVideoCaptureMode.KinectPreview;
            }
            else
            {
                VideoCapture1.Mode = VFVideoCaptureMode.KinectCapture;

                VideoCapture1.Output_Filename = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\VisioForge\\" + "output.mp4";

                var mp4Output = new VFMP4Output();
                ApplyMP4Settings(ref mp4Output);
                VideoCapture1.Output_Format = mp4Output;
            }

            VideoCapture1.Audio_PlayAudio = false;

            kinect.Init(VideoCapture1.Core);
            kinect.Start();
        }
Ejemplo n.º 3
0
        private void btStart_Click(object sender, EventArgs e)
        {
            kinect.SensorID = cbKinectDevice.SelectedIndex;

            if (rbUseVideoSource.Checked)
            {
                kinect.Video_Source = VFKinectVideoSource.Video;
            }
            else
            {
                kinect.Video_Source = VFKinectVideoSource.DepthGrayscale;
            }

            VideoCapture1.Audio_CaptureDevice        = cbAudioCaptureDevice.Text;
            VideoCapture1.Audio_CaptureDevice_Format = cbAudioCaptureFormat.Text;
            VideoCapture1.Audio_RecordAudio          = true;
            VideoCapture1.Audio_PlayAudio            = true;

            if (rbPreview.Checked)
            {
                VideoCapture1.Mode = VFVideoCaptureMode.KinectPreview;
            }
            else
            {
                VideoCapture1.Mode = VFVideoCaptureMode.KinectCapture;

                VideoCapture1.Output_Filename = edOutput.Text;

                switch (cbOutputFormat.SelectedIndex)
                {
                case 0:
                {
                    var aviOutput = new VFAVIOutput();
                    SetAVIOutput(ref aviOutput);
                    VideoCapture1.Output_Format = aviOutput;

                    break;
                }

                case 1:
                {
                    var mkvOutput = new VFMKVv1Output();
                    SetMKVOutput(ref mkvOutput);
                    VideoCapture1.Output_Format = mkvOutput;

                    break;
                }

                case 2:
                {
                    var wmvOutput = new VFWMVOutput();
                    SetWMVOutput(ref wmvOutput);
                    VideoCapture1.Output_Format = wmvOutput;

                    break;
                }

                case 3:
                {
                    var dvOutput = new VFDVOutput();
                    SetDVOutput(ref dvOutput);
                    VideoCapture1.Output_Format = dvOutput;

                    break;
                }

                case 4:
                {
                    var webmOutput = new VFWebMOutput();
                    SetWebMOutput(ref webmOutput);
                    VideoCapture1.Output_Format = webmOutput;

                    break;
                }

                case 5:
                {
                    var ffmpegDLLOutput = new VFFFMPEGDLLOutput();
                    SetFFMPEGDLLOutput(ref ffmpegDLLOutput);
                    VideoCapture1.Output_Format = ffmpegDLLOutput;

                    break;
                }

                case 6:
                {
                    var ffmpegOutput = new VFFFMPEGEXEOutput();
                    SetFFMPEGEXEOutput(ref ffmpegOutput);
                    VideoCapture1.Output_Format = ffmpegOutput;

                    break;
                }

                case 7:
                {
                    var mp4Output = new VFMP4v8v10Output();
                    SetMP4Output(ref mp4Output);
                    VideoCapture1.Output_Format = mp4Output;

                    break;
                }

                case 8:
                {
                    var mp4Output = new VFMP4v11Output();
                    SetMP4v11Output(ref mp4Output);
                    VideoCapture1.Output_Format = mp4Output;

                    break;
                }

                case 9:
                {
                    var gifOutput = new VFAnimatedGIFOutput();
                    SetGIFOutput(ref gifOutput);

                    VideoCapture1.Output_Format = gifOutput;

                    break;
                }

                case 10:
                {
                    var encOutput = new VFMP4v8v10Output();
                    SetMP4Output(ref encOutput);
                    encOutput.Encryption        = true;
                    encOutput.Encryption_Format = VFEncryptionFormat.MP4_H264_SW_AAC;

                    VideoCapture1.Output_Format = encOutput;

                    break;
                }

                case 11:
                {
                    var tsOutput = new VFMPEGTSOutput();
                    SetMPEGTSOutput(ref tsOutput);
                    VideoCapture1.Output_Format = tsOutput;

                    break;
                }

                case 12:
                {
                    var movOutput = new VFMOVOutput();
                    SetMOVOutput(ref movOutput);
                    VideoCapture1.Output_Format = movOutput;

                    break;
                }
                }
            }

            if (VideoCapture.Filter_Supported_EVR())
            {
                VideoCapture1.Video_Renderer.Video_Renderer = VFVideoRenderer.EVR;
            }
            else if (VideoCapture.Filter_Supported_VMR9())
            {
                VideoCapture1.Video_Renderer.Video_Renderer = VFVideoRenderer.VMR9;
            }
            else
            {
                VideoCapture1.Video_Renderer.Video_Renderer = VFVideoRenderer.VideoRenderer;
            }

            VideoCapture1.Audio_PlayAudio = false;

            kinect.Init(VideoCapture1.Core);
            kinect.Start();

            tcMain.SelectedIndex = 2;
            tmRecording.Start();
        }