Esempio n. 1
0
        private async void btStart_Click(object sender, EventArgs e)
        {
            mmLog.Clear();

            VideoCapture1.Video_Renderer.Zoom_Ratio  = 0;
            VideoCapture1.Video_Renderer.Zoom_ShiftX = 0;
            VideoCapture1.Video_Renderer.Zoom_ShiftY = 0;

            VideoCapture1.Debug_Mode = cbDebugMode.Checked;
            VideoCapture1.Debug_Dir  = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "VisioForge");

            VideoCapture1.Audio_OutputDevice = cbAudioOutputDevice.Text;

            VideoCapture1.Audio_CaptureDevice                = new AudioCaptureSource(cbAudioInputDevice.Text);
            VideoCapture1.Audio_CaptureDevice.Format         = cbAudioInputFormat.Text;
            VideoCapture1.Audio_CaptureDevice.Format_UseBest = false;
            VideoCapture1.Audio_CaptureDevice.Line           = cbAudioInputLine.Text;

            VideoCapture1.Audio_PlayAudio = cbPlayAudio.Checked;
            VideoCapture1.Video_Renderer.VideoRenderer = VideoRendererMode.None;

            if (cbMode.SelectedIndex == 0)
            {
                VideoCapture1.Mode = VideoCaptureMode.AudioPreview;
                VideoCapture1.Audio_RecordAudio = true;
            }
            else
            {
                VideoCapture1.Mode = VideoCaptureMode.AudioCapture;
                VideoCapture1.Audio_RecordAudio = true;
                VideoCapture1.Output_Filename   = edOutput.Text;

                switch (cbOutputFormat.SelectedIndex)
                {
                case 0:
                {
                    var acmOutput = new ACMOutput();
                    SetACMOutput(ref acmOutput);
                    VideoCapture1.Output_Format = acmOutput;

                    break;
                }

                case 1:
                {
                    var mp3Output = new MP3Output();
                    SetMP3Output(ref mp3Output);
                    VideoCapture1.Output_Format = mp3Output;

                    break;
                }

                case 2:
                {
                    var wmaOutput = new WMAOutput();
                    SetWMAOutput(ref wmaOutput);
                    VideoCapture1.Output_Format = wmaOutput;

                    break;
                }

                case 3:
                {
                    var oggVorbisOutput = new OGGVorbisOutput();
                    SetOGGOutput(ref oggVorbisOutput);
                    VideoCapture1.Output_Format = oggVorbisOutput;

                    break;
                }

                case 4:
                {
                    var flacOutput = new FLACOutput();
                    SetFLACOutput(ref flacOutput);
                    VideoCapture1.Output_Format = flacOutput;

                    break;
                }

                case 5:
                {
                    var speexOutput = new SpeexOutput();
                    SetSpeexOutput(ref speexOutput);
                    VideoCapture1.Output_Format = speexOutput;

                    break;
                }

                case 6:
                {
                    var m4aOutput = new M4AOutput();
                    SetM4AOutput(ref m4aOutput);
                    VideoCapture1.Output_Format = m4aOutput;

                    break;
                }
                }
            }

            // Audio processing
            VideoCapture1.Audio_Effects_Clear(-1);
            VideoCapture1.Audio_Effects_Enabled = true;

            VideoCapture1.Audio_Effects_Add(-1, AudioEffectType.Amplify, AUDIO_EFFECT_ID_AMPLIFY, cbAudAmplifyEnabled.Checked, TimeSpan.Zero, TimeSpan.Zero);
            VideoCapture1.Audio_Effects_Add(-1, AudioEffectType.Equalizer, AUDIO_EFFECT_ID_EQ, cbAudEqualizerEnabled.Checked, TimeSpan.Zero, TimeSpan.Zero);
            VideoCapture1.Audio_Effects_Add(-1, AudioEffectType.TrueBass, AUDIO_EFFECT_ID_TRUE_BASS, cbAudTrueBassEnabled.Checked, TimeSpan.Zero, TimeSpan.Zero);
            VideoCapture1.Audio_Effects_Add(-1, AudioEffectType.Sound3D, AUDIO_EFFECT_ID_SOUND_3D, cbAudSound3DEnabled.Checked, TimeSpan.Zero, TimeSpan.Zero);

            await VideoCapture1.StartAsync();

            tcMain.SelectedIndex = 3;
            tmRecording.Start();
        }
Esempio n. 2
0
        private async void btStart_Click(object sender, EventArgs e)
        {
            mmLog.Clear();

            VideoCapture1.Video_Sample_Grabber_Enabled = true;

            VideoCapture1.Debug_Mode = cbDebugMode.Checked;
            VideoCapture1.Debug_Dir  = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "VisioForge");

            VideoCapture1.Audio_OutputDevice = cbAudioOutputDevice.Text;

            if (cbRecordAudio.Checked)
            {
                VideoCapture1.Audio_RecordAudio = true;
                VideoCapture1.Audio_PlayAudio   = true;
            }
            else
            {
                VideoCapture1.Audio_RecordAudio = false;
                VideoCapture1.Audio_PlayAudio   = false;
            }

            // apply capture parameters
            VideoCapture1.Decklink_Source = new DecklinkSourceSettings
            {
                Name        = cbDecklinkCaptureDevice.Text,
                VideoFormat = cbDecklinkCaptureVideoFormat.Text
            };

            if (rbPreview.Checked)
            {
                VideoCapture1.Mode = VideoCaptureMode.DecklinkSourcePreview;
            }
            else
            {
                VideoCapture1.Mode            = VideoCaptureMode.DecklinkSourceCapture;
                VideoCapture1.Output_Filename = edOutput.Text;

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

                    break;
                }

                case 1:
                {
                    var wmvOutput = new WMVOutput();
                    SetWMVOutput(ref wmvOutput);
                    VideoCapture1.Output_Format = wmvOutput;

                    break;
                }

                case 2:
                {
                    var mp4Output = new MP4Output();
                    SetMP4Output(ref mp4Output);
                    VideoCapture1.Output_Format = mp4Output;

                    break;
                }

                case 3:
                {
                    var mp4Output = new MP4HWOutput();
                    SetMP4HWOutput(ref mp4Output);
                    VideoCapture1.Output_Format = mp4Output;

                    break;
                }

                case 4:
                {
                    var gifOutput = new AnimatedGIFOutput();
                    SetGIFOutput(ref gifOutput);

                    VideoCapture1.Output_Format = gifOutput;

                    break;
                }

                case 5:
                {
                    var tsOutput = new MPEGTSOutput();
                    SetMPEGTSOutput(ref tsOutput);
                    VideoCapture1.Output_Format = tsOutput;

                    break;
                }

                case 6:
                {
                    var movOutput = new MOVOutput();
                    SetMOVOutput(ref movOutput);
                    VideoCapture1.Output_Format = movOutput;

                    break;
                }
                }
            }

            VideoCapture1.Video_Effects_Enabled = true;
            VideoCapture1.Video_Effects_Clear();
            lbLogos.Items.Clear();
            ConfigureVideoEffects();

            // Audio processing
            VideoCapture1.Audio_Effects_Clear(-1);
            VideoCapture1.Audio_Effects_Enabled = true;

            VideoCapture1.Audio_Effects_Add(-1, AudioEffectType.Amplify, AUDIO_EFFECT_ID_AMPLIFY, cbAudAmplifyEnabled.Checked, TimeSpan.Zero, TimeSpan.Zero);

            await VideoCapture1.StartAsync();

            tcMain.SelectedIndex = 4;
            tmRecording.Start();
        }
Esempio n. 3
0
        private void btStart_Click(object sender, RoutedEventArgs e)
        {
            mmLog.Clear();

            VideoCapture1.Debug_Mode = cbDebugMode.IsChecked == true;
            VideoCapture1.Debug_Dir  = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\VisioForge\\";

            VideoCapture1.Audio_CaptureDevice                = cbAudioInputDevice.Text;
            VideoCapture1.Audio_OutputDevice                 = cbAudioOutputDevice.Text;
            VideoCapture1.Audio_CaptureDevice_Format         = cbAudioInputFormat.Text;
            VideoCapture1.Audio_CaptureDevice_Format_UseBest = false;
            VideoCapture1.Audio_CaptureDevice_Line           = cbAudioInputLine.Text;
            VideoCapture1.Audio_PlayAudio = cbPlayAudio.IsChecked == true;
            VideoCapture1.Video_Renderer.VideoRendererInternal = VFVideoRendererInternal.None;

            if (cbMode.SelectedIndex == 0)
            {
                VideoCapture1.Mode = VFVideoCaptureMode.AudioPreview;
                VideoCapture1.Audio_RecordAudio = true;
            }
            else
            {
                VideoCapture1.Mode = VFVideoCaptureMode.AudioCapture;
                VideoCapture1.Audio_RecordAudio = true;
                VideoCapture1.Output_Filename   = edOutput.Text;

                switch (cbOutputFormat.SelectedIndex)
                {
                case 0:
                {
                    var acmOutput = new VFACMOutput();
                    SetACMOutput(ref acmOutput);
                    VideoCapture1.Output_Format = acmOutput;

                    break;
                }

                case 1:
                {
                    var mp3Output = new VFMP3Output();
                    SetMP3Output(ref mp3Output);
                    VideoCapture1.Output_Format = mp3Output;

                    break;
                }

                case 2:
                {
                    var wmaOutput = new VFWMAOutput();
                    SetWMAOutput(ref wmaOutput);
                    VideoCapture1.Output_Format = wmaOutput;

                    break;
                }

                case 3:
                {
                    var oggVorbisOutput = new VFOGGVorbisOutput();
                    SetOGGOutput(ref oggVorbisOutput);
                    VideoCapture1.Output_Format = oggVorbisOutput;

                    break;
                }

                case 4:
                {
                    var flacOutput = new VFFLACOutput();
                    SetFLACOutput(ref flacOutput);
                    VideoCapture1.Output_Format = flacOutput;

                    break;
                }

                case 5:
                {
                    var speexOutput = new VFSpeexOutput();
                    SetSpeexOutput(ref speexOutput);
                    VideoCapture1.Output_Format = speexOutput;

                    break;
                }

                case 6:
                {
                    var m4aOutput = new VFM4AOutput();
                    SetM4AOutput(ref m4aOutput);
                    VideoCapture1.Output_Format = m4aOutput;

                    break;
                }
                }
            }

            // Audio processing
            VideoCapture1.Audio_Effects_Clear(-1);
            VideoCapture1.Audio_Effects_Enabled = true;

            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.Amplify, cbAudAmplifyEnabled.IsChecked == true, -1, -1);
            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.Equalizer, cbAudEqualizerEnabled.IsChecked == true, -1, -1);
            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.TrueBass, cbAudTrueBassEnabled.IsChecked == true, -1, -1);
            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.Sound3D, cbAudSound3DEnabled.IsChecked == true, -1, -1);

            VideoCapture1.Start();
        }
Esempio n. 4
0
        private async void btStart_Click(object sender, EventArgs e)
        {
            mmLog.Clear();

            VideoCapture1.Video_Sample_Grabber_Enabled = true;

            VideoCapture1.Video_Renderer.Zoom_Ratio  = 0;
            VideoCapture1.Video_Renderer.Zoom_ShiftX = 0;
            VideoCapture1.Video_Renderer.Zoom_ShiftY = 0;

            VideoCapture1.Debug_Mode = cbDebugMode.Checked;
            VideoCapture1.Debug_Dir  = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "VisioForge");

            VideoCapture1.Audio_OutputDevice = "Default DirectSound Device";

            if (cbRecordAudio.Checked)
            {
                VideoCapture1.Audio_RecordAudio = true;
                VideoCapture1.Audio_PlayAudio   = true;
            }
            else
            {
                VideoCapture1.Audio_RecordAudio = false;
                VideoCapture1.Audio_PlayAudio   = false;
            }

            VideoCapture1.Audio_OutputDevice = cbAudioOutputDevice.Text;

            // apply capture parameters
            VideoCapture1.Video_CaptureDevice = new VideoCaptureSource(cbVideoInputDevice.Text);
            VideoCapture1.Video_CaptureDevice.Format_UseBest = cbUseBestVideoInputFormat.Checked;
            VideoCapture1.Video_CaptureDevice.Format         = cbVideoInputFormat.Text;

            if (cbVideoInputFrameRate.SelectedIndex != -1)
            {
                VideoCapture1.Video_CaptureDevice.FrameRate = (float)Convert.ToDouble(cbVideoInputFrameRate.Text);
            }

            VideoCapture1.Audio_CaptureDevice = new AudioCaptureSource(cbAudioInputDevice.Text);
            VideoCapture1.Audio_CaptureDevice.Format_UseBest = cbUseBestAudioInputFormat.Checked;
            VideoCapture1.Audio_CaptureDevice.Format         = cbAudioInputFormat.Text;


            if (rbPreview.Checked)
            {
                VideoCapture1.Mode = VideoCaptureMode.VideoPreview;
            }
            else
            {
                VideoCapture1.Mode            = VideoCaptureMode.VideoCapture;
                VideoCapture1.Output_Filename = edOutput.Text;

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

                    break;
                }

                case 1:
                {
                    var wmvOutput = new WMVOutput();
                    SetWMVOutput(ref wmvOutput);
                    VideoCapture1.Output_Format = wmvOutput;

                    break;
                }

                case 2:
                {
                    var mp4Output = new MP4Output();
                    SetMP4Output(ref mp4Output);
                    VideoCapture1.Output_Format = mp4Output;

                    break;
                }

                case 3:
                {
                    var mp4Output = new MP4HWOutput();
                    SetMP4HWOutput(ref mp4Output);
                    VideoCapture1.Output_Format = mp4Output;

                    break;
                }

                case 4:
                {
                    var gifOutput = new AnimatedGIFOutput();
                    SetGIFOutput(ref gifOutput);

                    VideoCapture1.Output_Format = gifOutput;

                    break;
                }

                case 5:
                {
                    var tsOutput = new MPEGTSOutput();
                    SetMPEGTSOutput(ref tsOutput);
                    VideoCapture1.Output_Format = tsOutput;

                    break;
                }

                case 6:
                {
                    var movOutput = new MOVOutput();
                    SetMOVOutput(ref movOutput);
                    VideoCapture1.Output_Format = movOutput;

                    break;
                }
                }
            }

            VideoCapture1.Video_Effects_Enabled         = true;
            VideoCapture1.Video_Effects_MergeImageLogos = cbMergeImageLogos.Checked;
            VideoCapture1.Video_Effects_MergeTextLogos  = cbMergeTextLogos.Checked;
            VideoCapture1.Video_Effects_Clear();
            lbLogos.Items.Clear();
            ConfigureVideoEffects();

            // Audio processing
            VideoCapture1.Audio_Effects_Clear(-1);
            VideoCapture1.Audio_Effects_Enabled = true;

            VideoCapture1.Audio_Effects_Add(-1, AudioEffectType.Amplify, AUDIO_EFFECT_ID_AMPLIFY, cbAudAmplifyEnabled.Checked, TimeSpan.Zero, TimeSpan.Zero);
            VideoCapture1.Audio_Effects_Add(-1, AudioEffectType.Equalizer, AUDIO_EFFECT_ID_EQ, cbAudEqualizerEnabled.Checked, TimeSpan.Zero, TimeSpan.Zero);
            VideoCapture1.Audio_Effects_Add(-1, AudioEffectType.TrueBass, AUDIO_EFFECT_ID_TRUE_BASS, cbAudTrueBassEnabled.Checked, TimeSpan.Zero, TimeSpan.Zero);

            await VideoCapture1.StartAsync();

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