Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
IPTV: Allow to specify a custom mux name for IPTV mux
  • Loading branch information
perexg committed Aug 1, 2014
1 parent 294fe5e commit bcb8373
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/input/mpegts/iptv/iptv_mux.c
Expand Up @@ -101,7 +101,13 @@ const idclass_t iptv_mux_class =
},
{
.type = PT_STR,
.id = "iptv_svcname",
.id = "iptv_muxname",
.name = "Mux Name",
.off = offsetof(iptv_mux_t, mm_iptv_muxname),
},
{
.type = PT_STR,
.id = "iptv_sname",
.name = "Service Name",
.off = offsetof(iptv_mux_t, mm_iptv_svcname),
},
Expand Down Expand Up @@ -142,9 +148,13 @@ static void
iptv_mux_display_name ( mpegts_mux_t *mm, char *buf, size_t len )
{
iptv_mux_t *im = (iptv_mux_t*)mm;
if(im->mm_iptv_url_sane)
if(im->mm_iptv_muxname) {
strncpy(buf, im->mm_iptv_muxname, len);
buf[len-1] = '\0';
} else if(im->mm_iptv_url_sane) {
strncpy(buf, im->mm_iptv_url_sane, len);
else
buf[len-1] = '\0';
} else
*buf = 0;
}

Expand Down
1 change: 1 addition & 0 deletions src/input/mpegts/iptv/iptv_private.h
Expand Up @@ -83,6 +83,7 @@ struct iptv_mux

int mm_iptv_atsc;

char *mm_iptv_muxname;
char *mm_iptv_svcname;

sbuf_t mm_iptv_buffer;
Expand Down

0 comments on commit bcb8373

Please sign in to comment.