Esempio n. 1
0
 public DirectXResource(DirectXContext dx, Texture2D texture2D, bool cachable, string name)
 {
     _dx       = dx.AddRef();
     Texture2D = texture2D;
     Cachable  = cachable;
     DebugName = name;
 }
Esempio n. 2
0
 public FixedFrameConfig(int scaledWidth, int scaledHeight, int v, DirectXContext dx)
 {
     Width       = scaledWidth;
     Height      = scaledHeight;
     PixelFormat = v;
     Dx          = dx;
 }
Esempio n. 3
0
        internal void CleanInternalResources()
        {
            Texture2D?.Dispose();
            Texture2D = null;

            _dx.RemoveRef();
            _dx = null;
        }
Esempio n. 4
0
 public void Dispose()
 {
     _currentFrame?.Dispose();
     _dx?.RemoveRef();
     _uploader?.Dispose();
     _uploader     = null;
     _currentFrame = null;
     _dx           = null;
 }
Esempio n. 5
0
 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);
 }
Esempio n. 6
0
 public DecoderSetup(string type, CodecProperties codecProps, DirectXContext directXContext)
 {
     Type           = type;
     CodecProps     = codecProps;
     DirectXContext = directXContext;
 }