1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00
vdr-plugin-iptv/config.c

50 lines
1.2 KiB
C
Raw Normal View History

2007-09-15 17:38:38 +02:00
/*
* config.c: IPTV plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
* $Id: config.c,v 1.21 2008/02/01 21:54:24 rahrenbe Exp $
2007-09-15 17:38:38 +02:00
*/
#include "config.h"
cIptvConfig IptvConfig;
cIptvConfig::cIptvConfig(void)
: readBufferTsCount(48),
tsBufferSize(2),
tsBufferPrefillRatio(0),
extProtocolBasePort(4321),
useBytes(1),
sectionFiltering(1)
2007-09-15 17:38:38 +02:00
{
2008-01-05 00:36:37 +01:00
for (unsigned int i = 0; i < ARRAY_SIZE(disabledFilters) - 1; ++i)
disabledFilters[i] = -1;
memset(configDirectory, '\0', sizeof(configDirectory));
}
2008-01-05 00:36:37 +01:00
unsigned int cIptvConfig::GetDisabledFiltersCount(void) const
{
unsigned int n = 0;
2008-01-05 00:36:37 +01:00
while ((disabledFilters[n] != -1) && (n < ARRAY_SIZE(disabledFilters) - 1))
n++;
return n;
}
2008-01-05 00:36:37 +01:00
int cIptvConfig::GetDisabledFilters(unsigned int Index) const
{
2008-01-05 00:36:37 +01:00
return (Index < ARRAY_SIZE(disabledFilters)) ? disabledFilters[Index] : -1;
}
void cIptvConfig::SetDisabledFilters(unsigned int Index, int Number)
{
2008-01-05 00:36:37 +01:00
if (Index < ARRAY_SIZE(disabledFilters))
disabledFilters[Index] = Number;
2007-09-15 17:38:38 +02:00
}
void cIptvConfig::SetConfigDirectory(const char *directoryP)
{
debug("cIptvConfig::SetConfigDirectory(%s)", directoryP);
strn0cpy(configDirectory, directoryP, sizeof(configDirectory));
}