aboutsummaryrefslogtreecommitdiffstats
path: root/util/scan/dvb-t/hu-Miskolc-Aggtelek-Fony
blob: c287a951545288166a3e7ef844c6e8f09cf81281 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Hungary / Miskolc-Aggtelek-Fony
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
#
# A.multiplex UHF-45:
# FREE -----------------------------------------------------------------------------------
# m1 HD, m2 HD, Duna World, Duna HD, MR1 Kossuth Radio, MR2 Petofi Radio, MR3 Bartok Radio
T 666000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
#
# B.multiplex UHF-31:
# NON-FREE --------------------------------------------------------------------------------
# PRO4, VIASAT3, Prizma TV, Muzsika TV, Universal Channel, Comedy Central, Minimax,
# Cartoon Network, Spektrum, History, Sport1, Sport2, Dorcel TV
T 554000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
#
# C.multiplex UHF-63:
# FREE --------------------------------------------------------------------------------
# RTL Klub, TV2, Euronews Test, Info csatorna, Neo FM
# NON-FREE ----------------------------------------------------------------------------
# Cool, Film+, HBO, National Geographic, Disney Channel, AXN, FEM3, Private spice, ATV,
# HirTV, Sportklub
T 810000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
lor: #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 */
/*
	dvbscan utility

	Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)

	This program 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 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 General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "dvbscan.h"

void append_transponder(struct transponder *t, struct transponder **tlist, struct transponder **tlist_end)
{
	if (*tlist_end == NULL) {
		*tlist = t;
	} else {
		(*tlist_end)->next = t;
	}
	*tlist_end = t;
	t->next = NULL;
}

struct transponder *new_transponder(void)
{
	struct transponder *t = (struct transponder *) malloc(sizeof(struct transponder));
	if (t == NULL) {
		fprintf(stderr, "Out of memory\n");
		exit(1);
	}
	memset(t, 0, sizeof(struct transponder));

	return t;
}

void free_transponder(struct transponder *t)
{
	if (t->frequencies)
		free(t->frequencies);
	// FIXME: free services
	free(t);
}

int seen_transponder(struct transponder *t, struct transponder *checklist)
{
	uint32_t i;

	struct transponder *cur_check = checklist;
	while(cur_check) {
		uint32_t freq1 = cur_check->params.frequency / 2000;
		for(i=0; i < t->frequency_count; i++) {
			uint32_t freq2 = t->frequencies[i] / 2000;
			if (freq1 == freq2) {
				return 1;
			}
		}
		cur_check = cur_check->next;
	}

	return 0;
}

void add_frequency(struct transponder *t, uint32_t frequency)
{
	uint32_t *tmp;

	tmp = (uint32_t*) realloc(t->frequencies, sizeof(uint32_t) * (t->frequency_count + 1));
	if (tmp == NULL) {
		fprintf(stderr, "Out of memory\n");
		exit(1);
	}
	tmp[t->frequency_count++] = frequency;
	t->frequencies = tmp;
}

struct transponder *first_transponder(struct transponder **tlist, struct transponder **tlist_end)
{
	struct transponder *t = *tlist;

	*tlist = t->next;
	if (*tlist == NULL)
		*tlist_end = NULL;

	return t;
}