aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpopcornmix <popcornmix@gmail.com>2014-07-29 21:54:32 +0100
committerpopcornmix <popcornmix@gmail.com>2014-09-03 13:38:47 +0100
commitf03c3add8bb0e962cbdc2ad10aee915db669d11d (patch)
treed38a5ed84e306c3f773af197e298b4ec21cba3a0
parent8fa11d578e510c14dd52bcc81aa0e27e02480082 (diff)
[players] Allow choice of omxplayer through acceleration settings
-rwxr-xr-xlanguage/English/strings.po13
-rw-r--r--system/settings/settings.xml9
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayer.cpp4
-rw-r--r--xbmc/settings/SettingConditions.cpp3
4 files changed, 28 insertions, 1 deletions
diff --git a/language/English/strings.po b/language/English/strings.po
index 1ff8f1313a..fea6e0837b 100755
--- a/language/English/strings.po
+++ b/language/English/strings.po
@@ -6196,7 +6196,18 @@ msgctxt "#13457"
msgid "Prefer VAAPI render method"
msgstr ""
-#empty strings from id 13458 to 13499
+#: system/settings/settings.xml
+msgctxt "#13458"
+msgid "Allow hardware acceleration (OMXPlayer)"
+msgstr ""
+
+#. Description of setting "Videos -> Playback -> Allow hardware acceleration (OMXPlayer)" with label #13457
+#: system/settings/settings.xml
+msgctxt "#13459"
+msgid "Use OMXPlayer for decoding of video files."
+msgstr ""
+
+#empty strings from id 13460 to 13499
#: system/settings/settings.xml
msgctxt "#13500"
diff --git a/system/settings/settings.xml b/system/settings/settings.xml
index f604b30e3c..af05fb7ddc 100644
--- a/system/settings/settings.xml
+++ b/system/settings/settings.xml
@@ -752,6 +752,15 @@
<default>true</default>
<control type="toggle" />
</setting>
+ <setting id="videoplayer.useomxplayer" type="boolean" label="13458" help="13459">
+ <requirement>HAS_OMXPLAYER</requirement>
+ <dependencies>
+ <dependency type="enable" setting="videoplayer.decodingmethod" operator="is">1</dependency>
+ </dependencies>
+ <level>2</level>
+ <default>true</default>
+ <control type="toggle" />
+ </setting>
<setting id="videoplayer.useomx" type="boolean" label="13430" help="36161">
<requirement>HAVE_LIBOPENMAX</requirement>
<dependencies>
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp
index ab8d1cca83..8f41c763fc 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp
@@ -562,7 +562,11 @@ CDVDPlayer::CDVDPlayer(IPlayerCallback& callback)
m_OmxPlayerState.bOmxSentEOFs = false;
m_OmxPlayerState.threshold = 0.2f;
m_OmxPlayerState.current_deinterlace = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode;
+#ifdef HAS_OMXPLAYER
+ m_omxplayer_mode = CSettings::Get().GetBool("videoplayer.useomxplayer");
+#else
m_omxplayer_mode = false;
+#endif
CreatePlayers();
}
diff --git a/xbmc/settings/SettingConditions.cpp b/xbmc/settings/SettingConditions.cpp
index 7b615127d1..c1cdfc1c0f 100644
--- a/xbmc/settings/SettingConditions.cpp
+++ b/xbmc/settings/SettingConditions.cpp
@@ -227,6 +227,9 @@ void CSettingConditions::Initialize()
#ifdef HAVE_LIBOPENMAX
m_simpleConditions.insert("have_libopenmax");
#endif
+#ifdef HAS_OMXPLAYER
+ m_simpleConditions.insert("has_omxplayer");
+#endif
#ifdef HAVE_LIBVA
m_simpleConditions.insert("have_libva");
#endif