aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Rusak <lorusak@gmail.com>2018-05-04 14:03:08 -0700
committerLukas Rusak <lorusak@gmail.com>2018-05-05 13:11:34 -0700
commit309fce5ab5747e7831bcf67ea60e6e805a5c764a (patch)
tree14362ddf0b20dd657efb0d75124946930e3228d8
parent390c1d4d498d53f6bb779b339472489b57f2df55 (diff)
VideoPlayer: add setting for using VAAPI VP9
-rw-r--r--addons/resource.language.en_gb/resources/strings.po11
-rw-r--r--system/settings/linux.xml12
-rw-r--r--xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp2
-rw-r--r--xbmc/settings/Settings.cpp1
-rw-r--r--xbmc/settings/Settings.h1
5 files changed, 26 insertions, 1 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index 5367b6b3e5..d505d3a365 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -7132,7 +7132,16 @@ msgctxt "#13454"
msgid "Enable this option to use hardware acceleration for the VP8 codec. If disabled the CPU will be used instead."
msgstr ""
-#empty strings from id 13455 to 13456
+#: system/settings/settings.xml
+msgctxt "#13455"
+msgid "Use VP9 VAAPI"
+msgstr ""
+
+#. Description of setting with label #13453 "Use VP9 VAAPI"
+#: system/settings/settings.xml
+msgctxt "#13456"
+msgid "Enable this option to use hardware acceleration for the VP9 codec. If disabled the CPU will be used instead."
+msgstr ""
#. Option for video related setting #13454: sw filter
#: system/settings/settings.xml
diff --git a/system/settings/linux.xml b/system/settings/linux.xml
index 1a017272d1..82b2f6e534 100644
--- a/system/settings/linux.xml
+++ b/system/settings/linux.xml
@@ -112,6 +112,18 @@
<default>true</default>
<control type="toggle" />
</setting>
+ <setting id="videoplayer.usevaapivp9" type="boolean" parent="videoplayer.usevaapi" label="13455" help="13456">
+ <requirement>HAVE_LIBVA</requirement>
+ <visible>false</visible>
+ <dependencies>
+ <dependency type="enable">
+ <condition setting="videoplayer.usevaapi" operator="is">true</condition>
+ </dependency>
+ </dependencies>
+ <level>3</level>
+ <default>true</default>
+ <control type="toggle" />
+ </setting>
<setting id="videoplayer.prefervaapirender" type="boolean" parent="videoplayer.usevaapi" label="13457" help="36433">
<requirement>HAVE_LIBVA</requirement>
<visible>false</visible>
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
index 9b960e6e1c..75cf67cf08 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
@@ -506,6 +506,7 @@ bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum A
{ AV_CODEC_ID_VC1, CSettings::SETTING_VIDEOPLAYER_USEVAAPIVC1 },
{ AV_CODEC_ID_MPEG2VIDEO, CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG2 },
{ AV_CODEC_ID_VP8, CSettings::SETTING_VIDEOPLAYER_USEVAAPIVP8 },
+ { AV_CODEC_ID_VP9, CSettings::SETTING_VIDEOPLAYER_USEVAAPIVP9 },
};
auto entry = settings_map.find(avctx->codec_id);
@@ -1206,6 +1207,7 @@ void CDecoder::Register(IVaapiWinSystem *winSystem, bool deepColor)
CServiceBroker::GetSettings().GetSetting(CSettings::SETTING_VIDEOPLAYER_USEVAAPIVC1)->SetVisible(true);
CServiceBroker::GetSettings().GetSetting(CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG2)->SetVisible(true);
CServiceBroker::GetSettings().GetSetting(CSettings::SETTING_VIDEOPLAYER_USEVAAPIVP8)->SetVisible(true);
+ CServiceBroker::GetSettings().GetSetting(CSettings::SETTING_VIDEOPLAYER_USEVAAPIVP9)->SetVisible(true);
}
//-----------------------------------------------------------------------------
diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp
index 1fa1b3daf8..71fcef3493 100644
--- a/xbmc/settings/Settings.cpp
+++ b/xbmc/settings/Settings.cpp
@@ -168,6 +168,7 @@ const std::string CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG2 = "videoplayer.us
const std::string CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG4 = "videoplayer.usevaapimpeg4";
const std::string CSettings::SETTING_VIDEOPLAYER_USEVAAPIVC1 = "videoplayer.usevaapivc1";
const std::string CSettings::SETTING_VIDEOPLAYER_USEVAAPIVP8 = "videoplayer.usevaapivp8";
+const std::string CSettings::SETTING_VIDEOPLAYER_USEVAAPIVP9 = "videoplayer.usevaapivp9";
const std::string CSettings::SETTING_VIDEOPLAYER_PREFERVAAPIRENDER = "videoplayer.prefervaapirender";
const std::string CSettings::SETTING_VIDEOPLAYER_USEDXVA2 = "videoplayer.usedxva2";
const std::string CSettings::SETTING_VIDEOPLAYER_USEOMXPLAYER = "videoplayer.useomxplayer";
diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h
index 6d4f20a3f2..bdb32fc4f7 100644
--- a/xbmc/settings/Settings.h
+++ b/xbmc/settings/Settings.h
@@ -122,6 +122,7 @@ public:
static const std::string SETTING_VIDEOPLAYER_USEVAAPIMPEG4;
static const std::string SETTING_VIDEOPLAYER_USEVAAPIVC1;
static const std::string SETTING_VIDEOPLAYER_USEVAAPIVP8;
+ static const std::string SETTING_VIDEOPLAYER_USEVAAPIVP9;
static const std::string SETTING_VIDEOPLAYER_PREFERVAAPIRENDER;
static const std::string SETTING_VIDEOPLAYER_USEDXVA2;
static const std::string SETTING_VIDEOPLAYER_USEOMXPLAYER;