mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-03-12 05:25:23 -07:00
Expose videotoolbox hardware decoder (#261)
This commit is contained in:
parent
919d3b1c3b
commit
9c91843d98
gui
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user