aboutsummaryrefslogtreecommitdiffstats
path: root/util/szap/szap.c
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2013-09-17 00:36:06 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2013-09-17 00:36:06 +0100
commit1516b6d1f29a58a818c1bea4ea255a8b782b7360 (patch)
treeb6b72a56db2eb9bf1fba96634ea69222cb1d321f /util/szap/szap.c
parentba777477e09e25a9e106d843440b84c420254d05 (diff)
parent60584e13787af008063469fba29334090d56d8d4 (diff)
downloadlinux-dvb-apps-1516b6d1f29a58a818c1bea4ea255a8b782b7360.tar.gz
Merge tag 'upstream/1.1.1+rev1500'
Upstream version 1.1.1+rev1500
Diffstat (limited to '')
-rw-r--r--util/szap/szap.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/util/szap/szap.c b/util/szap/szap.c
index 9de752e..90bdbfb 100644
--- a/util/szap/szap.c
+++ b/util/szap/szap.c
@@ -166,7 +166,7 @@ static int do_tune(int fefd, unsigned int ifreq, unsigned int sr)
}
-static int check_frontend (int fe_fd, int dvr, int human_readable)
+static int monitor_frontend (int fe_fd, int dvr, int human_readable)
{
(void)dvr;
fe_status_t status;
@@ -220,9 +220,8 @@ int zap_to(unsigned int adapter, unsigned int frontend, unsigned int demux,
char fedev[128], dmxdev[128], auddev[128];
static int fefd, dmxfda, dmxfdv, audiofd = -1, patfd, pmtfd;
int pmtpid;
- uint32_t ifreq;
+ uint32_t ifreq, mstd;
int hiband, result;
- static struct dvb_frontend_info fe_info;
if (!fefd) {
snprintf(fedev, sizeof(fedev), FRONTENDDEVICE, adapter, frontend);
@@ -234,20 +233,11 @@ int zap_to(unsigned int adapter, unsigned int frontend, unsigned int demux,
perror("opening frontend failed");
return FALSE;
}
-
- result = ioctl(fefd, FE_GET_INFO, &fe_info);
- if (result < 0) {
- perror("ioctl FE_GET_INFO failed");
- close(fefd);
- return FALSE;
- }
-
- if (fe_info.type != FE_QPSK) {
- fprintf(stderr, "frontend device is not a QPSK (DVB-S) device!\n");
+ if (check_frontend(fefd, FE_QPSK, &mstd) < 0) {
close(fefd);
return FALSE;
}
-
+ /* TODO! Some frontends need to be explicit delivery system */
if ((dmxfdv = open(dmxdev, O_RDWR)) < 0) {
perror("opening video demux failed");
close(fefd);
@@ -322,7 +312,7 @@ int zap_to(unsigned int adapter, unsigned int frontend, unsigned int demux,
}
}
- check_frontend (fefd, dvr, human_readable);
+ monitor_frontend (fefd, dvr, human_readable);
if (!interactive) {
close(patfd);
close(pmtfd);