diff options
author | Christian <zerov83@gmail.com> | 2016-01-14 20:23:44 +0100 |
---|---|---|
committer | Christian <zerov83@gmail.com> | 2016-01-14 20:23:44 +0100 |
commit | afe4aff557da8175961cb89ca3b440cde53affe0 (patch) | |
tree | e35c5ee6e3694c0c195a25ddb1185615913fa210 | |
parent | e4ae929e8585c603563d0fd184a2c15a43251e39 (diff) | |
download | vdr-plugin-plex-afe4aff557da8175961cb89ca3b440cde53affe0.tar.gz vdr-plugin-plex-afe4aff557da8175961cb89ca3b440cde53affe0.tar.bz2 |
Made ringbuffer size in cHlsPlayer configurable
-rw-r--r-- | Config.cpp | 9 | ||||
-rw-r--r-- | Config.h | 3 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | hlsPlayer.cpp | 5 | ||||
-rw-r--r-- | po/de_DE.mo | bin | 4189 -> 0 bytes | |||
-rw-r--r-- | po/de_DE.po | 11 |
6 files changed, 20 insertions, 10 deletions
@@ -19,9 +19,11 @@ Config::Config() { DetailGridRows = 4; UseMpv = false; + UseAc3 = true; ScrollByPage = true; ScrollAllAround = true; - + BufferSize = 1; + DefaultViewMode = ViewMode::Cover; ViewEntry en; @@ -107,6 +109,7 @@ bool Config::Parse(const char *name, const char *value) else if (strcasecmp(name, "ScrollByPage") == 0) Config::GetInstance().ScrollByPage = atoi(value) ? true : false; else if (strcasecmp(name, "ScrollAllAround") == 0) Config::GetInstance().ScrollAllAround = atoi(value) ? true : false; else if (strcasecmp(name, "UseAc3") == 0) Config::GetInstance().UseAc3 = atoi(value) ? true : false; + else if (strcasecmp(name, "BufferSize") == 0) Config::GetInstance().BufferSize = atoi(value); else parsed = false; if(!parsed) { @@ -162,6 +165,8 @@ cMyMenuSetupPage::cMyMenuSetupPage(void) Add(new cMenuEditBoolItem(tr("Hide main menu entry"), (int*)&HideMainMenuEntry, trVDR("no"), trVDR("yes"))); Add(new cMenuEditBoolItem(tr("Use AC3 instead of aac Audio"), (int*)&UseAc3, trVDR("no"), trVDR("yes"))); Add(new cMenuEditBoolItem(tr("Use Mpv Plugin (If Availiable)"), (int*)&UseMpv, trVDR("no"), trVDR("yes"))); + Add(new cMenuEditIntItem(tr("Buffer size for playing, in MB"), &BufferSize, 1, 128)); + Add(new cMenuEditBoolItem(tr("Scroll by Page"), (int*)&ScrollByPage, trVDR("no"), trVDR("yes"))); Add(new cMenuEditBoolItem(tr("Scroll all around"), (int*)&ScrollAllAround, trVDR("no"), trVDR("yes"))); Add(new cMenuEditBoolItem(tr("Use custom transcoding profile"), (int*)&UseCustomTranscodeProfile, trVDR("no"), trVDR("yes"))); @@ -213,6 +218,7 @@ void cMyMenuSetupPage::Store(void) Config::GetInstance().ScrollByPage = ScrollByPage; Config::GetInstance().ScrollAllAround = ScrollAllAround; Config::GetInstance().UseAc3 = UseAc3; + Config::GetInstance().BufferSize = BufferSize; SetupStore("UseCustomTranscodeProfile", Config::GetInstance().UseCustomTranscodeProfile); SetupStore("HideMainMenuEntry", Config::GetInstance().HideMainMenuEntry); @@ -234,4 +240,5 @@ void cMyMenuSetupPage::Store(void) SetupStore("ScrollByPage", Config::GetInstance().ScrollByPage); SetupStore("ScrollAllAround", Config::GetInstance().ScrollAllAround); SetupStore("UseAc3", Config::GetInstance().ScrollAllAround); + SetupStore("BufferSize", Config::GetInstance().BufferSize); } @@ -47,7 +47,7 @@ public: bool UsePlexAccount; bool UseConfiguredServer; bool UseAc3; - + int BufferSize; int CoverGridColumns; int CoverGridRows; @@ -120,6 +120,7 @@ class cMyMenuSetupPage:public cMenuSetupPage int ScrollByPage; int ScrollAllAround; int UseAc3; + int BufferSize; virtual void Store(void); @@ -20,7 +20,7 @@ CONFIG := #-DDEBUG # uncomment to build DEBUG ### The version number of this plugin (taken from the main source file): VERSION = $(shell grep 'static const char \*const VERSION *=' $(PLUGIN).h | awk '{ print $$7 }' | sed -e 's/[";]//g') -GIT_REV = $(shell git describe --always 2>/dev/null) +GIT_REV = $(shell git describe --tags --always 2>/dev/null) ### The directory environment: diff --git a/hlsPlayer.cpp b/hlsPlayer.cpp index 1f05b20..6bd0753 100644 --- a/hlsPlayer.cpp +++ b/hlsPlayer.cpp @@ -73,9 +73,9 @@ void cHlsSegmentLoader::Action(void) { if(!LoadLists()) return; - m_ringBufferSize = MEGABYTE(1); + m_ringBufferSize = MEGABYTE(Config::GetInstance().BufferSize); - isyslog("[plex]%s Create Ringbuffer %d MB", __FUNCTION__, 1); + isyslog("[plex]%s Create Ringbuffer %d MB", __FUNCTION__, Config::GetInstance().BufferSize); m_pRingbuffer = new cRingBufferLinear(m_ringBufferSize, 2*TS_SIZE); @@ -263,7 +263,6 @@ bool cHlsSegmentLoader::LoadSegment(std::string segmentUri) cCondWait::SleepMs(1); } if(m_newList) { - std::cout << "LoadSegment, break loop" << std::endl; break; } } diff --git a/po/de_DE.mo b/po/de_DE.mo Binary files differdeleted file mode 100644 index db25a05..0000000 --- a/po/de_DE.mo +++ /dev/null diff --git a/po/de_DE.po b/po/de_DE.po index 4c31890..9799f01 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -2,15 +2,15 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # Chris, 2015. -# Chris <zerov83@gmail.com>, 2015. +# Chris <zerov83@gmail.com>, 2015, 2016. msgid "" msgstr "" "Project-Id-Version: vdr-plex 0.1.0\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2015-12-23 22:44+0100\n" -"PO-Revision-Date: 2015-11-07 16:38+0200\n" +"POT-Creation-Date: 2016-01-14 20:01+0100\n" +"PO-Revision-Date: 2016-01-14 20:20+0200\n" "Last-Translator: Chris <zerov83@gmail.com>\n" -"Language-Team: German\n" +"Language-Team: chriszero\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -27,6 +27,9 @@ msgstr "Verwende AC3 anstelle von AAC" msgid "Use Mpv Plugin (If Availiable)" msgstr "Verwende MPV-Plugin falls verfügbar" +msgid "Buffer size for playing, in MB" +msgstr "Abspielpuffergröße, in MB" + msgid "Scroll by Page" msgstr "Seitenweise Scrollen" |