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 += -I$(CURDIR)/../install/include
CFLAGS += -Wno-deprecated-declarations CFLAGS += -Wno-deprecated-declarations
CFLAGS += -D_LARGEFILE64_SOURCE CFLAGS += -D_LARGEFILE64_SOURCE
CFLAGS += -DENABLE_INPUT_IPTV -DENABLE_INPUT_DVB
LDFLAGS += -L$(CURDIR)/../install/lib LDFLAGS += -L$(CURDIR)/../install/lib
DLIBS += -lhts DLIBS += -lhts

View file

@ -84,7 +84,7 @@ transportcmp(th_transport_t *a, th_transport_t *b)
static void static void
service_load(struct config_head *head) service_load(struct config_head *head)
{ {
const char *name, *v, *mux; const char *name, *v;
pidinfo_t pids[10]; pidinfo_t pids[10];
int i, npids = 0; int i, npids = 0;
th_transport_t *t; th_transport_t *t;
@ -98,21 +98,24 @@ service_load(struct config_head *head)
t = calloc(1, sizeof(th_transport_t)); t = calloc(1, sizeof(th_transport_t));
if((mux = config_get_str_sub(head, "dvbmux", NULL)) != NULL) { if(0) {
if(dvb_configure_transport(t, mux)) { #ifdef ENABLE_INPUT_DVB
free(t); } else if((v = config_get_str_sub(head, "dvbmux", NULL)) != NULL) {
return; if(dvb_configure_transport(t, v)) {
}
#ifdef HAVE_IPTV
} else if((mux = config_get_str_sub(head, "iptvmux", NULL)) != NULL) {
if(iptv_configure_transport(t, mux)) {
free(t); free(t);
return; return;
} }
#endif #endif
#ifdef HAVE_V4L #ifdef ENABLE_INPUT_IPTV
} else if((mux = config_get_str_sub(head, "v4lmux", NULL)) != NULL) { } else if((v = config_get_str_sub(head, "iptvmux", NULL)) != NULL) {
if(v4l_configure_transport(t, mux)) { 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); free(t);
return; 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) if((ce = find_mux_config("iptvmux", muxname)) == NULL)
return -1; return -1;
printf("Added IPTV mux\n");
t->tht_type = TRANSPORT_IPTV; t->tht_type = TRANSPORT_IPTV;
if((s = config_get_str_sub(&ce->ce_sub, "group-address", NULL)) == NULL) 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; return;
switch(t->tht_type) { switch(t->tht_type) {
#ifdef ENABLE_INPUT_DVB
case TRANSPORT_DVB: case TRANSPORT_DVB:
dvb_stop_feed(t); dvb_stop_feed(t);
break; break;
#endif
#ifdef ENABLE_IPTV #ifdef ENABLE_INPUT_IPTV
case TRANSPORT_IPTV: case TRANSPORT_IPTV:
iptv_stop_feed(t); iptv_stop_feed(t);
break; break;
#endif #endif
#ifdef ENABLE_INPUT_V4L
#ifdef ENABLE_V4L
case TRANSPORT_V4L: case TRANSPORT_V4L:
v4l_stop_feed(t); v4l_stop_feed(t);
break; break;
@ -107,14 +107,15 @@ transport_start(th_transport_t *t, unsigned int weight)
t->tht_monitor_suspend = 10; t->tht_monitor_suspend = 10;
switch(t->tht_type) { switch(t->tht_type) {
#ifdef ENABLE_INPUT_DVB
case TRANSPORT_DVB: case TRANSPORT_DVB:
return dvb_start_feed(t, weight); return dvb_start_feed(t, weight);
#ifdef ENABLE_IPTV #endif
#ifdef ENABLE_INPUT_IPTV
case TRANSPORT_IPTV: case TRANSPORT_IPTV:
return iptv_start_feed(t, weight); return iptv_start_feed(t, weight);
#endif #endif
#ifdef ENABLE_INPUT_V4L
#ifdef ENABLE_V4L
case TRANSPORT_V4L: case TRANSPORT_V4L:
return v4l_start_feed(t, weight); return v4l_start_feed(t, weight);
#endif #endif