.opts = PO_EXPERT,
.group = 8,
},
+ {
+ .type = PT_BOOL,
+ .id = "auto_clear_input_counters",
+ .name = N_("Automatically clear input error counters"),
+ .desc = N_("Periodically resets input error counters "
+ "(when a new mux starts for the target tuner). "
+ "Note that previous counters will be lost."),
+ .off = offsetof(config_t, auto_clear_input_counters),
+ .opts = PO_EXPERT,
+ .group = 8,
+ },
{
.type = PT_STR,
.id = "muxconfpath",
uint32_t descrambler_buffer;
int caclient_ui;
int parser_backlog;
+ int auto_clear_input_counters;
int epg_compress;
uint32_t epg_cut_window;
uint32_t epg_update_window;
const char *scheme;
url_t url;
- /* Already active */
- if (im->mm_active)
+ /* Active? */
+ if (im->mm_active) {
return 0;
-
- /* Reset Error Counters */
- atomic_set(&mmi->tii_stats.unc, 0);
- atomic_set(&mmi->tii_stats.cc, 0);
- tvh_mutex_lock(&mmi->tii_stats_mutex);
- mmi->tii_stats.te = 0;
- mmi->tii_stats.ec_block = 0;
- mmi->tii_stats.tc_block = 0;
- tvh_mutex_unlock(&mmi->tii_stats_mutex);
+ }
/* Substitute things */
if (im->mm_iptv_substitute && raw) {
} else
#endif
- if (raw && !strncmp(raw, "pipe://", 7)) {
+ if (raw && !strncmp(raw, "pipe://", 7)) {
scheme = "pipe";
return ret;
}
- /* Start */
tvh_mutex_lock(&iptv_lock);
+ /* Already active */
+ if (im->mm_active) {
+ tvh_mutex_unlock(&iptv_lock);
+ urlreset(&url);
+ return 0;
+ }
+
+ /* Start */
s = im->mm_iptv_url_raw;
im->mm_iptv_url_raw = raw ? strdup(raw) : NULL;
if (im->mm_iptv_url_raw) {
#include "profile.h"
#include "dvb_charset.h"
#include "epggrab.h"
+#include "config.h"
#include <assert.h>
mm->mm_start_monoclock = mclk();
mi->mi_started_mux(mi, mmi);
+ /* Reset Error Counters */
+ if (config.auto_clear_input_counters && mmi->tii_clear_stats) {
+ mmi->tii_clear_stats((tvh_input_instance_t *)mmi);
+ }
+
/* Event handler */
mpegts_fire_event(mm, ml_mux_start);