From 53afcac7990dfb52f770f69a778b15cfd4a49379 Mon Sep 17 00:00:00 2001 From: Kaiwen Xu Date: Sun, 21 Jun 2020 13:29:04 -0700 Subject: [PATCH 1/2] Expose videotoolbox decoder --- gui/include/videodecoder.h | 2 ++ gui/src/settings.cpp | 3 ++- gui/src/settingsdialog.cpp | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/include/videodecoder.h b/gui/include/videodecoder.h index 84ccf0ad..ea131135 100644 --- a/gui/include/videodecoder.h +++ b/gui/include/videodecoder.h @@ -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 hardware_decode_engine_nam { HW_DECODE_NONE, "none"}, { HW_DECODE_VAAPI, "vaapi"}, { HW_DECODE_VDPAU, "vdpau"}, + { HW_DECODE_VIDEOTOOLBOX, "videotoolbox"}, }; class VideoDecoderException: public Exception diff --git a/gui/src/settings.cpp b/gui/src/settings.cpp index 90a5c03d..8ddcd792 100644 --- a/gui/src/settings.cpp +++ b/gui/src/settings.cpp @@ -97,7 +97,8 @@ unsigned int Settings::GetAudioBufferSizeRaw() const static const QMap 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; diff --git a/gui/src/settingsdialog.cpp b/gui/src/settingsdialog.cpp index 3b0892ae..8f284501 100644 --- a/gui/src/settingsdialog.cpp +++ b/gui/src/settingsdialog.cpp @@ -158,7 +158,8 @@ SettingsDialog::SettingsDialog(Settings *settings, QWidget *parent) : QDialog(pa hardware_decode_combo_box = new QComboBox(this); static const QList> 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) From 42b793128d166ef959f4878a14292a176841ee6d Mon Sep 17 00:00:00 2001 From: Kaiwen Xu Date: Sun, 21 Jun 2020 13:32:15 -0700 Subject: [PATCH 2/2] space to tab. --- gui/include/videodecoder.h | 2 +- gui/src/settings.cpp | 2 +- gui/src/settingsdialog.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/include/videodecoder.h b/gui/include/videodecoder.h index ea131135..9fa1d5ba 100644 --- a/gui/include/videodecoder.h +++ b/gui/include/videodecoder.h @@ -46,7 +46,7 @@ static const QMap hardware_decode_engine_nam { HW_DECODE_NONE, "none"}, { HW_DECODE_VAAPI, "vaapi"}, { HW_DECODE_VDPAU, "vdpau"}, - { HW_DECODE_VIDEOTOOLBOX, "videotoolbox"}, + { HW_DECODE_VIDEOTOOLBOX, "videotoolbox"}, }; class VideoDecoderException: public Exception diff --git a/gui/src/settings.cpp b/gui/src/settings.cpp index 8ddcd792..8b23f550 100644 --- a/gui/src/settings.cpp +++ b/gui/src/settings.cpp @@ -98,7 +98,7 @@ static const QMap hw_decode_engine_values = { { HW_DECODE_NONE, "none" }, { HW_DECODE_VAAPI, "vaapi" }, { HW_DECODE_VDPAU, "vdpau" }, - { HW_DECODE_VIDEOTOOLBOX, "videotoolbox" } + { HW_DECODE_VIDEOTOOLBOX, "videotoolbox" } }; static const HardwareDecodeEngine hw_decode_engine_default = HW_DECODE_NONE; diff --git a/gui/src/settingsdialog.cpp b/gui/src/settingsdialog.cpp index 8f284501..04352bc4 100644 --- a/gui/src/settingsdialog.cpp +++ b/gui/src/settingsdialog.cpp @@ -159,7 +159,7 @@ SettingsDialog::SettingsDialog(Settings *settings, QWidget *parent) : QDialog(pa static const QList> hardware_decode_engines = { { HW_DECODE_NONE, "none"}, { HW_DECODE_VAAPI, "vaapi"}, - { HW_DECODE_VIDEOTOOLBOX, "videotoolbox"} + { HW_DECODE_VIDEOTOOLBOX, "videotoolbox"} }; auto current_hardware_decode_engine = settings->GetHardwareDecodeEngine(); for(const auto &p : hardware_decode_engines)