/* $Id$ * $URL$ * * Fifo plugin * * Copyright (C) 2008 Michael Vogt * Copyright (C) 2010 Mattia Jona-Lasinio * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 The LCD4Linux Team * * This file is part of LCD4Linux. * * LCD4Linux is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * LCD4Linux is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * Configuration parameters: * * - FifoPath 'string' : use as the fifo complete file path * If absent use /tmp/lcd4linux.fifo) * * - FifoBufSize num : if the plugin is unable to determine the display size then * set the size of the internal buffer to characters * otherwise use the display size (number of columns). * If no display size is available and no FifoBufSize parameter * is specified then arbitrarily set the internal buffer size * to 80 characters. */ #include "config.h" #include #include #include #include #include #include #include #include #include "debug.h" #include "plugin.h" #include "cfg.h" #ifdef WITH_DMALLOC #include #endif #define FIFO_MAXPATH 256 #define FIFO_DEFAULT_PATH /tmp/lcd4linux.fifo #define FIFO_DEFAULT_BUFSIZE 80 #define str(s) #s #define string(s) str(s) struct FifoData { char *path; char *msg; int msglen; int input; int created; }; static struct FifoData fd = { .path = NULL, .msg = NULL, .msglen = -1, .input = -1, .created = -1, }; static int confFifo(struct FifoData *p) { char *path, *disp, *sect, *fifosect = "Plugin:FIFO"; unsigned int pathlen; info("[FIFO] Reading config file '%s'", cfg_source()); path = cfg_get(fifosect, "FifoPath", string(FIFO_DEFAULT_PATH)); pathlen = strlen(path); if (pathlen == 0) { info("[FIFO] Invalid '%s.FifoPath' entry from '%s'. " "Assuming " string(FIFO_DEFAULT_PATH), fifosect, cfg_source()); free(path); path = strdup(string(FIFO_DEFAULT_PATH)); pathlen = strlen(path); } if (pathlen > FIFO_MAXPATH) { error("[FIFO] Error: Too long '%s.FifoPath' entry from '%s'. " "(MAX " string(FIFO_MAXPATH) " chars)", fifosect, cfg_source()); free(path); return (-1); } info("[FIFO] Read '%s.FifoPath' value is '%s'", fifosect, path); disp = cfg_get(NULL, "Display", NULL); if (disp == NULL) { error("[FIFO] Error: Could not get the Display name from '%s'", cfg_source()); free(path); return (-1); } if ((sect = malloc(1 + strlen("Display:") + strlen(disp))) == NULL) { error("[FIFO] Error: Memory allocation failed"); free(disp); fre
# Sweden - Hjo/Grevbäck
[CHANNEL]
	DELIVERY_SYSTEM = DVBT
	FREQUENCY = 514000000
	BANDWIDTH_HZ = 8000000
	CODE_RATE_HP = 2/3
	CODE_RATE_LP = NONE
	MODULATION = QAM/64
	TRANSMISSION_MODE = 8K
	GUARD_INTERVAL = 1/8
	HIERARCHY = NONE
	INVERSION = AUTO