summaryrefslogtreecommitdiffstats
path: root/dvb-t/es-Granada
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2014-10-15 00:54:11 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2014-10-15 00:54:11 +0100
commit6a4826f9d965ba04738085602e80a867c78c81f1 (patch)
treebb1db1628dd2d2b68a813fa13288ae4797b6fd92 /dvb-t/es-Granada
parent869756da0627b14a6954f96aa5009d57a5e682c7 (diff)
downloaddtv-scan-tables-6a4826f9d965ba04738085602e80a867c78c81f1.tar.gz
Imported Upstream version 0+git20141009.d26b627upstream/0+git20141009.d26b627
Diffstat (limited to 'dvb-t/es-Granada')
-rw-r--r--dvb-t/es-Granada78
1 files changed, 72 insertions, 6 deletions
diff --git a/dvb-t/es-Granada b/dvb-t/es-Granada
index 05847f1..79ee07d 100644
--- a/dvb-t/es-Granada
+++ b/dvb-t/es-Granada
@@ -1,8 +1,74 @@
# Spain, Granada
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
-T 762000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
-T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
-T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
-T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
-T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
-T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
+[CHANNEL]
+ DELIVERY_SYSTEM = DVBT
+ FREQUENCY = 762000000
+ BANDWIDTH_HZ = 8000000
+ CODE_RATE_HP = 2/3
+ CODE_RATE_LP = NONE
+ MODULATION = QAM/64
+ TRANSMISSION_MODE = 8K
+ GUARD_INTERVAL = 1/4
+ HIERARCHY = NONE
+ INVERSION = AUTO
+
+[CHANNEL]
+ DELIVERY_SYSTEM = DVBT
+ FREQUENCY = 770000000
+ BANDWIDTH_HZ = 8000000
+ CODE_RATE_HP = 2/3
+ CODE_RATE_LP = NONE
+ MODULATION = QAM/64
+ TRANSMISSION_MODE = 8K
+ GUARD_INTERVAL = 1/4
+ HIERARCHY = NONE
+ INVERSION = AUTO
+
+[CHANNEL]
+ DELIVERY_SYSTEM = DVBT
+ FREQUENCY = 834000000
+ BANDWIDTH_HZ = 8000000
+ CODE_RATE_HP = 2/3
+ CODE_RATE_LP = NONE
+ MODULATION = QAM/64
+ TRANSMISSION_MODE = 8K
+ GUARD_INTERVAL = 1/4
+ HIERARCHY = NONE
+ INVERSION = AUTO
+
+[CHANNEL]
+ DELIVERY_SYSTEM = DVBT
+ FREQUENCY = 842000000
+ BANDWIDTH_HZ = 8000000
+ CODE_RATE_HP = 2/3
+ CODE_RATE_LP = NONE
+ MODULATION = QAM/64
+ TRANSMISSION_MODE = 8K
+ GUARD_INTERVAL = 1/4
+ HIERARCHY = NONE
+ INVERSION = AUTO
+
+[CHANNEL]
+ DELIVERY_SYSTEM = DVBT
+ FREQUENCY = 850000000
+ BANDWIDTH_HZ = 8000000
+ CODE_RATE_HP = 2/3
+ CODE_RATE_LP = NONE
+ MODULATION = QAM/64
+ TRANSMISSION_MODE = 8K
+ GUARD_INTERVAL = 1/4
+ HIERARCHY = NONE
+ INVERSION = AUTO
+
+[CHANNEL]
+ DELIVERY_SYSTEM = DVBT
+ FREQUENCY = 858000000
+ BANDWIDTH_HZ = 8000000
+ CODE_RATE_HP = 2/3
+ CODE_RATE_LP = NONE
+ MODULATION = QAM/64
+ TRANSMISSION_MODE = 8K
+ GUARD_INTERVAL = 1/4
+ HIERARCHY = NONE
+ INVERSION = AUTO
+
or: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * test_dvr_play.c - Play TS file via dvr device.
 *
 * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
 *                  & Marcus Metzler <marcus@convergence.de>
 *                    for convergence integrated media GmbH
 * Copyright (C) 2003 Convergence GmbH
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1
 * of the License, or (at your option) any later version.
 *
 * This program 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 Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */

#include <sys/ioctl.h>
#include <stdio.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <time.h>
#include <sys/poll.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>

#include <linux/dvb/dmx.h>


#define BUFSIZE (512*188)

void play_file_dvr(int filefd, int dvrfd)
{
	char buf[BUFSIZE];
	int count, written, bytes, total = 0;

	while ((count = read(filefd, buf, BUFSIZE)) > 0) {
		total += count;
		fprintf(stderr, "read  %d (%d total)\n", count, total);
		written = 0;
		while (written < count) {
			bytes = write(dvrfd, buf + written, count - written);
			fprintf(stderr, "write %d\n", bytes);
			if (bytes < 0) {
				perror("write dvr");
				return;
			}
			else if (bytes == 0) {
				fprintf(stderr, "write dvr: 0 bytes !");
				return;
			}
			written += bytes;
		}
	}
}

void set_pid(int fd, int pid, int type)
{
	struct dmx_pes_filter_params pesFilterParams;

	fprintf(stderr, "set PID 0x%04x (%d)\n", pid, type);
	if (ioctl(fd, DMX_STOP) < 0)
		perror("DMX STOP:");

	if (ioctl(fd, DMX_SET_BUFFER_SIZE, 64*1024) < 0)
		perror("DMX SET BUFFER:");

	pesFilterParams.pid = pid;
	pesFilterParams.input = DMX_IN_DVR;
	pesFilterParams.output = DMX_OUT_DECODER;
	pesFilterParams.pes_type = type;
	pesFilterParams.flags = DMX_IMMEDIATE_START;
	if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0)
		perror("DMX SET FILTER");
}

int main(int argc, char **argv)
{
	char *dmxdev = "/dev/dvb/adapter0/demux0";
	char *dvrdev = "/dev/dvb/adapter0/dvr0";
	int vpid, apid;
	int filefd, dvrfd, vfd, afd;

	if (argc < 4) {
		fprintf(stderr, "usage: test_dvr_play TS-file video-PID audio-PID\n");
		return 1;
	}
	vpid = strtoul(argv[2], NULL, 0);
	apid = strtoul(argv[3], NULL, 0);

	filefd = open(argv[1], O_RDONLY);
	if (filefd == -1) {
		fprintf(stderr, "Failed to open '%s': %d %m\n", argv[1], errno);
		return 1;
	}

	fprintf(stderr, "Playing '%s', video PID 0x%04x, audio PID 0x%04x\n",
			argv[1], vpid, apid);

	if (getenv("DEMUX"))
		dmxdev = getenv("DEMUX");
	if (getenv("DVR"))
		dvrdev = getenv("DVR");

	if ((dvrfd = open(dvrdev, O_WRONLY)) == -1) {
		fprintf(stderr, "Failed to open '%s': %d %m\n", dvrdev, errno);
		return 1;
	}

	if ((vfd = open(dmxdev, O_WRONLY)) == -1) {
		fprintf(stderr, "Failed to open video '%s': %d %m\n", dmxdev, errno);
		return 1;
	}
	if ((afd = open(dmxdev, O_WRONLY)) == -1) {
		fprintf(stderr, "Failed to open audio '%s': %d %m\n", dmxdev, errno);
		return 1;
	}

	/* playback timing is controlled via A/V PTS, so we cannot start
	 * writing to the DVR device before the PIDs are set...
	 */
	set_pid(afd, apid, DMX_PES_AUDIO);
	set_pid(vfd, vpid, DMX_PES_VIDEO);

	play_file_dvr(filefd, dvrfd);

	close(dvrfd);
	close(afd);
	close(vfd);
	close(filefd);
	return 0;
}