1
0
mirror of https://git.sr.ht/~thestr4ng3r/chiaki synced 2025-03-12 05:25:23 -07:00

Expose videotoolbox hardware decoder ()

This commit is contained in:
Kaiwen Xu 2020-06-27 03:42:26 -07:00 committed by GitHub
parent 919d3b1c3b
commit 9c91843d98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

@ -38,6 +38,7 @@ typedef enum {
HW_DECODE_NONE = 0,
HW_DECODE_VAAPI = 1,
HW_DECODE_VDPAU = 2,
HW_DECODE_VIDEOTOOLBOX = 3,
} HardwareDecodeEngine;
@ -45,6 +46,7 @@ static const QMap<HardwareDecodeEngine, const char *> hardware_decode_engine_nam
{ HW_DECODE_NONE, "none"},
{ HW_DECODE_VAAPI, "vaapi"},
{ HW_DECODE_VDPAU, "vdpau"},
{ HW_DECODE_VIDEOTOOLBOX, "videotoolbox"},
};
class VideoDecoderException: public Exception

@ -97,7 +97,8 @@ unsigned int Settings::GetAudioBufferSizeRaw() const
static const QMap<HardwareDecodeEngine, QString> hw_decode_engine_values = {
{ HW_DECODE_NONE, "none" },
{ HW_DECODE_VAAPI, "vaapi" },
{ HW_DECODE_VDPAU, "vdpau" }
{ HW_DECODE_VDPAU, "vdpau" },
{ HW_DECODE_VIDEOTOOLBOX, "videotoolbox" }
};
static const HardwareDecodeEngine hw_decode_engine_default = HW_DECODE_NONE;

@ -158,7 +158,8 @@ SettingsDialog::SettingsDialog(Settings *settings, QWidget *parent) : QDialog(pa
hardware_decode_combo_box = new QComboBox(this);
static const QList<QPair<HardwareDecodeEngine, const char *>> hardware_decode_engines = {
{ HW_DECODE_NONE, "none"},
{ HW_DECODE_VAAPI, "vaapi"}
{ HW_DECODE_VAAPI, "vaapi"},
{ HW_DECODE_VIDEOTOOLBOX, "videotoolbox"}
};
auto current_hardware_decode_engine = settings->GetHardwareDecodeEngine();
for(const auto &p : hardware_decode_engines)