public void SetDirectCaptureCustomOutput(ref VFDirectCaptureMP4Output directCaptureOutput, VideoCaptureCore core)
        {
            if (customFormatSettingsDialog == null)
            {
                customFormatSettingsDialog = new CustomFormatSettingsDialog(core.Video_Codecs().ToArray(), core.Audio_Codecs().ToArray(), core.DirectShow_Filters().ToArray());
            }

            customFormatSettingsDialog.SaveSettings(ref directCaptureOutput);
        }
示例#2
0
 public void SaveSettings(ref VFDirectCaptureMP4Output directCaptureOutput)
 {
     // Custom audio codec can be used if device to not have audio pin with compressed stream
     if (rbCustomUseAudioCodecsCat.Checked)
     {
         directCaptureOutput.Audio_Codec = cbCustomAudioCodecs.Text;
         directCaptureOutput.Audio_Codec_UseFiltersCategory = false;
     }
     else
     {
         directCaptureOutput.Audio_Codec = cbCustomDSFilterA.Text;
         directCaptureOutput.Audio_Codec_UseFiltersCategory = true;
     }
 }
示例#3
0
 public void LoadSettings(VFDirectCaptureMP4Output directCaptureOutput)
 {
     // Custom audio codec can be used if device to not have audio pin with compressed stream
     if (directCaptureOutput.Audio_Codec_UseFiltersCategory)
     {
         rbCustomUseAudioCodecsCat.Checked = false;
         cbCustomAudioCodecs.Text          = directCaptureOutput.Audio_Codec;
     }
     else
     {
         rbCustomUseAudioCodecsCat.Checked = true;
         cbCustomDSFilterA.Text            = directCaptureOutput.Audio_Codec;
     }
 }
        public void FillSettings(VFVideoCaptureOutputFormat format, VideoCaptureCore core)
        {
            switch (format)
            {
            case VFVideoCaptureOutputFormat.AVI:
            {
                var aviOutput = new VFAVIOutput();
                SetAVIOutput(ref aviOutput, core);
                core.Output_Format = aviOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.WMV:
            {
                var wmvOutput = new VFWMVOutput();
                SetWMVOutput(ref wmvOutput, core);
                core.Output_Format = wmvOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.DV:
            {
                var dvOutput = new VFDVOutput();
                SetDVOutput(ref dvOutput);
                core.Output_Format = dvOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.MKVv1:
            {
                var mkvOutput = new VFMKVv1Output();
                SetMKVOutput(ref mkvOutput, core);
                core.Output_Format = mkvOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.PCM_ACM:
            {
                var acmOutput = new VFACMOutput();
                SetACMOutput(ref acmOutput, core);
                core.Output_Format = acmOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.WMA:
            {
                var wmaOutput = new VFWMAOutput();
                SetWMAOutput(ref wmaOutput, core);
                core.Output_Format = wmaOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.MP3:
            {
                var mp3Output = new VFMP3Output();
                SetMP3Output(ref mp3Output);
                core.Output_Format = mp3Output;

                break;
            }

            case VFVideoCaptureOutputFormat.Custom:
            {
                var customOutput = new VFCustomOutput();
                SetCustomOutput(ref customOutput, core);
                core.Output_Format = customOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.DirectCaptureDV:
            {
                core.Output_Format = new VFDirectCaptureDVOutput();
                break;
            }

            case VFVideoCaptureOutputFormat.DirectCaptureMPEG:
            {
                core.Output_Format = new VFDirectCaptureMPEGOutput();
                break;
            }

            case VFVideoCaptureOutputFormat.DirectCaptureAVI:
            {
                core.Output_Format = new VFDirectCaptureAVIOutput();
                break;
            }

            case VFVideoCaptureOutputFormat.DirectCaptureMKV:
            {
                core.Output_Format = new VFDirectCaptureMKVOutput();
                break;
            }

            case VFVideoCaptureOutputFormat.FFMPEG_DLL:
            {
                var ffmpegDLLOutput = new VFFFMPEGDLLOutput();
                SetFFMPEGDLLOutput(ref ffmpegDLLOutput);
                core.Output_Format = ffmpegDLLOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.WebM:
            {
                var webmOutput = new VFWebMOutput();
                SetWebMOutput(ref webmOutput);
                core.Output_Format = webmOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.DirectCaptureMP4_GDCL:
            {
                var directCaptureOutputGDCL = new VFDirectCaptureMP4Output();
                SetDirectCaptureCustomOutput(ref directCaptureOutputGDCL, core);
                directCaptureOutputGDCL.Muxer = VFDirectCaptureMP4Muxer.GDCL;
                core.Output_Format            = directCaptureOutputGDCL;

                break;
            }

            case VFVideoCaptureOutputFormat.DirectCaptureMP4_Monogram:
            {
                var directCaptureOutputMG = new VFDirectCaptureMP4Output();
                SetDirectCaptureCustomOutput(ref directCaptureOutputMG, core);
                directCaptureOutputMG.Muxer = VFDirectCaptureMP4Muxer.Monogram;
                core.Output_Format          = directCaptureOutputMG;

                break;
            }

            case VFVideoCaptureOutputFormat.DirectCaptureCustom:
            {
                var directCaptureOutput = new VFDirectCaptureCustomOutput();
                SetDirectCaptureCustomOutput(ref directCaptureOutput, core);
                core.Output_Format = directCaptureOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.MP4_CUDA:
            {
                if (mp4V10SettingsDialog == null)
                {
                    mp4V10SettingsDialog = new MP4v10SettingsDialog();
                }

                var mp4Output = new VFMP4v8v10Output();
                SetMP4Output(ref mp4Output);
                core.Output_Format = mp4Output;

                break;
            }

            case VFVideoCaptureOutputFormat.MP4v8v10:
            {
                if (mp4V10SettingsDialog == null)
                {
                    mp4V10SettingsDialog = new MP4v10SettingsDialog();
                }

                var mp4Output = new VFMP4v8v10Output();
                SetMP4Output(ref mp4Output);
                core.Output_Format = mp4Output;

                break;
            }

            case VFVideoCaptureOutputFormat.MP4v11:
            {
                var mp4Output = new VFMP4v11Output();
                SetMP4Output(ref mp4Output);
                core.Output_Format = mp4Output;

                break;
            }

            case VFVideoCaptureOutputFormat.Encrypted:
            {
                if (mp4V10SettingsDialog == null)
                {
                    mp4V10SettingsDialog = new MP4v10SettingsDialog();
                }

                var mp4Output = new VFMP4v8v10Output();
                SetMP4Output(ref mp4Output);
                mp4Output.Encryption = true;
                core.Output_Format   = mp4Output;

                break;
            }

            case VFVideoCaptureOutputFormat.FLAC:
            {
                var flacOutput = new VFFLACOutput();
                SetFLACOutput(ref flacOutput);
                core.Output_Format = flacOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.OggVorbis:
            {
                var oggVorbisOutput = new VFOGGVorbisOutput();
                SetOGGOutput(ref oggVorbisOutput);
                core.Output_Format = oggVorbisOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.Speex:
            {
                var speexOutput = new VFSpeexOutput();
                SetSpeexOutput(ref speexOutput);
                core.Output_Format = speexOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.FFMPEG_EXE:
            {
                var ffmpegOutput = new VFFFMPEGEXEOutput();
                SetFFMPEGEXEOutput(ref ffmpegOutput);
                core.Output_Format = ffmpegOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.M4A:
            {
                var m4aOutput = new VFM4AOutput();
                SetM4AOutput(ref m4aOutput);
                core.Output_Format = m4aOutput;

                break;
            }

            case VFVideoCaptureOutputFormat.AnimatedGIF:
            {
                var gifOutput = new VFAnimatedGIFOutput();
                SetGIFOutput(ref gifOutput);
                core.Output_Format = gifOutput;
                break;
            }

            case VFVideoCaptureOutputFormat.VLC_EXE:
            {
                var vlcOutput = new VFVLCEXEOutput();
                //SetGIFOutput(ref gifOutput);
                core.Output_Format = vlcOutput;
                break;
            }

            default:
                throw new ArgumentOutOfRangeException(nameof(format), format, null);
            }
        }