public DirectXResource(DirectXContext dx, Texture2D texture2D, bool cachable, string name) { _dx = dx.AddRef(); Texture2D = texture2D; Cachable = cachable; DebugName = name; }
public FixedFrameConfig(int scaledWidth, int scaledHeight, int v, DirectXContext dx) { Width = scaledWidth; Height = scaledHeight; PixelFormat = v; Dx = dx; }
internal void CleanInternalResources() { Texture2D?.Dispose(); Texture2D = null; _dx.RemoveRef(); _dx = null; }
public void Dispose() { _currentFrame?.Dispose(); _dx?.RemoveRef(); _uploader?.Dispose(); _uploader = null; _currentFrame = null; _dx = null; }
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); }
public DecoderSetup(string type, CodecProperties codecProps, DirectXContext directXContext) { Type = type; CodecProps = codecProps; DirectXContext = directXContext; }