private void ok_btn_Click(object sender, RoutedEventArgs e) { if (configs != null) { // Take the video source from the info_config textbox try { VideoEncoder2Configuration vec = JsonConvert.DeserializeObject <VideoEncoder2Configuration>(info_config.Text); media.SetVideoEncoderConfiguration(vec); } catch (Exception ex) { error_log.Visibility = Visibility.Visible; error_log.Content = "Error in the JSON format!"; error_log.Foreground = new SolidColorBrush(Colors.Red); return; } ConfigurationRef[] config = { new ConfigurationRef() }; config[0].Type = "VideoEncoder"; config[0].Token = configs[selectedIndex].token; media.AddConfiguration(profileToken, profileName, config); this.DialogResult = true; } else { this.DialogResult = false; } this.Close(); }
public override void SetVideoEncoderConfiguration(VideoEncoder2Configuration Configuration) { throw new NotImplementedException(); }