public CodecDefinition(IFluentTarget rootTarget, ResourceDefinition resourceDefinition, Type codecType, object configuration) { _rootTarget = rootTarget; ResourceDefinition = resourceDefinition; _codecRegistration = new CodecModel(codecType, configuration); ResourceDefinition.Resource.Codecs.Add(_codecRegistration); }
private void LoadSettings() { var settings = Settings.Container; string strCodec = settings.Codec; string strInputDevice = settings.InputDevice; var codecs = comboBoxCodecs.Items.OfType <CodecModel>(); if (codecs.Any()) { CodecModel selectCodecItem = null; if (!string.IsNullOrWhiteSpace(strCodec)) { selectCodecItem = codecs.Where(m => m.Text == strCodec).FirstOrDefault(); } SelectedCodec = selectCodecItem ?? codecs.First(); this.codec = SelectedCodec.Codec; } if (!string.IsNullOrWhiteSpace(strInputDevice)) { var selectInputDevice = InputList.Where(m => m.ToString() == strInputDevice).FirstOrDefault(); if (selectInputDevice != null) { SelectedInputSource = selectInputDevice; } } else { SelectedInputSource = InputList.FirstOrDefault(); if (comboInputGroups.Items.Count > 0) { comboInputGroups.SelectedIndex = 0; } } BufferTargetMs = settings.InputLatency; UseWaveEvent = settings.UseWaveInEvent; }
public CodecRegistration(Type codecType, object resourceKey, bool isStrictRegistration, MediaType mediaType, ICollection <string> mediaTypeExtensions, object codecConfiguration, bool isSystem, CodecModel codecModel) : this(codecType, resourceKey, isStrictRegistration, mediaType, mediaTypeExtensions, codecConfiguration, isSystem) { CodecModel = codecModel; IsBuffered = codecModel?.IsBuffered ?? false; }
public CodecDefinition(ResourceDefinition resourceDefinition, Type codecType, object configuration) { ResourceDefinition = resourceDefinition; _codecRegistration = new CodecModel(codecType, configuration); ResourceDefinition.Registration.Codecs.Add(_codecRegistration); }