]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Issue #1446 - fix --disable-linuxdvb.
authorAdam Sutton <dev@adamsutton.me.uk>
Wed, 19 Dec 2012 22:27:04 +0000 (22:27 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Wed, 19 Dec 2012 22:30:16 +0000 (22:30 +0000)
Makefile
src/capmt.c
src/epggrab.c
src/main.c
src/webui/statedump.c
src/webui/webui.c

index 6e4edae063eaf35863df05def0c6b0ca090376da..3d8fab24f89c82e286b1f5c2bae9db4e068cf820 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -106,16 +106,16 @@ SRCS =  src/main.c \
        src/avc.c \
   src/huffman.c \
   src/filebundle.c \
-  src/muxes.c \
   src/config2.c \
   src/lang_codes.c \
   src/lang_str.c \
 
 SRCS += src/epggrab/module.c\
   src/epggrab/channel.c\
-  src/epggrab/otamux.c\
   src/epggrab/module/pyepg.c\
   src/epggrab/module/xmltv.c\
+
+SRCS-$(CONFIG_LINUXDVB) += src/epggrab/otamux.c\
   src/epggrab/module/eit.c \
   src/epggrab/module/opentv.c \
   src/epggrab/support/freesat_huffman.c \
@@ -160,6 +160,7 @@ SRCS-${CONFIG_LINUXDVB} += \
        src/dvb/dvb_input_filtered.c \
        src/dvb/dvb_input_raw.c \
        src/webui/extjs_dvb.c \
+       src/muxes.c \
 
 # V4L
 SRCS-${CONFIG_V4L} += \
index f10778b35268085ff7818bfac16d3ac8e521feb0..6da676cdc00e6ee3e10aa209fe5cad7b1626a946 100644 (file)
@@ -572,7 +572,6 @@ capmt_thread(void *aux)
   capmt_t *capmt = aux;
   struct timespec ts;
   int d, i, bind_ok = 0;
-  th_dvb_adapter_t *tda;
 
   while (capmt->capmt_running) {
     for (i = 0; i < MAX_CA; i++)
@@ -605,6 +604,8 @@ capmt_thread(void *aux)
       if (!capmt->capmt_oscam) {
         bind_ok = capmt_create_udp_socket(&capmt->capmt_sock_ca0[0], capmt->capmt_port);
       } else {
+#if ENABLE_LINUXDVB
+        th_dvb_adapter_t *tda;
         TAILQ_FOREACH(tda, &dvb_adapters, tda_global_link) {
           if (tda->tda_rootpath) {          //if rootpath is NULL then can't rely on tda_adapter_num because it is always 0
             if (tda->tda_adapter_num > MAX_CA) {
@@ -615,6 +616,7 @@ capmt_thread(void *aux)
             bind_ok = capmt_create_udp_socket(&capmt->capmt_sock_ca0[tda->tda_adapter_num], 9000 + tda->tda_adapter_num);
           }
         }
+#endif
       }
       if (bind_ok)
         handle_ca0(capmt);
index 9d0dcb0f114e3588e3a0903572bdbb14241baa3f..aa085a0756f6d45ecd800c7ea68e68715e5e635e 100644 (file)
@@ -213,8 +213,10 @@ static void _epggrab_load ( void )
   }
  
   /* Load module config (channels) */
+#if ENABLE_LINUXDVB
   eit_load();
   opentv_load();
+#endif
   pyepg_load();
   xmltv_load();
 }
@@ -343,21 +345,27 @@ void epggrab_resched ( void )
 void epggrab_init ( void )
 {
   /* Lists */
+#if ENABLE_LINUXDVB
   extern TAILQ_HEAD(, epggrab_ota_mux) ota_mux_all;
   TAILQ_INIT(&ota_mux_all);
+#endif
 
   pthread_mutex_init(&epggrab_mutex, NULL);
   pthread_cond_init(&epggrab_cond, NULL);
   
   /* Initialise modules */
+#if ENABLE_LINUXDVB
   eit_init();
   opentv_init();
+#endif
   pyepg_init();
   xmltv_init();
 
   /* Load config */
   _epggrab_load();
+#if ENABLE_LINUXDVB
   epggrab_ota_load();
+#endif
 
   /* Start internal grab thread */
   pthread_t      tid;
index 0a6a199c787c2177949de42fc1054084193a211c..564e592cbd6f12576c1e947f74a914502847a4d7 100644 (file)
@@ -275,7 +275,9 @@ main(int argc, char **argv)
   sigset_t set;
   const char *homedir;
   const char *rawts_input = NULL;
+#if ENABLE_LINUXDVB
   const char *dvb_rawts_input = NULL;
+#endif
   const char *join_transport = NULL;
   const char *confpath = NULL;
   char *p, *endp;
@@ -356,9 +358,11 @@ main(int argc, char **argv)
     case 'r':
       rawts_input = optarg;
       break;
+#if ENABLE_LINUXDVB
     case 'R':
       dvb_rawts_input = optarg;
       break;
+#endif
     case 'j':
       join_transport = optarg;
       break;
@@ -446,8 +450,6 @@ main(int argc, char **argv)
 
   config_init();
 
-  muxes_init();
-
   service_init();
 
   channels_init();
@@ -456,16 +458,19 @@ main(int argc, char **argv)
 
   access_init(createdefault);
 
-  tcp_server_init();
 #if ENABLE_LINUXDVB
+  muxes_init();
   dvb_init(adapter_mask, dvb_rawts_input);
 #endif
+
   iptv_input_init();
+
 #if ENABLE_V4L
   v4l_init();
 #endif
-  http_server_init();
 
+  tcp_server_init();
+  http_server_init();
   webui_init();
 
   serviceprobe_init();
index a9758e6f389e2e4e5b175412d547dd5ce6f0f198..603fd15843fba6659e46df047aa6cb19334102ba 100644 (file)
@@ -29,6 +29,7 @@
 #include "access.h"
 #include "epg.h"
 #include "psi.h"
+#include "channels.h"
 #if ENABLE_LINUXDVB
 #include "dvr/dvr.h"
 #include "dvb/dvb.h"
index 6e5ab39c838fd6f82a219bcb33ce236cf2841b07..170127cf86f6c2f793d744a3237ee7b9e50be651 100644 (file)
@@ -597,6 +597,7 @@ http_stream_service(http_connection_t *hc, service_t *service)
 /**
  * Subscribes to a service and starts the streaming loop
  */
+#if ENABLE_LINUXDVB
 static int
 http_stream_tdmi(http_connection_t *hc, th_dvb_mux_instance_t *tdmi)
 {
@@ -616,6 +617,7 @@ http_stream_tdmi(http_connection_t *hc, th_dvb_mux_instance_t *tdmi)
 
   return 0;
 }
+#endif
 
 
 /**
@@ -698,7 +700,9 @@ http_stream(http_connection_t *hc, const char *remain, void *opaque)
   char *components[2];
   channel_t *ch = NULL;
   service_t *service = NULL;
+#if ENABLE_LINUXDVB
   th_dvb_mux_instance_t *tdmi = NULL;
+#endif
 
   hc->hc_keep_alive = 0;
 
@@ -722,16 +726,20 @@ http_stream(http_connection_t *hc, const char *remain, void *opaque)
     ch = channel_find_by_name(components[1], 0, 0);
   } else if(!strcmp(components[0], "service")) {
     service = service_find_by_identifier(components[1]);
+#if ENABLE_LINUXDVB
   } else if(!strcmp(components[0], "mux")) {
     tdmi = dvb_mux_find_by_identifier(components[1]);
+#endif
   }
 
   if(ch != NULL) {
     return http_stream_channel(hc, ch);
   } else if(service != NULL) {
     return http_stream_service(hc, service);
+#if ENABLE_LINUXDVB
   } else if(tdmi != NULL) {
     return http_stream_tdmi(hc, tdmi);
+#endif
   } else {
     http_error(hc, HTTP_STATUS_BAD_REQUEST);
     return HTTP_STATUS_BAD_REQUEST;