mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-05 02:52:02 +00:00
d1604aa762
* first try * second try * working update * Final impl * Fixes nits * Fix everything * remove leftover * Update FFmpegContext.cs * Update Surface.cs * Addresses gdkchan feedback * bool not byte * Addresses gdkchan feedback
29 lines
No EOL
663 B
C#
29 lines
No EOL
663 B
C#
using System;
|
|
|
|
namespace Ryujinx.Graphics.Nvdec
|
|
{
|
|
class NvdecDecoderContext : IDisposable
|
|
{
|
|
private FFmpeg.H264.Decoder _h264Decoder;
|
|
private FFmpeg.Vp8.Decoder _vp8Decoder;
|
|
|
|
public FFmpeg.H264.Decoder GetH264Decoder()
|
|
{
|
|
return _h264Decoder ??= new FFmpeg.H264.Decoder();
|
|
}
|
|
|
|
public FFmpeg.Vp8.Decoder GetVp8Decoder()
|
|
{
|
|
return _vp8Decoder ??= new FFmpeg.Vp8.Decoder();
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
_h264Decoder?.Dispose();
|
|
_h264Decoder = null;
|
|
|
|
_vp8Decoder?.Dispose();
|
|
_vp8Decoder = null;
|
|
}
|
|
}
|
|
} |