diff options
| author | Thomas Reufer <thomas@reufer.ch> | 2014-11-14 23:00:31 +0100 |
|---|---|---|
| committer | Thomas Reufer <thomas@reufer.ch> | 2014-11-14 23:16:59 +0100 |
| commit | d34858fcf347d5a8fb900c058530a48a5f36c429 (patch) | |
| tree | d43145e64d04992c38876e9df2fe1856d943d1c4 | |
| parent | 9c19efb6419b7b93738be35fb0fc360f830aee3d (diff) | |
| download | vdr-plugin-rpihddevice-d34858fcf347d5a8fb900c058530a48a5f36c429.tar.gz vdr-plugin-rpihddevice-d34858fcf347d5a8fb900c058530a48a5f36c429.tar.bz2 | |
added setup option for GPU accelerated OSD
| -rw-r--r-- | po/de_DE.po | 5 | ||||
| -rw-r--r-- | setup.c | 28 | ||||
| -rw-r--r-- | setup.h | 19 |
3 files changed, 45 insertions, 7 deletions
diff --git a/po/de_DE.po b/po/de_DE.po index 8a36fa8..15bb07d 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-rpihddevice 0.0.4\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2014-10-05 23:08+0200\n" +"POT-Creation-Date: 2014-11-08 11:42+0100\n" "PO-Revision-Date: 2013-10-14 13:36+0200\n" "Last-Translator: <thomas@reufer.ch>\n" "Language-Team: German <translation-team-de@lists.sourceforge.net>\n" @@ -41,6 +41,9 @@ msgstr "Digitalton durchreichen" msgid "Ignore Audio EDID" msgstr "Audio EDID ignorieren" +msgid "Use GPU accelerated OSD" +msgstr "OSD mit GPU-Unterstützung" + msgid "analog" msgstr "analog" @@ -6,6 +6,7 @@ #include "setup.h" #include "display.h" +#include "ovgosd.h" #include <vdr/tools.h> #include <vdr/menuitems.h> @@ -23,10 +24,12 @@ public: cRpiSetupPage( cRpiSetup::AudioParameters audio, - cRpiSetup::VideoParameters video) : + cRpiSetup::VideoParameters video, + cRpiSetup::OsdParameters osd) : m_audio(audio), - m_video(video) + m_video(video), + m_osd(osd) { Setup(); } @@ -60,7 +63,9 @@ protected: SetupStore("Resolution", m_video.resolution); SetupStore("FrameRate", m_video.frameRate); - cRpiSetup::GetInstance()->Set(m_audio, m_video); + SetupStore("AcceleratedOsd", m_osd.accelerated); + + cRpiSetup::GetInstance()->Set(m_audio, m_video, m_osd); } private: @@ -95,12 +100,16 @@ private: tr("Ignore Audio EDID"), &m_audio.ignoreEDID)); } + Add(new cMenuEditBoolItem( + tr("Use GPU accelerated OSD"), &m_osd.accelerated)); + SetCurrent(Get(current)); Display(); } cRpiSetup::AudioParameters m_audio; cRpiSetup::VideoParameters m_video; + cRpiSetup::OsdParameters m_osd; static const char *const s_audioport[2]; static const char *const s_videoFraming[3]; @@ -263,7 +272,7 @@ void cRpiSetup::SetHDMIChannelMapping(bool passthrough, int channels) cMenuSetupPage* cRpiSetup::GetSetupPage(void) { - return new cRpiSetupPage(m_audio, m_video); + return new cRpiSetupPage(m_audio, m_video, m_osd); } bool cRpiSetup::Parse(const char *name, const char *value) @@ -280,12 +289,15 @@ bool cRpiSetup::Parse(const char *name, const char *value) m_video.resolution = atoi(value); else if (!strcasecmp(name, "FrameRate")) m_video.frameRate = atoi(value); + else if (!strcasecmp(name, "AcceleratedOsd")) + m_osd.accelerated = atoi(value); else return false; return true; } -void cRpiSetup::Set(AudioParameters audio, VideoParameters video) +void cRpiSetup::Set(AudioParameters audio, VideoParameters video, + OsdParameters osd) { if (audio != m_audio) { @@ -300,4 +312,10 @@ void cRpiSetup::Set(AudioParameters audio, VideoParameters video) if (m_onVideoSetupChanged) m_onVideoSetupChanged(m_onVideoSetupChangedData); } + + if (osd != m_osd) + { + m_osd = osd; + cRpiOsdProvider::ResetOsd(); + } } @@ -49,6 +49,18 @@ public: } }; + struct OsdParameters + { + OsdParameters() : + accelerated(1) { } + + int accelerated; + + bool operator!=(const OsdParameters& a) { + return (a.accelerated != accelerated); + } + }; + static bool HwInit(void); static cRpiAudioPort::ePort GetAudioPort(void) { @@ -96,6 +108,10 @@ public: codec == cVideoCodec::eH264 ? true : false; } + static bool IsHighLevelOsd(void) { + return GetInstance()->m_osd.accelerated != 0; + } + static void SetHDMIChannelMapping(bool passthrough, int channels); static cRpiSetup* GetInstance(void); @@ -104,7 +120,7 @@ public: class cMenuSetupPage* GetSetupPage(void); bool Parse(const char *name, const char *value); - void Set(AudioParameters audio, VideoParameters video); + void Set(AudioParameters audio, VideoParameters video, OsdParameters osd); static void SetAudioSetupChangedCallback(void (*callback)(void*), void* data = 0); static void SetVideoSetupChangedCallback(void (*callback)(void*), void* data = 0); @@ -125,6 +141,7 @@ private: AudioParameters m_audio; VideoParameters m_video; + OsdParameters m_osd; bool m_mpeg2Enabled; |
