public int Open(DecoderSetup setup) { _dx?.RemoveRef(); _dx = setup.DirectXContext.AddRef(); _uploader?.Dispose(); _uploader = DirectXUploader.Create(_dx, setup.CodecProps.format, setup.CodecProps.width, setup.CodecProps.height); Config = new DecoderConfig(); return(0); }
internal void CleanInternalResources() { Texture2D?.Dispose(); Texture2D = null; _dx.RemoveRef(); _dx = null; }