Skip to content

Commit

Permalink
[players] Allow choice of omxplayer through acceleration settings
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Sep 3, 2014
1 parent 8fa11d5 commit f03c3ad
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
13 changes: 12 additions & 1 deletion language/English/strings.po
Expand Up @@ -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"
Expand Down
9 changes: 9 additions & 0 deletions system/settings/settings.xml
Expand Up @@ -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>
Expand Down
4 changes: 4 additions & 0 deletions xbmc/cores/dvdplayer/DVDPlayer.cpp
Expand Up @@ -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();
}
Expand Down
3 changes: 3 additions & 0 deletions xbmc/settings/SettingConditions.cpp
Expand Up @@ -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
Expand Down

0 comments on commit f03c3ad

Please sign in to comment.