1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00
vdr-plugin-iptv/setup.c
2007-09-15 23:58:23 +00:00

43 lines
1.0 KiB
C

/*
* setup.c: IPTV plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
* $Id: setup.c,v 1.3 2007/09/15 23:58:23 rahrenbe Exp $
*/
#include "common.h"
#include "config.h"
#include "setup.h"
cIptvPluginSetup::cIptvPluginSetup(void)
{
bufferSize = IptvConfig.GetBufferSizeMB();
bufferPrefill = IptvConfig.GetBufferPrefillRatio();
Setup();
}
void cIptvPluginSetup::Setup(void)
{
int current = Current();
Clear();
Add(new cMenuEditIntItem(tr("Buffer size [MB]"), &bufferSize, 2, 16));
Add(new cMenuEditIntItem(tr("Buffer prefill ratio [%]"), &bufferPrefill, 0, 40));
SetCurrent(Get(current));
Display();
}
eOSState cIptvPluginSetup::ProcessKey(eKeys Key)
{
eOSState state = cMenuSetupPage::ProcessKey(Key);
return state;
}
void cIptvPluginSetup::Store(void)
{
SetupStore("BufferSize", bufferSize);
SetupStore("BufferPrefill", bufferPrefill);
IptvConfig.SetBufferSizeMB(bufferSize);
IptvConfig.SetBufferPrefillRatio(bufferPrefill);
}