NvdecDecoderContext.cs 393 B

123456789101112131415161718192021
  1. using Ryujinx.Graphics.Nvdec.H264;
  2. using System;
  3. namespace Ryujinx.Graphics.Nvdec
  4. {
  5. class NvdecDecoderContext : IDisposable
  6. {
  7. private Decoder _decoder;
  8. public Decoder GetDecoder()
  9. {
  10. return _decoder ??= new Decoder();
  11. }
  12. public void Dispose()
  13. {
  14. _decoder?.Dispose();
  15. _decoder = null;
  16. }
  17. }
  18. }