vdr-plugin-iptv/setup.c

43 lines
1.0 KiB
C
Raw Normal View History

2007-09-15 17:38:38 +02:00
/*
* setup.c: IPTV plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
2007-09-16 01:58:23 +02:00
* $Id: setup.c,v 1.3 2007/09/15 23:58:23 rahrenbe Exp $
2007-09-15 17:38:38 +02:00
*/
#include "common.h"
#include "config.h"
#include "setup.h"
cIptvPluginSetup::cIptvPluginSetup(void)
{
bufferSize = IptvConfig.GetBufferSizeMB();
bufferPrefill = IptvConfig.GetBufferPrefillRatio();
2007-09-15 17:38:38 +02:00
Setup();
}
void cIptvPluginSetup::Setup(void)
{
int current = Current();
Clear();
2007-09-16 01:58:23 +02:00
Add(new cMenuEditIntItem(tr("Buffer size [MB]"), &bufferSize, 2, 16));
Add(new cMenuEditIntItem(tr("Buffer prefill ratio [%]"), &bufferPrefill, 0, 40));
2007-09-15 17:38:38 +02:00
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);
2007-09-15 17:38:38 +02:00
IptvConfig.SetBufferSizeMB(bufferSize);
IptvConfig.SetBufferPrefillRatio(bufferPrefill);
2007-09-15 17:38:38 +02:00
}