Ejemplo n.º 1
0
        public OneClickWindow(MainForm mainForm, JobUtil jobUtil, VideoEncoderProvider vProv, AudioEncoderProvider aProv)
        {
            this.mainForm            = mainForm;
            vUtil                    = new VideoUtil(mainForm);
            this.muxProvider         = mainForm.MuxProvider;
            acceptableContainerTypes = muxProvider.GetSupportedContainers().ToArray();

            InitializeComponent();

            initTabs();

            videoProfile.Manager = mainForm.Profiles;
            initAudioHandler();
            avsProfile.Manager = mainForm.Profiles;
            initOneClickHandler();

            audioTrack1.StandardItems = audioTrack2.StandardItems = new object[] { "None" };
            audioTrack1.SelectedIndex = audioTrack2.SelectedIndex = 0;

            //if containerFormat has not yet been set by the oneclick profile, add supported containers
            if (containerFormat.Items.Count == 0)
            {
                containerFormat.Items.AddRange(muxProvider.GetSupportedContainers().ToArray());
                this.containerFormat.SelectedIndex = 0;
            }

            showAdvancedOptions_CheckedChanged(null, null);
        }