132 |
132 |
|
133 |
133 |
htsbuf_queue_init(&q, 0);
|
134 |
134 |
|
135 |
|
pthread_mutex_lock(&global_lock);
|
|
135 |
if (satip_server_conf.satip_force_tuners)
|
|
136 |
{
|
|
137 |
tvhwarn("satips", "SAT>IP server forcing the number of exported tuners");
|
|
138 |
}
|
|
139 |
else
|
|
140 |
{
|
|
141 |
pthread_mutex_lock(&global_lock);
|
136 |
142 |
LIST_FOREACH(mn, &mpegts_network_all, mn_global_link) {
|
137 |
143 |
if (mn->mn_satip_source == 0)
|
138 |
144 |
continue;
|
... | ... | |
157 |
163 |
}
|
158 |
164 |
#endif
|
159 |
165 |
}
|
|
166 |
pthread_mutex_unlock(&global_lock);
|
|
167 |
}
|
160 |
168 |
for (p = xtab; p->id; p++) {
|
161 |
169 |
i = *p->cptr;
|
162 |
170 |
if (i > 0) {
|
163 |
171 |
tuners += i;
|
164 |
|
if (*p->count && i > 0) {
|
|
172 |
if ((*p->count && i > 0) || (satip_server_conf.satip_force_tuners && (i>0))) {
|
165 |
173 |
htsbuf_qprintf(&q, "%s%s-%d", delim ? "," : "", p->id, i);
|
166 |
174 |
delim++;
|
167 |
175 |
}
|
168 |
176 |
}
|
169 |
177 |
}
|
170 |
|
pthread_mutex_unlock(&global_lock);
|
171 |
178 |
if (!dvbs)
|
172 |
179 |
srcs = 0;
|
173 |
180 |
|
... | ... | |
669 |
676 |
.opts = PO_EXPERT,
|
670 |
677 |
.group = 1,
|
671 |
678 |
},
|
|
679 |
{
|
|
680 |
.type = PT_BOOL,
|
|
681 |
.id = "satip_force_tuners",
|
|
682 |
.name = N_("Force export tuners"),
|
|
683 |
.desc = N_("Force to export manual number of tuners specified "
|
|
684 |
"(Usually useful with the IPTV input and "
|
|
685 |
"without physical tuners)."),
|
|
686 |
.off = offsetof(struct satip_server_conf, satip_force_tuners),
|
|
687 |
.opts = PO_EXPERT,
|
|
688 |
.group = 1,
|
|
689 |
},
|
672 |
690 |
{
|
673 |
691 |
.type = PT_INT,
|
674 |
692 |
.id = "satip_dvbs",
|
675 |
|
-- tvheadend/src/satip/server.h 2016-03-31 02:09:00.072138238 +0200
|
|
693 |
++ tvheadend/src/satip/server.h 2016-03-31 01:58:43.604108842 +0200
|
... | ... | |
53 |
53 |
int satip_dvbc2;
|
54 |
54 |
int satip_atsc_t;
|
55 |
55 |
int satip_atsc_c;
|
|
56 |
int satip_force_tuners;
|
56 |
57 |
char *satip_nat_ip;
|
57 |
58 |
};
|
58 |
59 |
|