Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
IPTV: Add priority value also for muxes
  • Loading branch information
perexg committed Aug 11, 2014
1 parent 2088863 commit d77ec6c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/html/config_muxes.html
Expand Up @@ -52,7 +52,8 @@
<dt>ATSC
<dd>whether or not this is an ATSC IPTV source.


<dt>Priority
<dd>IPTV : The mux priority value (higher value = higher priority to use services from this mux). Value 0 means use the IPTV network priority value.

</dl>
</div>
2 changes: 1 addition & 1 deletion src/input/mpegts/iptv/iptv.c
Expand Up @@ -174,7 +174,7 @@ iptv_input_get_priority ( mpegts_input_t *mi, mpegts_mux_t *mm )
{
iptv_mux_t *im = (iptv_mux_t *)mm;
iptv_network_t *in = (iptv_network_t *)im->mm_network;
return in->in_priority;
return im->mm_iptv_priority > 0 ? im->mm_iptv_priority : in->in_priority;
}

static int
Expand Down
8 changes: 8 additions & 0 deletions src/input/mpegts/iptv/iptv_mux.c
Expand Up @@ -80,6 +80,14 @@ const idclass_t iptv_mux_class =
.ic_class = "iptv_mux",
.ic_caption = "IPTV Multiplex",
.ic_properties = (const property_t[]){
{
.type = PT_INT,
.id = "priority",
.name = "Priority",
.off = offsetof(iptv_mux_t, mm_iptv_priority),
.def.i = 0,
.opts = PO_ADVANCED
},
{
.type = PT_STR,
.id = "iptv_url",
Expand Down
1 change: 1 addition & 0 deletions src/input/mpegts/iptv/iptv_private.h
Expand Up @@ -77,6 +77,7 @@ struct iptv_mux
{
mpegts_mux_t;

int mm_iptv_priority;
int mm_iptv_fd;
udp_connection_t *mm_iptv_connection;
char *mm_iptv_url;
Expand Down

0 comments on commit d77ec6c

Please sign in to comment.