Exemplo n.º 1
0
        private void SetACMOutput(ref ACMOutput acmOutput)
        {
            if (pcmSettingsDialog == null)
            {
                pcmSettingsDialog = new PCMSettingsDialog(VideoCapture1);
            }

            pcmSettingsDialog.SaveSettings(ref acmOutput);
        }
Exemplo n.º 2
0
        private void SetACMOutput(ref VFACMOutput acmOutput)
        {
            if (pcmSettingsDialog == null)
            {
                pcmSettingsDialog = new PCMSettingsDialog(VideoEdit1.Audio_Codecs.ToArray());
            }

            pcmSettingsDialog.SaveSettings(ref acmOutput);
        }
Exemplo n.º 3
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    // TODO: dispose managed state (managed objects)
                    mp3SettingsDialog?.Dispose();
                    mp3SettingsDialog = null;

                    m4aSettingsDialog?.Dispose();
                    m4aSettingsDialog = null;

                    flacSettingsDialog?.Dispose();
                    flacSettingsDialog = null;

                    wmvSettingsDialog?.Dispose();
                    wmvSettingsDialog = null;

                    speexSettingsDialog?.Dispose();
                    speexSettingsDialog = null;

                    pcmSettingsDialog?.Dispose();
                    pcmSettingsDialog = null;

                    oggVorbisSettingsDialog?.Dispose();
                    oggVorbisSettingsDialog = null;

                    VideoCapture1?.Dispose();
                    VideoCapture1 = null;
                }

                // TODO: free unmanaged resources (unmanaged objects) and override finalizer
                // TODO: set large fields to null
                disposedValue = true;
            }
        }
Exemplo n.º 4
0
        private void btOutputConfigure_Click(object sender, EventArgs e)
        {
            switch (cbOutputFormat.SelectedIndex)
            {
            case 0:
            {
                if (pcmSettingsDialog == null)
                {
                    pcmSettingsDialog = new PCMSettingsDialog(VideoCapture1);
                }

                pcmSettingsDialog.ShowDialog(this);

                break;
            }

            case 1:
            {
                if (mp3SettingsDialog == null)
                {
                    mp3SettingsDialog = new MP3SettingsDialog();
                }

                mp3SettingsDialog.ShowDialog(this);

                break;
            }

            case 2:
            {
                if (wmvSettingsDialog == null)
                {
                    wmvSettingsDialog = new WMVSettingsDialog(VideoCapture1);
                }

                wmvSettingsDialog.WMA = true;
                wmvSettingsDialog.ShowDialog(this);

                break;
            }

            case 3:
            {
                if (oggVorbisSettingsDialog == null)
                {
                    oggVorbisSettingsDialog = new OggVorbisSettingsDialog();
                }

                oggVorbisSettingsDialog.ShowDialog(this);

                break;
            }

            case 4:
            {
                if (flacSettingsDialog == null)
                {
                    flacSettingsDialog = new FLACSettingsDialog();
                }

                flacSettingsDialog.ShowDialog(this);

                break;
            }

            case 5:
            {
                if (speexSettingsDialog == null)
                {
                    speexSettingsDialog = new SpeexSettingsDialog();
                }

                speexSettingsDialog.ShowDialog(this);

                break;
            }

            case 6:
            {
                if (m4aSettingsDialog == null)
                {
                    m4aSettingsDialog = new M4ASettingsDialog();
                }

                m4aSettingsDialog.ShowDialog(this);

                break;
            }
            }
        }
Exemplo n.º 5
0
        private void BtConfigure_Click(object sender, EventArgs e)
        {
            switch (cbOutputVideoFormat.SelectedIndex)
            {
            case 0:
            {
                if (aviSettingsDialog == null)
                {
                    aviSettingsDialog = new AVISettingsDialog(VideoEdit1.Video_Codecs.ToArray(), VideoEdit1.Audio_Codecs.ToArray());
                }

                aviSettingsDialog.ShowDialog(this);

                break;
            }

            case 1:
            {
                if (aviSettingsDialog == null)
                {
                    aviSettingsDialog = new AVISettingsDialog(VideoEdit1.Video_Codecs.ToArray(), VideoEdit1.Audio_Codecs.ToArray());
                }

                aviSettingsDialog.ShowDialog(this);

                break;
            }

            case 2:
            {
                if (wmvSettingsDialog == null)
                {
                    wmvSettingsDialog = new WMVSettingsDialog(VideoEdit1);
                }

                wmvSettingsDialog.WMA = false;
                wmvSettingsDialog.ShowDialog(this);

                break;
            }

            case 3:
            {
                if (dvSettingsDialog == null)
                {
                    dvSettingsDialog = new DVSettingsDialog();
                }

                dvSettingsDialog.ShowDialog(this);

                break;
            }

            case 4:
            {
                if (pcmSettingsDialog == null)
                {
                    pcmSettingsDialog = new PCMSettingsDialog(VideoEdit1.Audio_Codecs.ToArray());
                }

                pcmSettingsDialog.ShowDialog(this);

                break;
            }

            case 5:
            {
                if (mp3SettingsDialog == null)
                {
                    mp3SettingsDialog = new MP3SettingsDialog();
                }

                mp3SettingsDialog.ShowDialog(this);

                break;
            }

            case 6:
            {
                if (m4aSettingsDialog == null)
                {
                    m4aSettingsDialog = new M4ASettingsDialog();
                }

                m4aSettingsDialog.ShowDialog(this);

                break;
            }

            case 7:
            {
                if (wmvSettingsDialog == null)
                {
                    wmvSettingsDialog = new WMVSettingsDialog(VideoEdit1);
                }

                wmvSettingsDialog.WMA = true;
                wmvSettingsDialog.ShowDialog(this);

                break;
            }

            case 8:
            {
                if (oggVorbisSettingsDialog == null)
                {
                    oggVorbisSettingsDialog = new OggVorbisSettingsDialog();
                }

                oggVorbisSettingsDialog.ShowDialog(this);

                break;
            }

            case 9:
            {
                if (flacSettingsDialog == null)
                {
                    flacSettingsDialog = new FLACSettingsDialog();
                }

                flacSettingsDialog.ShowDialog(this);

                break;
            }

            case 10:
            {
                if (speexSettingsDialog == null)
                {
                    speexSettingsDialog = new SpeexSettingsDialog();
                }

                speexSettingsDialog.ShowDialog(this);

                break;
            }

            case 11:
            {
                if (customFormatSettingsDialog == null)
                {
                    customFormatSettingsDialog = new CustomFormatSettingsDialog(VideoEdit1.Video_Codecs.ToArray(), VideoEdit1.Audio_Codecs.ToArray(), VideoEdit1.DirectShow_Filters.ToArray());
                }

                customFormatSettingsDialog.ShowDialog(this);

                break;
            }

            case 12:
            {
                if (webmSettingsDialog == null)
                {
                    webmSettingsDialog = new WebMSettingsDialog();
                }

                webmSettingsDialog.ShowDialog(this);

                break;
            }

            case 13:
            {
                if (ffmpegDLLSettingsDialog == null)
                {
                    ffmpegDLLSettingsDialog = new FFMPEGDLLSettingsDialog();
                }

                ffmpegDLLSettingsDialog.ShowDialog(this);

                break;
            }

            case 14:
            {
                if (ffmpegEXESettingsDialog == null)
                {
                    ffmpegEXESettingsDialog = new FFMPEGEXESettingsDialog();
                }

                ffmpegEXESettingsDialog.ShowDialog(this);

                break;
            }

            case 15:
            {
                if (mp4V10SettingsDialog == null)
                {
                    mp4V10SettingsDialog = new MP4v10SettingsDialog();
                }

                mp4V10SettingsDialog.ShowDialog(this);

                break;
            }

            case 16:
            {
                if (mp4v11SettingsDialog == null)
                {
                    mp4v11SettingsDialog = new MFSettingsDialog(MFSettingsDialogMode.MP4v11);
                }

                mp4v11SettingsDialog.ShowDialog(this);

                break;
            }

            case 17:
            {
                if (gifSettingsDialog == null)
                {
                    gifSettingsDialog = new GIFSettingsDialog();
                }

                gifSettingsDialog.ShowDialog(this);

                break;
            }

            case 18:
            {
                if (mp4V10SettingsDialog == null)
                {
                    mp4V10SettingsDialog = new MP4v10SettingsDialog();
                }

                mp4V10SettingsDialog.ShowDialog(this);

                break;
            }
            }
        }
Exemplo n.º 6
0
        private void btOutputConfigure_Click(object sender, EventArgs e)
        {
            switch (cbOutputFormat.SelectedIndex)
            {
            case 0:
            {
                if (aviSettingsDialog == null)
                {
                    aviSettingsDialog = new AVISettingsDialog(VideoCapture1.Video_Codecs.ToArray(), VideoCapture1.Audio_Codecs.ToArray());
                }

                aviSettingsDialog.ShowDialog(this);

                break;
            }

            case 1:
            {
                if (aviSettingsDialog == null)
                {
                    aviSettingsDialog = new AVISettingsDialog(VideoCapture1.Video_Codecs.ToArray(), VideoCapture1.Audio_Codecs.ToArray());
                }

                aviSettingsDialog.ShowDialog(this);

                break;
            }

            case 2:
            {
                if (wmvSettingsDialog == null)
                {
                    wmvSettingsDialog = new WMVSettingsDialog(VideoCapture1.Core);
                }

                wmvSettingsDialog.WMA = false;
                wmvSettingsDialog.ShowDialog(this);

                break;
            }

            case 3:
            {
                if (dvSettingsDialog == null)
                {
                    dvSettingsDialog = new DVSettingsDialog();
                }

                dvSettingsDialog.ShowDialog(this);

                break;
            }

            case 4:
            {
                if (pcmSettingsDialog == null)
                {
                    pcmSettingsDialog = new PCMSettingsDialog(VideoCapture1.Audio_Codecs.ToArray());
                }

                pcmSettingsDialog.ShowDialog(this);

                break;
            }

            case 5:
            {
                if (mp3SettingsDialog == null)
                {
                    mp3SettingsDialog = new MP3SettingsDialog();
                }

                mp3SettingsDialog.ShowDialog(this);

                break;
            }

            case 6:
            {
                if (m4aSettingsDialog == null)
                {
                    m4aSettingsDialog = new M4ASettingsDialog();
                }

                m4aSettingsDialog.ShowDialog(this);

                break;
            }

            case 7:
            {
                if (wmvSettingsDialog == null)
                {
                    wmvSettingsDialog = new WMVSettingsDialog(VideoCapture1.Core);
                }

                wmvSettingsDialog.WMA = true;
                wmvSettingsDialog.ShowDialog(this);

                break;
            }

            case 8:
            {
                if (flacSettingsDialog == null)
                {
                    flacSettingsDialog = new FLACSettingsDialog();
                }

                flacSettingsDialog.ShowDialog(this);

                break;
            }

            case 9:
            {
                if (oggVorbisSettingsDialog == null)
                {
                    oggVorbisSettingsDialog = new OggVorbisSettingsDialog();
                }

                oggVorbisSettingsDialog.ShowDialog(this);

                break;
            }

            case 10:
            {
                if (speexSettingsDialog == null)
                {
                    speexSettingsDialog = new SpeexSettingsDialog();
                }

                speexSettingsDialog.ShowDialog(this);

                break;
            }

            case 11:
            {
                if (customFormatSettingsDialog == null)
                {
                    customFormatSettingsDialog = new CustomFormatSettingsDialog(VideoCapture1.Video_Codecs.ToArray(), VideoCapture1.Audio_Codecs.ToArray(), VideoCapture1.DirectShow_Filters.ToArray());
                }

                customFormatSettingsDialog.ShowDialog(this);

                break;
            }

            case 12:
            case 13:
            case 14:
            case 15:
            {
                MessageBox.Show("No settings available for selected output format.");

                break;
            }

            case 16:
            case 17:
            case 18:
            {
                if (customFormatSettingsDialog == null)
                {
                    customFormatSettingsDialog = new CustomFormatSettingsDialog(VideoCapture1.Video_Codecs.ToArray(), VideoCapture1.Audio_Codecs.ToArray(), VideoCapture1.DirectShow_Filters.ToArray());
                }

                customFormatSettingsDialog.ShowDialog(this);

                break;
            }

            case 19:
            {
                if (webmSettingsDialog == null)
                {
                    webmSettingsDialog = new WebMSettingsDialog();
                }

                webmSettingsDialog.ShowDialog(this);

                break;
            }

            case 20:
            {
                if (ffmpegDLLSettingsDialog == null)
                {
                    ffmpegDLLSettingsDialog = new FFMPEGDLLSettingsDialog();
                }

                ffmpegDLLSettingsDialog.ShowDialog(this);

                break;
            }

            case 21:
            {
                if (ffmpegEXESettingsDialog == null)
                {
                    ffmpegEXESettingsDialog = new FFMPEGEXESettingsDialog();
                }

                ffmpegEXESettingsDialog.ShowDialog(this);

                break;
            }

            case 22:
            {
                if (mp4V10SettingsDialog == null)
                {
                    mp4V10SettingsDialog = new MP4v10SettingsDialog();
                }

                mp4V10SettingsDialog.ShowDialog(this);

                break;
            }

            case 23:
            {
                if (mp4v11SettingsDialog == null)
                {
                    mp4v11SettingsDialog = new MFSettingsDialog(MFSettingsDialogMode.MP4v11);
                }

                mp4v11SettingsDialog.ShowDialog(this);

                break;
            }

            case 24:
            {
                if (gifSettingsDialog == null)
                {
                    gifSettingsDialog = new GIFSettingsDialog();
                }

                gifSettingsDialog.ShowDialog(this);

                break;
            }

            case 25:
            {
                if (mp4V10SettingsDialog == null)
                {
                    mp4V10SettingsDialog = new MP4v10SettingsDialog();
                }

                mp4V10SettingsDialog.ShowDialog(this);

                break;
            }

            case 26:
            {
                if (mpegTSSettingsDialog == null)
                {
                    mpegTSSettingsDialog = new MFSettingsDialog(MFSettingsDialogMode.MPEGTS);
                }

                mpegTSSettingsDialog.ShowDialog(this);

                break;
            }

            case 27:
            {
                if (movSettingsDialog == null)
                {
                    movSettingsDialog = new MFSettingsDialog(MFSettingsDialogMode.MOV);
                }

                movSettingsDialog.ShowDialog(this);

                break;
            }
            }
        }
Exemplo n.º 7
0
        private void BtConfigure_Click(object sender, EventArgs e)
        {
            switch (cbOutputVideoFormat.SelectedIndex)
            {
            case 0:
            case 1:
            {
                if (aviSettingsDialog == null)
                {
                    aviSettingsDialog = new AVISettingsDialog(VideoEdit1);
                }

                aviSettingsDialog.ShowDialog(this);

                break;
            }

            case 2:
            {
                if (wmvSettingsDialog == null)
                {
                    wmvSettingsDialog = new WMVSettingsDialog(VideoEdit1);
                }

                wmvSettingsDialog.WMA = false;
                wmvSettingsDialog.ShowDialog(this);

                break;
            }

            case 3:
            {
                if (dvSettingsDialog == null)
                {
                    dvSettingsDialog = new DVSettingsDialog();
                }

                dvSettingsDialog.ShowDialog(this);

                break;
            }

            case 4:
            {
                if (pcmSettingsDialog == null)
                {
                    pcmSettingsDialog = new PCMSettingsDialog(VideoEdit1);
                }

                pcmSettingsDialog.ShowDialog(this);

                break;
            }

            case 5:
            {
                if (mp3SettingsDialog == null)
                {
                    mp3SettingsDialog = new MP3SettingsDialog();
                }

                mp3SettingsDialog.ShowDialog(this);

                break;
            }

            case 6:
            {
                if (m4aSettingsDialog == null)
                {
                    m4aSettingsDialog = new M4ASettingsDialog();
                }

                m4aSettingsDialog.ShowDialog(this);

                break;
            }

            case 7:
            {
                if (wmvSettingsDialog == null)
                {
                    wmvSettingsDialog = new WMVSettingsDialog(VideoEdit1);
                }

                wmvSettingsDialog.WMA = true;
                wmvSettingsDialog.ShowDialog(this);

                break;
            }

            case 8:
            {
                if (oggVorbisSettingsDialog == null)
                {
                    oggVorbisSettingsDialog = new OggVorbisSettingsDialog();
                }

                oggVorbisSettingsDialog.ShowDialog(this);

                break;
            }

            case 9:
            {
                if (flacSettingsDialog == null)
                {
                    flacSettingsDialog = new FLACSettingsDialog();
                }

                flacSettingsDialog.ShowDialog(this);

                break;
            }

            case 10:
            {
                if (speexSettingsDialog == null)
                {
                    speexSettingsDialog = new SpeexSettingsDialog();
                }

                speexSettingsDialog.ShowDialog(this);

                break;
            }

            case 11:
            {
                if (customFormatSettingsDialog == null)
                {
                    customFormatSettingsDialog = new CustomFormatSettingsDialog(VideoEdit1);
                }

                customFormatSettingsDialog.ShowDialog(this);

                break;
            }

            case 12:
            {
                if (webmSettingsDialog == null)
                {
                    webmSettingsDialog = new WebMSettingsDialog();
                }

                webmSettingsDialog.ShowDialog(this);

                break;
            }

            case 13:
            {
                if (ffmpegSettingsDialog == null)
                {
                    ffmpegSettingsDialog = new FFMPEGSettingsDialog();
                }

                ffmpegSettingsDialog.ShowDialog(this);

                break;
            }

            case 14:
            {
                if (ffmpegEXESettingsDialog == null)
                {
                    ffmpegEXESettingsDialog = new FFMPEGEXESettingsDialog();
                }

                ffmpegEXESettingsDialog.ShowDialog(this);

                break;
            }

            case 15:
            case 18:
            {
                if (this.mp4SettingsDialog == null)
                {
                    this.mp4SettingsDialog = new MP4SettingsDialog();
                }

                this.mp4SettingsDialog.ShowDialog(this);

                break;
            }

            case 16:
            {
                if (mp4HWSettingsDialog == null)
                {
                    mp4HWSettingsDialog = new HWEncodersOutputSettingsDialog(HWSettingsDialogMode.MP4);
                }

                mp4HWSettingsDialog.ShowDialog(this);

                break;
            }

            case 17:
            {
                if (gifSettingsDialog == null)
                {
                    gifSettingsDialog = new GIFSettingsDialog();
                }

                gifSettingsDialog.ShowDialog(this);

                break;
            }
            }
        }