]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
epggrab: ota_create - pass the idclass to make things more configurable
authorJaroslav Kysela <perex@perex.cz>
Mon, 18 Dec 2017 08:23:12 +0000 (09:23 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 18 Dec 2017 08:39:10 +0000 (09:39 +0100)
src/epggrab/module.c
src/epggrab/module/eit.c
src/epggrab/module/opentv.c
src/epggrab/module/psip.c
src/epggrab/private.h

index 8a84c758c2bb57b5684a5fb8f8dd36396b21c2a9..5808b0d5613ca1b2375ca8c4c6aacf1a08ace7a9 100644 (file)
@@ -687,15 +687,14 @@ epggrab_module_ext_t *epggrab_module_ext_create
 epggrab_module_ota_t *epggrab_module_ota_create
   ( epggrab_module_ota_t *skel,
     const char *id, int subsys, const char *saveid,
-    const char *name, int priority, int with_scraper,
-    epggrab_ota_module_ops_t *ops )
+    const char *name, int priority, const idclass_t *idclass,
+    const epggrab_ota_module_ops_t *ops )
 {
   if (!skel) skel = calloc(1, sizeof(epggrab_module_ota_t));
 
   /* Pass through */
   epggrab_module_create((epggrab_module_t*)skel,
-                        with_scraper ?
-                          &epggrab_mod_ota_scraper_class : &epggrab_mod_ota_class,
+                        idclass ?: &epggrab_mod_ota_class,
                         id, subsys, saveid, name, priority);
 
   /* Setup */
index 5e1714051030136c8eada56756bc3b66920ad2cb..09dd233ce83afb3561c883b2878b31c1dd8bd780 100644 (file)
@@ -1246,8 +1246,8 @@ static eit_module_t *eit_module_ota_create
 {
   eit_module_t * mod = (eit_module_t *)
     epggrab_module_ota_create(calloc(1, sizeof(eit_module_t)),
-                              id, subsys, saveid,
-                              name, priority, 1, ops);
+                              id, subsys, saveid, name, priority,
+                              &epggrab_mod_ota_scraper_class, ops);
   return mod;
 }
 
index 01ca2846c481b08a116b64a25e32ad795f64c7ef..8609f27524457ecc0943397c4502df61da68b4ce 100644 (file)
@@ -941,7 +941,7 @@ static int _opentv_prov_load_one ( const char *id, htsmsg_t *m )
   sprintf(nbuf, "OpenTV: %s", name);
   mod = (opentv_module_t *)
     epggrab_module_ota_create(calloc(1, sizeof(opentv_module_t)),
-                              ibuf, LS_OPENTV, NULL, nbuf, 2, 0, &ops);
+                              ibuf, LS_OPENTV, NULL, nbuf, 2, NULL, &ops);
 
   /* Add provider details */
   mod->dict     = dict;
index 45cf2d6ef6175d90219d2cb8fedfec2d7d7d51c0..34c3f6cd5b6ff09e8fe9aa5c3cedb5c38fdd5fa7 100644 (file)
@@ -775,7 +775,8 @@ void psip_init ( void )
     .tune  = _psip_tune,
   };
 
-  epggrab_module_ota_create(NULL, "psip", LS_PSIP, NULL, "PSIP: ATSC Grabber", 1, 0, &ops);
+  epggrab_module_ota_create(NULL, "psip", LS_PSIP, NULL, "PSIP: ATSC Grabber",
+                            1, NULL, &ops);
 }
 
 void psip_done ( void )
index 346dca05f29cdf07da565010ea29513ce34590f8..7066394b85a0891e78cce7cca6041ad211876e9c 100644 (file)
@@ -111,8 +111,9 @@ typedef struct epggrab_ota_module_ops {
 epggrab_module_ota_t *epggrab_module_ota_create
   ( epggrab_module_ota_t *skel,
     const char *id, int subsys, const char *saveid,
-    const char *name, int priority, int with_scraper,
-    epggrab_ota_module_ops_t *ops );
+    const char *name, int priority,
+    const idclass_t *idclass,
+    const epggrab_ota_module_ops_t *ops );
 
 /* **************************************************************************
  * OTA mux link routines
@@ -196,6 +197,7 @@ extern const idclass_t epggrab_mod_ext_class;
 extern const idclass_t epggrab_mod_ext_pyepg_class;
 extern const idclass_t epggrab_mod_ext_xmltv_class;
 extern const idclass_t epggrab_mod_ota_class;
+extern const idclass_t epggrab_mod_ota_scraper_class;
 
 /* **************************************************************************
  * Module setup(s)