summaryrefslogtreecommitdiff
path: root/multimedia/szap-s2
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2010-05-23 19:01:05 +0000
committerJuergen Lock <nox@FreeBSD.org>2010-05-23 19:01:05 +0000
commita3b3bd2f214acc14f7193d35316a077109ec6361 (patch)
tree69f5597b1724f00cf61bd90f75f5a863b5dc6efa /multimedia/szap-s2
parent[From the README:] (diff)
szap-s2 is a command line channel zapping (i.e. tuning) utility similar
to szap but including support for S2API a.k.a. DVB API version 5, which supports DVB-S2. When using szap-s2, one instructs it to change the channel to one of a list of channels supplied in a channels.conf type file. There is no manpage yet, but you can run szap-s2 without args to get a usage message. location of channel list file is ~/.szap/channels.conf one line of the szap channel file has the following format: name:frequency_MHz:polarization[coderate][delivery][modulation][rolloff]:sat_no:symbolrate:vpid:apid:service_id one line of the VDR channel file has the following format: name:frequency_MHz:polarization[coderate][delivery][modulation][rolloff]:sat_no:symbolrate:vpid:apid:tpid:?:service_id:?:?:? WWW: http://www.linuxtv.org/wiki/index.php/Szap-s2
Notes
Notes: svn path=/head/; revision=254898
Diffstat (limited to 'multimedia/szap-s2')
-rw-r--r--multimedia/szap-s2/Makefile33
-rw-r--r--multimedia/szap-s2/distinfo3
-rw-r--r--multimedia/szap-s2/files/patch-teletext160
-rw-r--r--multimedia/szap-s2/pkg-descr16
4 files changed, 212 insertions, 0 deletions
diff --git a/multimedia/szap-s2/Makefile b/multimedia/szap-s2/Makefile
new file mode 100644
index 000000000000..da119378f8b5
--- /dev/null
+++ b/multimedia/szap-s2/Makefile
@@ -0,0 +1,33 @@
+# New ports collection makefile for: szap_s2
+# Date created: Wed Apr 14 19:30:36 CEST 2010
+# Whom: Juergen Lock <nox@freebsd.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= szap_s2
+PORTVERSION= 20100129s
+CATEGORIES= multimedia
+MASTER_SITES= ${MASTER_SITE_LOCAL}
+MASTER_SITE_SUBDIR= nox/
+
+MAINTAINER= nox@FreeBSD.org
+COMMENT= Simple zapping tool for the Linux DVB S2 API
+
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/dvb/frontend.h:${PORTSDIR}/multimedia/v4l_compat
+
+USE_BZIP2= yes
+USE_GMAKE= yes
+PATCH_STRIP= -p1
+MAKE_ARGS= INCLUDE=-I"${LOCALBASE}/include"
+WRKSRC= ${WRKDIR}/szap-s2-e34f73b254db
+PORTDOCS= README
+PLIST_FILES= bin/szap-s2
+
+.if !defined(NOPORTDOCS)
+post-install:
+ ${MKDIR} ${DOCSDIR}
+ (cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR})
+.endif
+
+.include <bsd.port.mk>
diff --git a/multimedia/szap-s2/distinfo b/multimedia/szap-s2/distinfo
new file mode 100644
index 000000000000..b835fe9ab6c3
--- /dev/null
+++ b/multimedia/szap-s2/distinfo
@@ -0,0 +1,3 @@
+MD5 (szap_s2-20100129s.tar.bz2) = d7ce70f636430e95f16a792d963cc832
+SHA256 (szap_s2-20100129s.tar.bz2) = 69e50c970b874eafe551b3c0e5534875005899d9aaba5c6b43f81264212c1c2b
+SIZE (szap_s2-20100129s.tar.bz2) = 9371
diff --git a/multimedia/szap-s2/files/patch-teletext b/multimedia/szap-s2/files/patch-teletext
new file mode 100644
index 000000000000..84edc356d9f9
--- /dev/null
+++ b/multimedia/szap-s2/files/patch-teletext
@@ -0,0 +1,160 @@
+--- a/szap-s2.c
++++ b/szap-s2.c
+@@ -206,6 +206,7 @@ static char *usage_str =
+ " -i : run interactively, allowing you to type in channel names\n"
+ " -p : add pat and pmt to TS recording (implies -r)\n"
+ " or -n numbers for zapping\n"
++ " -t : add teletext to TS recording (needs -V)\n"
+ " -S : delivery system type DVB-S=0, DVB-S2=1\n"
+ " -M : modulation 1=BPSK 2=QPSK 5=8PSK\n"
+ " -C : fec 0=NONE 12=1/2 23=2/3 34=3/4 35=3/5 45=4/5 56=5/6 67=6/7 89=8/9 910=9/10 999=AUTO\n"
+@@ -434,7 +435,8 @@ int check_frontend (int fe_fd, int dvr,
+ static
+ int zap_to(unsigned int adapter, unsigned int frontend, unsigned int demux,
+ unsigned int sat_no, unsigned int freq, unsigned int pol,
+- unsigned int sr, unsigned int vpid, unsigned int apid, int sid,
++ unsigned int sr, unsigned int vpid, unsigned int apid,
++ unsigned int tpid, int sid,
+ int dvr, int rec_psi, int bypass, unsigned int delivery,
+ int modulation, int fec, int rolloff, int human_readable)
+ {
+@@ -448,7 +450,7 @@ int zap_to(unsigned int adapter, unsigne
+ };
+
+ char fedev[128], dmxdev[128], auddev[128];
+- static int fefd, dmxfda, dmxfdv, audiofd = -1, patfd, pmtfd;
++ static int fefd, dmxfda, dmxfdv, dmxfdt = -1, audiofd = -1, patfd, pmtfd;
+ int pmtpid;
+ uint32_t ifreq;
+ int hiband, result;
+@@ -475,7 +477,13 @@ int zap_to(unsigned int adapter, unsigne
+ close(fefd);
+ return FALSE;
+ }
+-
++
++ if ((dmxfdt = open(dmxdev, O_RDWR)) < 0) {
++ perror("opening teletext demux failed");
++ close(fefd);
++ return FALSE;
++ }
++
+ if (dvr == 0) /* DMX_OUT_DECODER */
+ audiofd = open(auddev, O_RDWR);
+
+@@ -485,6 +493,7 @@ int zap_to(unsigned int adapter, unsigne
+ close(audiofd);
+ close(dmxfda);
+ close(dmxfdv);
++ close(dmxfdt);
+ close(fefd);
+ return FALSE;
+ }
+@@ -495,6 +504,7 @@ int zap_to(unsigned int adapter, unsigne
+ close(audiofd);
+ close(dmxfda);
+ close(dmxfdv);
++ close(dmxfdt);
+ close(fefd);
+ return FALSE;
+ }
+@@ -544,6 +554,11 @@ int zap_to(unsigned int adapter, unsigne
+ result = TRUE;
+ }
+ }
++
++ if (tpid != -1 && !set_demux(dmxfdt, tpid, DMX_PES_TELETEXT, dvr)) {
++ fprintf(stderr, "set_demux DMX_PES_TELETEXT failed\n");
++ }
++
+ check_frontend (fefd, dvr, human_readable);
+
+ if (!interactive) {
+@@ -553,6 +568,7 @@ int zap_to(unsigned int adapter, unsigne
+ close(audiofd);
+ close(dmxfda);
+ close(dmxfdv);
++ close(dmxfdt);
+ close(fefd);
+ }
+
+@@ -581,14 +597,14 @@ static int read_channels(const char *fil
+ int bypass, unsigned int delsys,
+ int modulation, int fec, int rolloff,
+ int human_readable, int params_debug,
+- int use_vdr_format)
++ int use_vdr_format, int use_tpid)
+ {
+ FILE *cfp;
+ char buf[4096];
+ char inp[256];
+ char *field, *tmp, *p;
+ unsigned int line;
+- unsigned int freq, pol, sat_no, sr, vpid, apid, sid;
++ unsigned int freq, pol, sat_no, sr, vpid, apid, tpid, sid;
+ int ret;
+ int trash;
+ again:
+@@ -751,11 +767,14 @@ again:
+ if (!apid)
+ apid = 0x1fff;
+
++ tpid = -1;
+ if (use_vdr_format) {
+ if (!(field = strsep(&tmp, ":")))
+ goto syntax_err;
+
+- strtoul(field, NULL, 0);
++ if (use_tpid)
++ tpid = strtoul(field, NULL, 0);
++
+ if (!(field = strsep(&tmp, ":")))
+ goto syntax_err;
+
+@@ -806,7 +825,7 @@ again:
+ }
+
+ ret = zap_to(adapter, frontend, demux, sat_no, freq * 1000,
+- pol, sr, vpid, apid, sid, dvr, rec_psi, bypass,
++ pol, sr, vpid, apid, tpid, sid, dvr, rec_psi, bypass,
+ delsys, modulation, fec, rolloff, human_readable);
+
+ if (interactive)
+@@ -878,6 +897,8 @@ int main(int argc, char *argv[])
+ int human_readable = 0;
+ int params_debug = 0;
+ int use_vdr_format = 0;
++ int use_tpid = 0;
++
+
+ int delsys = -1;
+ int modulation = -1;
+@@ -885,7 +906,7 @@ int main(int argc, char *argv[])
+ int rolloff = -1;
+
+ lnb_type = *lnb_enum(0);
+- while ((opt = getopt(argc, argv, "M:C:O:HDVhqrpn:a:f:d:S:c:l:xib")) != -1) {
++ while ((opt = getopt(argc, argv, "M:C:O:HDVhqrpn:a:f:d:S:c:l:xibt")) != -1) {
+ switch (opt) {
+ case '?':
+ case 'h':
+@@ -951,6 +972,9 @@ int main(int argc, char *argv[])
+ case 'V':
+ use_vdr_format = 1;
+ break;
++ case 't':
++ use_tpid = 1;
++ break;
+ case 'i':
+ interactive = 1;
+ exit_after_tuning = 1;
+@@ -993,7 +1017,8 @@ int main(int argc, char *argv[])
+
+ if (!read_channels(chanfile, list_channels, chan_no, chan_name,
+ adapter, frontend, demux, dvr, rec_psi, bypass, delsys,
+- modulation, fec, rolloff, human_readable, params_debug, use_vdr_format))
++ modulation, fec, rolloff, human_readable, params_debug,
++ use_vdr_format, use_tpid))
+
+ return TRUE;
+
diff --git a/multimedia/szap-s2/pkg-descr b/multimedia/szap-s2/pkg-descr
new file mode 100644
index 000000000000..b70e15e98dd9
--- /dev/null
+++ b/multimedia/szap-s2/pkg-descr
@@ -0,0 +1,16 @@
+szap-s2 is a command line channel zapping (i.e. tuning) utility similar
+to szap but including support for S2API a.k.a. DVB API version 5, which
+supports DVB-S2. When using szap-s2, one instructs it to change the channel
+to one of a list of channels supplied in a channels.conf type file.
+
+There is no manpage yet, but you can run szap-s2 without args to get a
+usage message.
+
+location of channel list file is ~/.szap/channels.conf
+
+one line of the szap channel file has the following format:
+name:frequency_MHz:polarization[coderate][delivery][modulation][rolloff]:sat_no:symbolrate:vpid:apid:service_id
+one line of the VDR channel file has the following format:
+name:frequency_MHz:polarization[coderate][delivery][modulation][rolloff]:sat_no:symbolrate:vpid:apid:tpid:?:service_id:?:?:?
+
+WWW: http://www.linuxtv.org/wiki/index.php/Szap-s2