aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Nvdec/NvdecDecoderContext.cs
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2021-10-12 22:55:57 +0200
committerGitHub <noreply@github.com>2021-10-12 22:55:57 +0200
commitd1604aa762a3f669a3fecff0a30b7360399954bc (patch)
tree1996eec4b3937354aedc4d31b5b7b931ae4e321b /Ryujinx.Graphics.Nvdec/NvdecDecoderContext.cs
parenta7109c767bdc014327b574012794156c92174495 (diff)
nvdec: Adding Vp8 codec support (#2707)
* 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
Diffstat (limited to 'Ryujinx.Graphics.Nvdec/NvdecDecoderContext.cs')
-rw-r--r--Ryujinx.Graphics.Nvdec/NvdecDecoderContext.cs20
1 files changed, 14 insertions, 6 deletions
diff --git a/Ryujinx.Graphics.Nvdec/NvdecDecoderContext.cs b/Ryujinx.Graphics.Nvdec/NvdecDecoderContext.cs
index 90da0bee..54934bc5 100644
--- a/Ryujinx.Graphics.Nvdec/NvdecDecoderContext.cs
+++ b/Ryujinx.Graphics.Nvdec/NvdecDecoderContext.cs
@@ -1,21 +1,29 @@
-using Ryujinx.Graphics.Nvdec.H264;
using System;
namespace Ryujinx.Graphics.Nvdec
{
class NvdecDecoderContext : IDisposable
{
- private Decoder _decoder;
+ private FFmpeg.H264.Decoder _h264Decoder;
+ private FFmpeg.Vp8.Decoder _vp8Decoder;
- public Decoder GetDecoder()
+ public FFmpeg.H264.Decoder GetH264Decoder()
{
- return _decoder ??= new Decoder();
+ return _h264Decoder ??= new FFmpeg.H264.Decoder();
+ }
+
+ public FFmpeg.Vp8.Decoder GetVp8Decoder()
+ {
+ return _vp8Decoder ??= new FFmpeg.Vp8.Decoder();
}
public void Dispose()
{
- _decoder?.Dispose();
- _decoder = null;
+ _h264Decoder?.Dispose();
+ _h264Decoder = null;
+
+ _vp8Decoder?.Dispose();
+ _vp8Decoder = null;
}
}
} \ No newline at end of file