aboutsummaryrefslogtreecommitdiffstats
path: root/util/szap/szap.c
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2013-09-17 00:36:05 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2013-09-17 00:36:05 +0100
commit60584e13787af008063469fba29334090d56d8d4 (patch)
tree0cc62ecfe2e6b91d5b758f8813b0374c098b0541 /util/szap/szap.c
parent5501530a778ad588a8ccd3f1584ea58f74c0cec9 (diff)
downloadlinux-dvb-apps-a458528edafa1cb5702dbc7654a6ea86b629d14a.tar.gz
Imported Upstream version 1.1.1+rev1500upstream/1.1.1+rev1500upstream
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);