]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
tvhdhomerun: Add ATSC type for device-override
authorPatric Karlstrom <pakar@imperialnet.org>
Sun, 6 Jul 2014 20:45:52 +0000 (22:45 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 14 Oct 2014 12:12:52 +0000 (14:12 +0200)
src/input/mpegts/tvhdhomerun/tvhdhomerun.c
src/input/mpegts/tvhdhomerun/tvhdhomerun_frontend.c

index f2f25a77331a3c1a24b1df9b0f7c03bc38b7af1f..b330f6a5dece98307fa8fb9e39febc0c342b17ff 100644 (file)
@@ -75,6 +75,7 @@ tvhdhomerun_device_class_override_enum( void * p )
   htsmsg_t *m = htsmsg_create_list();
   htsmsg_add_str(m, NULL, "DVB-T");
   htsmsg_add_str(m, NULL, "DVB-C");
+  htsmsg_add_str(m, NULL, "ATSC");
   return m;
 }
 
@@ -239,7 +240,7 @@ static void tvhdhomerun_device_create(struct hdhomerun_discover_device_t *dInfo)
     const char *override_type = htsmsg_get_str(conf, "fe_override");
     if ( override_type != NULL) {
       type = dvb_str2type(override_type);
-      if ( ! ( type == DVB_TYPE_C || type == DVB_TYPE_T ) ) {
+      if ( ! ( type == DVB_TYPE_C || type == DVB_TYPE_T  || type == DVB_TYPE_ATSC ) ) {
         type = DVB_TYPE_C;
       }
     }
index 3306341f50b3ca20f13872e7e38a2140116862dd..4d879c7e6adc08808594f742f9c0ab57a3cec259 100644 (file)
@@ -415,6 +415,8 @@ tvhdhomerun_frontend_network_list ( mpegts_input_t *mi )
     idc = &dvb_network_dvbt_class;
   else if (hfe->hf_type == DVB_TYPE_C)
     idc = &dvb_network_dvbc_class;
+  else if (hfe->hf_type == DVB_TYPE_ATSC)
+       idc = &dvb_network_atsc_class;
   else
     return NULL;
 
@@ -486,6 +488,16 @@ const idclass_t tvhdhomerun_frontend_dvbc_class =
   }
 };
 
+const idclass_t tvhdhomerun_frontend_atsc_class =
+{
+  .ic_super      = &tvhdhomerun_frontend_class,
+  .ic_class      = "tvhdhomerun_frontend_atsc",
+  .ic_caption    = "HDHomeRun ATSC Frontend",
+  .ic_properties = (const property_t[]){
+    {}
+  }
+};
+
 void
 tvhdhomerun_frontend_delete ( tvhdhomerun_frontend_t *hfe )
 {
@@ -532,7 +544,9 @@ tvhdhomerun_frontend_create(tvhdhomerun_device_t *hd, struct hdhomerun_discover_
     idc = &tvhdhomerun_frontend_dvbt_class;
   else if (type == DVB_TYPE_C)
     idc = &tvhdhomerun_frontend_dvbc_class;
-  else {
+  else if (type == DVB_TYPE_ATSC) {
+       idc = &tvhdhomerun_frontend_atsc_class;
+  } else {
     tvherror("stvhdhomerun", "unknown FE type %d", type);
     return NULL;
   }