Esempio n. 1
0
        public frm_AudioConfig()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();
            btn_Previous.Enabled = false;
            btn_Finish.Enabled   = false;

            // Create a WMEncoder object.
            WMEncoder Encoder = new WMEncoder();



            // Retrieve source and device plug-in info manager objects from WMEncoder.
            IWMEncSourcePluginInfoManager        SrcPlugMgr = Encoder.SourcePluginInfoManager;
            IWMEncDeviceControlPluginInfoManager DCPlugMgr  = Encoder.DeviceControlPluginInfoManager;

            // Loop through all the audio and video devices on the system.
            for (int i = 0; i < SrcPlugMgr.Count; i++)
            {
                // Set the IWMEncPluginInfo object to the current plug-in.
                PlugInfo = SrcPlugMgr.Item(i);

                // Find the device plug-ins that support resources.
                if (PlugInfo.SchemeType == "DEVICE" && PlugInfo.Resources == true)
                {
                    // Loop through the resources in the current plug-in.
                    for (int j = 0; j < PlugInfo.Count; j++)
                    {
                        // Add audio resources to the cboAudioSource combo box.
                        if (PlugInfo.MediaType == WMENC_SOURCE_TYPE.WMENC_AUDIO)
                        {
                            cboAudioSource.Items.Add(PlugInfo.Item(j));
                        }
                    }
                }
            }

            cboAudioSource.SelectedIndex = 0;

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
Esempio n. 2
0
        public frm_AudioConfig()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();
            btn_Previous.Enabled=false;
            btn_Finish.Enabled=false;

            // Create a WMEncoder object.
            WMEncoder Encoder = new WMEncoder();

            // Retrieve source and device plug-in info manager objects from WMEncoder.
            IWMEncSourcePluginInfoManager SrcPlugMgr = Encoder.SourcePluginInfoManager;
            IWMEncDeviceControlPluginInfoManager DCPlugMgr = Encoder.DeviceControlPluginInfoManager;

            // Loop through all the audio and video devices on the system.
            for (int i = 0; i < SrcPlugMgr.Count; i++)
            {
                // Set the IWMEncPluginInfo object to the current plug-in.
                PlugInfo = SrcPlugMgr.Item(i);

                // Find the device plug-ins that support resources.
                if (PlugInfo.SchemeType == "DEVICE" && PlugInfo.Resources == true)
                {
                    // Loop through the resources in the current plug-in.
                    for (int j = 0; j<PlugInfo.Count; j++)
                    {
                        // Add audio resources to the cboAudioSource combo box.
                        if (PlugInfo.MediaType == WMENC_SOURCE_TYPE.WMENC_AUDIO)
                            cboAudioSource.Items.Add(PlugInfo.Item(j));

                    }
                }
            }

            cboAudioSource.SelectedIndex=0;

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }