From: Mario Di Raimondo Date: Sun, 11 Oct 2015 15:55:18 +0000 (+0200) Subject: added tags for errors (%r) and data errors (%R) in DVR post-processing command-line X-Git-Tag: v4.2.1~1942 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d62c3a7aa7e6919115faef0b6aa17828b095821;p=thirdparty%2Ftvheadend.git added tags for errors (%r) and data errors (%R) in DVR post-processing command-line --- diff --git a/src/dvr/dvr_rec.c b/src/dvr/dvr_rec.c index 77b5f95e6..35c71611e 100644 --- a/src/dvr/dvr_rec.c +++ b/src/dvr/dvr_rec.c @@ -366,6 +366,22 @@ dvr_sub_start(const char *id, const void *aux, char *tmp, size_t tmplen) return dvr_do_prefix(id, buf, tmp, tmplen); } +static const char * +dvr_sub_errors(const char *id, const void *aux, char *tmp, size_t tmplen) +{ + char buf[16]; + snprintf(buf, sizeof(buf), "%"PRIu32, (uint32_t)((dvr_entry_t *)aux)->de_errors); + return dvr_do_prefix(id, buf, tmp, tmplen); +} + +static const char * +dvr_sub_data_errors(const char *id, const void *aux, char *tmp, size_t tmplen) +{ + char buf[16]; + snprintf(buf, sizeof(buf), "%"PRIu32, (uint32_t)((dvr_entry_t *)aux)->de_data_errors); + return dvr_do_prefix(id, buf, tmp, tmplen); +} + static const char * dvr_sub_stop(const char *id, const void *aux, char *tmp, size_t tmplen) { @@ -518,6 +534,8 @@ static htsstr_substitute_t dvr_subs_postproc_entry[] = { { .id = "O", .getval = dvr_sub_owner }, { .id = "S", .getval = dvr_sub_start }, { .id = "E", .getval = dvr_sub_stop }, + { .id = "r", .getval = dvr_sub_errors }, + { .id = "R", .getval = dvr_sub_data_errors }, { .id = NULL, .getval = NULL } };