mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-19 21:13:12 -07:00
Add CUDA Hardware Decoder (#335)
This commit is contained in:
parent
e42110ce56
commit
1b05f07132
3 changed files with 6 additions and 2 deletions
|
@ -39,6 +39,7 @@ typedef enum {
|
|||
HW_DECODE_VAAPI = 1,
|
||||
HW_DECODE_VDPAU = 2,
|
||||
HW_DECODE_VIDEOTOOLBOX = 3,
|
||||
HW_DECODE_CUDA = 4,
|
||||
} HardwareDecodeEngine;
|
||||
|
||||
|
||||
|
@ -47,6 +48,7 @@ static const QMap<HardwareDecodeEngine, const char *> hardware_decode_engine_nam
|
|||
{ HW_DECODE_VAAPI, "vaapi"},
|
||||
{ HW_DECODE_VDPAU, "vdpau"},
|
||||
{ HW_DECODE_VIDEOTOOLBOX, "videotoolbox"},
|
||||
{ HW_DECODE_CUDA, "cuda"},
|
||||
};
|
||||
|
||||
class VideoDecoderException: public Exception
|
||||
|
|
|
@ -98,7 +98,8 @@ static const QMap<HardwareDecodeEngine, QString> hw_decode_engine_values = {
|
|||
{ HW_DECODE_NONE, "none" },
|
||||
{ HW_DECODE_VAAPI, "vaapi" },
|
||||
{ HW_DECODE_VDPAU, "vdpau" },
|
||||
{ HW_DECODE_VIDEOTOOLBOX, "videotoolbox" }
|
||||
{ HW_DECODE_VIDEOTOOLBOX, "videotoolbox" },
|
||||
{ HW_DECODE_CUDA, "cuda" }
|
||||
};
|
||||
|
||||
static const HardwareDecodeEngine hw_decode_engine_default = HW_DECODE_NONE;
|
||||
|
|
|
@ -159,7 +159,8 @@ SettingsDialog::SettingsDialog(Settings *settings, QWidget *parent) : QDialog(pa
|
|||
static const QList<QPair<HardwareDecodeEngine, const char *>> hardware_decode_engines = {
|
||||
{ HW_DECODE_NONE, "none"},
|
||||
{ HW_DECODE_VAAPI, "vaapi"},
|
||||
{ HW_DECODE_VIDEOTOOLBOX, "videotoolbox"}
|
||||
{ HW_DECODE_VIDEOTOOLBOX, "videotoolbox"},
|
||||
{ HW_DECODE_CUDA, "cuda"}
|
||||
};
|
||||
auto current_hardware_decode_engine = settings->GetHardwareDecodeEngine();
|
||||
for(const auto &p : hardware_decode_engines)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue