diff options
author | Rainer Hochecker <fernetmenta@online.de> | 2015-02-04 12:26:09 +0100 |
---|---|---|
committer | Rainer Hochecker <fernetmenta@online.de> | 2015-02-07 09:10:02 +0100 |
commit | 5fd5072d1f327a82045d97c77445f4749da41c3e (patch) | |
tree | c0db9d50d1f47ef9e449daa5c7506b32724c18f9 | |
parent | 2b0d6d88f91cca101cf2035bb5ea219be30716da (diff) |
[pvr] - set framerate if not set by demuxer
-rwxr-xr-x | language/English/strings.po | 21 | ||||
-rw-r--r-- | system/settings/settings.xml | 14 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDPlayer.cpp | 20 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDStreamInfo.h | 2 |
4 files changed, 52 insertions, 5 deletions
diff --git a/language/English/strings.po b/language/English/strings.po index 0c4d57dfdc..fa23480c8d 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -872,7 +872,15 @@ msgctxt "#210" msgid "Previous" msgstr "" -#empty strings from id 211 to 212 +#: system/settings/settings.xml +msgctxt "#211" +msgid "50 Hz" +msgstr "" + +#: system/settings/settings.xml +msgctxt "#212" +msgid "59.94 Hz" +msgstr "" msgctxt "#213" msgid "Calibrate user interface..." @@ -8035,7 +8043,10 @@ msgctxt "#19107" msgid "at" msgstr "" -#empty string with id 19108 +#: system/settings/settings.xml +msgctxt "#19108" +msgid "Framerate (fallback)" +msgstr "" msgctxt "#19109" msgid "Couldn't save timer. Check the log for details." @@ -14615,7 +14626,11 @@ msgctxt "#36260" msgid "No info available yet." msgstr "" -#empty string with id 36261 +#. Description of setting "LiveTV -> Playback -> Refreshrate" with label #19108 +#: system/settings/settings.xml +msgctxt "#36261" +msgid "If enabled, this framerate is used for streams we were not able to detect fps." +msgstr "" #. Description of setting "Music -> Library -> Export music library" with label #20196 #: system/settings/settings.xml diff --git a/system/settings/settings.xml b/system/settings/settings.xml index 2d3ebd82bb..42ebe437a4 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -1311,6 +1311,20 @@ </control> </setting> </group> + <group id="3"> + <setting id="pvrplayback.fps" type="integer" label="19108" help="36261"> + <level>0</level> + <default>0</default> + <constraints> + <options> + <option label="351">0</option> <!-- OFF --> + <option label="211">1</option> <!-- 50Hz --> + <option label="212">2</option> <!-- 59.94Hz --> + </options> + </constraints> + <control type="spinner" format="string" /> + </setting> + </group> </category> <category id="pvrrecord" label="19043" help="36233"> <group id="1"> diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp index 60ca6cce41..8f7c8a1ce8 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp @@ -3307,7 +3307,7 @@ bool CDVDPlayer::OpenAudioStream(CDVDStreamInfo& hint, bool reset) bool CDVDPlayer::OpenVideoStream(CDVDStreamInfo& hint, bool reset) { - if( m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD) ) + if (m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD)) { /* set aspect ratio as requested by navigator for dvd's */ float aspect = static_cast<CDVDInputStreamNavigator*>(m_pInputStream)->GetVideoAspectRatio(); @@ -3318,6 +3318,24 @@ bool CDVDPlayer::OpenVideoStream(CDVDStreamInfo& hint, bool reset) } hint.software = true; } + else if (m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER)) + { + // set framerate if not set by demuxer + if (hint.fpsrate == 0 || hint.fpsscale == 0) + { + int fpsidx = CSettings::Get().GetInt("pvrplayback.fps"); + if (fpsidx == 1) + { + hint.fpsscale = 1000; + hint.fpsrate = 50000; + } + else if (fpsidx == 2) + { + hint.fpsscale = 1001; + hint.fpsrate = 60000; + } + } + } CDVDInputStream::IMenus* pMenus = dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream); if(pMenus && pMenus->IsInMenu()) diff --git a/xbmc/cores/dvdplayer/DVDStreamInfo.h b/xbmc/cores/dvdplayer/DVDStreamInfo.h index de66625d99..c0e22a2330 100644 --- a/xbmc/cores/dvdplayer/DVDStreamInfo.h +++ b/xbmc/cores/dvdplayer/DVDStreamInfo.h @@ -56,7 +56,7 @@ public: // VIDEO - int fpsscale; // scale of 1000 and a rate of 29970 will result in 29.97 fps + int fpsscale; // scale of 1001 and a rate of 60000 will result in 59.94 fps int fpsrate; int rfpsscale; int rfpsrate; |