Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Expose videotoolbox hardware decoder #261

Merged
merged 2 commits into from
Jun 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions gui/include/videodecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ typedef enum {
HW_DECODE_NONE = 0,
HW_DECODE_VAAPI = 1,
HW_DECODE_VDPAU = 2,
HW_DECODE_VIDEOTOOLBOX = 3,
} HardwareDecodeEngine;


static const QMap<HardwareDecodeEngine, const char *> hardware_decode_engine_names = {
{ HW_DECODE_NONE, "none"},
{ HW_DECODE_VAAPI, "vaapi"},
{ HW_DECODE_VDPAU, "vdpau"},
{ HW_DECODE_VIDEOTOOLBOX, "videotoolbox"},
};

class VideoDecoderException: public Exception
Expand Down
3 changes: 2 additions & 1 deletion gui/src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion gui/src/settingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down