private void LoadConfig() { AudioSetting c = Config.Current.AudioSetting; cbAudioDevice.Items.Clear(); if (Config.Current.OutputSetting.UseAudioFromCamera) { cboFuente.SelectedIndex = FUENTE_CAMARA_IP; } else { cboFuente.SelectedIndex = FUENTE_DISPOSITIVO; } WinHelper.LoadComboBoxFromDelimitedText(cbAudioDevice, this.VideoGrabber.AudioDevices); WinHelper.LoadComboBoxFromDelimitedText(cbAudioOutput, this.VideoGrabber.AudioRenderers); WinHelper.ComboBoxSelectByText(cbAudioDevice, c.AudioDevice); WinHelper.ComboBoxSelectByText(cbAudioFormat, c.AudioFormat); WinHelper.ComboBoxSelectByText(cbAudioLine, c.AudioDeviceLine); WinHelper.ComboBoxSelectByText(cbAudioOutput, c.AudioOutputDevice); chkAudioDeviceRendering.Checked = c.AudioDeviceRendering; }
private void LoadConfig() { OutputSetting c = Config.Current.OutputSetting; if (Properties.Settings.Default.Mp4Habilitado) { cboVideoFormat.Items.Add("mp4"); } chkModoNativo.Checked = c.Video.UseNativeFormat; cboVideoFormat.SelectedIndex = 0; for (int i = 0; i <= 30; i++) { cbFrames.Items.Add(i); } if (c.Video.WMV.VideoBitRate >= tbBitRates.Minimum && c.Video.WMV.VideoBitRate <= tbBitRates.Maximum) { tbBitRates.Value = c.Video.WMV.VideoBitRate; tbBitRates_Scroll(null, null); } if (c.Video.WMV.VideoQuality >= tbVideoQuality.Minimum && c.Video.WMV.VideoQuality <= tbVideoQuality.Maximum) { tbVideoQuality.Value = c.Video.WMV.VideoQuality; tbVideoQuality_Scroll(null, null); } WinHelper.LoadComboBoxFromDelimitedText(cbAudioCompressor, this.VideoGrabber.AudioCompressors); WinHelper.LoadComboBoxFromDelimitedText(cboVideoCompressor, this.VideoGrabber.VideoCompressors); WinHelper.LoadComboBoxFromDelimitedText(cboCompressorAudioMP4, this.VideoGrabber.AudioCompressors); WinHelper.ComboBoxSelectByText(cbAudioCompressor, c.AudioCompressor); WinHelper.ComboBoxSelectByText(cbFrames, c.Video.WMV.FramesRate.ToString()); WinHelper.ComboBoxSelectByText(cboVideoFormat, c.Video.Format); WinHelper.ComboBoxSelectByText(cboVideoCompressor, c.Video.Mp4.VideoCompressor); WinHelper.ComboBoxSelectByText(cboCompressorAudioMP4, c.Video.Mp4.AudioCompressor); cbVideoFormat_SelectedIndexChanged(null, null); chkModoNativo_CheckedChanged(null, null); }
public void LoadConfig() { StreamingSetting c = Config.Current.StreamingSetting; txtPuerto.Text = c.Port == 0 ? "" : c.Port.ToString(); WinHelper.ComboBoxSelectByText(cboUsuarios, c.MaxUsers.ToString()); if (c.Type == StreamingTypes.Audio) { rdAudio.Checked = true; } else if (c.Type == StreamingTypes.Video) { rdVideo.Checked = true; } else if (c.Type == StreamingTypes.AudioVideo) { rdAudioVideo.Checked = true; } }
private void LoadCamara(int camara) { VideoSetting setting; if (_camaraActual >= 0) { setting = _settings[_camaraActual]; SaveCamara(setting); } _camaraActual = camara; setting = _settings[camara]; bool habilitada = false; txtIpHost.Text = ""; txtIpUsuario.Text = ""; txtIpPassword.Text = ""; txtIpPort.Text = ""; txtLogPreview.Text = ""; SetUrl(""); cboPerfiles.Items.Clear(); cboPresetPosition.Items.Clear(); cbVideoDevice.SelectedIndex = -1; cbVideoSize.SelectedIndex = -1; cbVideoSubtype.SelectedIndex = -1; cbNorma.SelectedIndex = -1; btnPreviewStop_Click(null, null); habilitada = !string.IsNullOrEmpty(setting.VideoDevice); if (setting.VideoSource == VideoSources.IpCamera) { this.VideoSource = VidGrab.TVideoSource.vs_IPCamera; } else { this.VideoSource = VidGrab.TVideoSource.vs_VideoCaptureDevice; } if (this.VideoSource == VidGrab.TVideoSource.vs_IPCamera) { txtIpHost.Text = setting.Host; txtIpUsuario.Text = setting.Username; txtIpPassword.Text = setting.Password; if (setting.Port > 0) { txtIpPort.Text = setting.Port.ToString(); } else { txtIpPort.Text = ""; } SetUrl(setting.StreamUrl); bool result = true; if (!string.IsNullOrEmpty(setting.Profile)) { txtLogPreview.Text = "Buscando perfiles...."; Application.DoEvents(); result = LoadPerfiles(); txtLogPreview.Text = ""; Application.DoEvents(); WinHelper.ComboBoxSelectByValue(cboPerfiles, setting.Profile); } if (result) { if (!string.IsNullOrEmpty(setting.PresetStartupPosition)) { txtLogPreview.Text = "Buscando presets...."; Application.DoEvents(); LoadPresets(); txtLogPreview.Text = ""; Application.DoEvents(); WinHelper.ComboBoxSelectByValue(cboPresetPosition, setting.PresetStartupPosition); } } habilitada = !string.IsNullOrEmpty(setting.StreamUrl); } else { WinHelper.ComboBoxSelectByText(cbVideoDevice, setting.VideoDevice); WinHelper.ComboBoxSelectByText(cbVideoSize, setting.VideoSize); WinHelper.ComboBoxSelectByText(cbVideoSubtype, setting.VideoFormatSubType); WinHelper.ComboBoxSelectByText(cbNorma, setting.VideoNorma); habilitada = !string.IsNullOrEmpty(setting.VideoDevice); } chkHabilitada.Checked = habilitada; }