public bool EqualsExceptBitrate(EncoderSetup setup) { return(Type == setup.Type && Name == setup.Name && DirectXContext == setup.DirectXContext && // h264 needs this also so it is reinit during device failure SupportsEnforcingIFrame == setup.SupportsEnforcingIFrame && EncoderSpec.Equals(setup.EncoderSpec)); //EncoderBitrate && Options is missed conciusly }
public int Open(EncoderSetup setup) { lock (this) { EncoderConfig config = new EncoderConfig(); var res = EncoderContext_Open(_handle, Core.StringToBytes(setup.Name), Core.StringToBytes(setup.Options), ref setup.EncoderSpec, ref setup.EncoderBitrate, ref config.EncoderProps, ref config.CodecProps); _opened = res >= 0; _setup = setup; Config = config; return(res); } }