static int linuxdvb_ca_ca_info_callback(void *arg, uint8_t slot_id, uint16_t session_num, uint32_t ca_id_count, uint16_t *ca_ids) { linuxdvb_ca_t * lca = arg; uint32_t i; char buf[256]; size_t c = 0; dvbcam_unregister_cam(lca, 0); dvbcam_register_cam(lca, 0, ca_ids, ca_id_count); for(i=0; i< ca_id_count; i++) { tvh_strlcatf(buf, sizeof(buf), c, " %04X", ca_ids[i]); tvh_strlcatf(buf, sizeof(buf), c, " (%s)", caid2name(ca_ids[i])); } tvhinfo("en50221", "CAM slot %u supported CAIDs: %s", slot_id, buf); return 0; }
static void iptv_auto_network_process_m3u_item(iptv_network_t *in, const char *last_url, const http_arg_list_t *remove_args, int64_t chnum, htsmsg_t *item, int *total, int *count) { htsmsg_t *conf; htsmsg_field_t *f; mpegts_mux_t *mm; iptv_mux_t *im; url_t u; int change, epgcfg; http_arg_list_t args; http_arg_t *ra1, *ra2, *ra2_next; htsbuf_queue_t q; size_t l; int64_t chnum2; const char *url, *name, *logo, *epgid, *tags; char url2[512], custom[512], name2[128], buf[32], *n; url = htsmsg_get_str(item, "m3u-url"); if (url == NULL || (strncmp(url, "file://", 7) && strncmp(url, "pipe://", 7) && strncmp(url, "http://", 7) && strncmp(url, "https://", 8) && strncmp(url, "rtsp://", 7) && strncmp(url, "rtsps://", 8) && strncmp(url, "udp://", 6) && strncmp(url, "rtp://", 6))) return; epgid = htsmsg_get_str(item, "tvh-chnum"); chnum2 = epgid ? prop_intsplit_from_str(epgid, CHANNEL_SPLIT) : 0; if (chnum2 > 0) { chnum += chnum2; } else if (chnum) { if (chnum % CHANNEL_SPLIT) chnum += *total; else chnum += (int64_t)*total * CHANNEL_SPLIT; } name = htsmsg_get_str(item, "m3u-name"); if (name == NULL) name = ""; logo = htsmsg_get_str(item, "tvg-logo"); if (logo == NULL) logo = htsmsg_get_str(item, "logo"); epgid = htsmsg_get_str(item, "tvg-id"); epgcfg = _epgcfg_from_str(htsmsg_get_str(item, "tvh-epg")); tags = htsmsg_get_str(item, "tvh-tags"); if (!tags) tags = htsmsg_get_str(item, "group-title"); if (tags) { tags = n = strdupa(tags); while (*n) { if (*n == '|') *n = '\n'; n++; } } urlinit(&u); custom[0] = '\0'; if (strncmp(url, "pipe://", 7) == 0) goto skip_url; if (strncmp(url, "http://", 7) == 0 || strncmp(url, "https://", 8) == 0) { conf = htsmsg_get_list(item, "m3u-http-headers"); if (conf) { l = 0; HTSMSG_FOREACH(f, conf) if ((n = (char *)htsmsg_field_get_str(f)) != NULL) tvh_strlcatf(custom, sizeof(custom), l, "%s\n", n); } }