Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added tags for errors (%r) and data errors (%R) in DVR post-processin…
…g command-line
  • Loading branch information
mario-tux authored and perexg committed Oct 11, 2015
1 parent 36859b7 commit 1d62c3a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/dvr/dvr_rec.c
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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 }
};

Expand Down

0 comments on commit 1d62c3a

Please sign in to comment.