Fix 'ENABLE_INPUT_' defines

This commit is contained in:
Andreas Öman 2007-08-11 05:37:56 +00:00
parent 4eb7ae97f7
commit 8cb73de479
4 changed files with 26 additions and 20 deletions

View file

@ -15,7 +15,7 @@ CFLAGS += -g -Wall -Werror -O2
CFLAGS += -I$(CURDIR)/../install/include
CFLAGS += -Wno-deprecated-declarations
CFLAGS += -D_LARGEFILE64_SOURCE
CFLAGS += -DENABLE_INPUT_IPTV -DENABLE_INPUT_DVB
LDFLAGS += -L$(CURDIR)/../install/lib
DLIBS += -lhts

View file

@ -84,7 +84,7 @@ transportcmp(th_transport_t *a, th_transport_t *b)
static void
service_load(struct config_head *head)
{
const char *name, *v, *mux;
const char *name, *v;
pidinfo_t pids[10];
int i, npids = 0;
th_transport_t *t;
@ -98,21 +98,24 @@ service_load(struct config_head *head)
t = calloc(1, sizeof(th_transport_t));
if((mux = config_get_str_sub(head, "dvbmux", NULL)) != NULL) {
if(dvb_configure_transport(t, mux)) {
free(t);
return;
}
#ifdef HAVE_IPTV
} else if((mux = config_get_str_sub(head, "iptvmux", NULL)) != NULL) {
if(iptv_configure_transport(t, mux)) {
if(0) {
#ifdef ENABLE_INPUT_DVB
} else if((v = config_get_str_sub(head, "dvbmux", NULL)) != NULL) {
if(dvb_configure_transport(t, v)) {
free(t);
return;
}
#endif
#ifdef HAVE_V4L
} else if((mux = config_get_str_sub(head, "v4lmux", NULL)) != NULL) {
if(v4l_configure_transport(t, mux)) {
#ifdef ENABLE_INPUT_IPTV
} else if((v = config_get_str_sub(head, "iptvmux", NULL)) != NULL) {
if(iptv_configure_transport(t, v)) {
free(t);
return;
}
#endif
#ifdef ENABLE_INPUT_V4L
} else if((v = config_get_str_sub(head, "v4lmux", NULL)) != NULL) {
if(v4l_configure_transport(t, v)) {
free(t);
return;
}

View file

@ -133,6 +133,8 @@ iptv_configure_transport(th_transport_t *t, const char *muxname)
if((ce = find_mux_config("iptvmux", muxname)) == NULL)
return -1;
printf("Added IPTV mux\n");
t->tht_type = TRANSPORT_IPTV;
if((s = config_get_str_sub(&ce->ce_sub, "group-address", NULL)) == NULL)

View file

@ -76,17 +76,17 @@ transport_purge(th_transport_t *t)
return;
switch(t->tht_type) {
#ifdef ENABLE_INPUT_DVB
case TRANSPORT_DVB:
dvb_stop_feed(t);
break;
#ifdef ENABLE_IPTV
#endif
#ifdef ENABLE_INPUT_IPTV
case TRANSPORT_IPTV:
iptv_stop_feed(t);
break;
#endif
#ifdef ENABLE_V4L
#ifdef ENABLE_INPUT_V4L
case TRANSPORT_V4L:
v4l_stop_feed(t);
break;
@ -107,14 +107,15 @@ transport_start(th_transport_t *t, unsigned int weight)
t->tht_monitor_suspend = 10;
switch(t->tht_type) {
#ifdef ENABLE_INPUT_DVB
case TRANSPORT_DVB:
return dvb_start_feed(t, weight);
#ifdef ENABLE_IPTV
#endif
#ifdef ENABLE_INPUT_IPTV
case TRANSPORT_IPTV:
return iptv_start_feed(t, weight);
#endif
#ifdef ENABLE_V4L
#ifdef ENABLE_INPUT_V4L
case TRANSPORT_V4L:
return v4l_start_feed(t, weight);
#endif