Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mdhelp: add more property descriptions, add priority and streaming_pr…
…iority property docs
  • Loading branch information
Mark Clarkstone authored and perexg committed Aug 17, 2016
1 parent e37e64a commit dd8dbeb
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 2 deletions.
18 changes: 18 additions & 0 deletions docs/property/priority.md
@@ -0,0 +1,18 @@
:

The tuner (or network if using IPTV) with the highest priority value
will be used out of preference. If the tuner is busy the next available
with the highest priority value will be used.

An example:

Tuner | Tuner A | Tuner B | Tuner C
-----------------|---------|---------|--------
Priority | 100 | 50 | 80
Status | BUSY | IDLE | IDLE

In the above table *Tuner A* is busy so Tvheadend will have to use the
next available idle tuner which in this example is *Tuner B* and *Tuner C*
but because *Tuner C* has the higher priority of the two Tvheadend will
use that instead of *Tuner B*. If no priority value is set for any tuners
Tvheadend will use the first available idle tuner.
5 changes: 5 additions & 0 deletions docs/property/streaming_priority.md
@@ -0,0 +1,5 @@
:

Streaming priority is like the *Priority* setting (above) but only
applies when streaming over HTTP or HTSP. If no streaming priority value
is set (0) the priority value is used instead.
27 changes: 27 additions & 0 deletions src/input/mpegts/iptv/iptv.c
Expand Up @@ -699,6 +699,9 @@ iptv_network_class_icon_url_set( void *in, const void *v )
return iptv_url_set(&mn->in_icon_url, &mn->in_icon_url_sane, v, 1, 0);
}

PROP_DOC(priority)
PROP_DOC(streaming_priority)

extern const idclass_t mpegts_network_class;
const idclass_t iptv_network_class = {
.ic_super = &mpegts_network_class,
Expand All @@ -710,6 +713,7 @@ const idclass_t iptv_network_class = {
.type = PT_BOOL,
.id = "scan_create",
.name = N_("Scan after creation"),
.desc = N_("After creating the network scan it for services."),
.off = offsetof(iptv_network_t, in_scan_create),
.def.i = 1,
.opts = PO_ADVANCED
Expand All @@ -718,6 +722,7 @@ const idclass_t iptv_network_class = {
.type = PT_U16,
.id = "service_sid",
.name = N_("Service ID"),
.desc = N_("The network's service ID"),
.off = offsetof(iptv_network_t, in_service_id),
.def.i = 0,
.opts = PO_EXPERT
Expand All @@ -726,14 +731,22 @@ const idclass_t iptv_network_class = {
.type = PT_INT,
.id = "priority",
.name = N_("Priority"),
.desc = N_("The network's priority. The network with the "
"highest priority value will be used out of "
"preference if available. See Help for details."),
.off = offsetof(iptv_network_t, in_priority),
.doc = prop_doc_priority,
.def.i = 1,
.opts = PO_ADVANCED
},
{
.type = PT_INT,
.id = "spriority",
.name = N_("Streaming priority"),
.desc = N_("When streaming a service (via http or htsp) "
"Tvheadend will use the network with the highest "
"streaming priority set here. See Help for details."),
.doc = prop_doc_streaming_priority,
.off = offsetof(iptv_network_t, in_streaming_priority),
.def.i = 1,
.opts = PO_ADVANCED
Expand All @@ -742,20 +755,25 @@ const idclass_t iptv_network_class = {
.type = PT_U32,
.id = "max_streams",
.name = N_("Maximum # input streams"),
.desc = N_("The maximum number of input streams allowed "
"on this network."),
.off = offsetof(iptv_network_t, in_max_streams),
.def.i = 0,
},
{
.type = PT_U32,
.id = "max_bandwidth",
.name = N_("Maximum bandwidth (Kbps)"),
.desc = N_("Maximum input bandwidth."),
.off = offsetof(iptv_network_t, in_max_bandwidth),
.def.i = 0,
},
{
.type = PT_U32,
.id = "max_timeout",
.name = N_("Maximum timeout (seconds)"),
.desc = N_("Maximum time to wait (in seconds) for a stream "
"before a timeout."),
.off = offsetof(iptv_network_t, in_max_timeout),
.def.i = 15,
.opts = PO_ADVANCED
Expand All @@ -764,6 +782,7 @@ const idclass_t iptv_network_class = {
.type = PT_STR,
.id = "icon_url",
.name = N_("Icon base URL"),
.desc = N_("Icon base URL."),
.off = offsetof(iptv_network_t, in_icon_url),
.set = iptv_network_class_icon_url_set,
.opts = PO_MULTILINE | PO_ADVANCED
Expand Down Expand Up @@ -823,6 +842,7 @@ const idclass_t iptv_auto_network_class = {
.type = PT_STR,
.id = "url",
.name = N_("URL"),
.desc = N_("The URL to the playlist."),
.off = offsetof(iptv_network_t, in_url),
.set = iptv_auto_network_class_url_set,
.notify = iptv_auto_network_class_notify_url,
Expand All @@ -832,13 +852,15 @@ const idclass_t iptv_auto_network_class = {
.type = PT_BOOL,
.id = "bouquet",
.name = N_("Create bouquet"),
.desc = N_("Create a bouquet from the playlist."),
.off = offsetof(iptv_network_t, in_bouquet),
.notify = iptv_auto_network_class_notify_bouquet,
},
{
.type = PT_STR,
.id = "ctx_charset",
.name = N_("Content character set"),
.desc = N_("The playlist's character set."),
.off = offsetof(iptv_network_t, in_ctx_charset),
.list = iptv_auto_network_class_charset_list,
.notify = iptv_auto_network_class_notify_url,
Expand All @@ -849,12 +871,14 @@ const idclass_t iptv_auto_network_class = {
.intextra = CHANNEL_SPLIT,
.id = "channel_number",
.name = N_("Channel numbers from"),
.desc = N_("Lowest starting channel number."),
.off = offsetof(iptv_network_t, in_channel_number),
},
{
.type = PT_U32,
.id = "refetch_period",
.name = N_("Re-fetch period (mins)"),
.desc = N_("Time (in minutes) to re-fetch the playlist."),
.off = offsetof(iptv_network_t, in_refetch_period),
.def.i = 60,
.opts = PO_ADVANCED
Expand All @@ -863,6 +887,7 @@ const idclass_t iptv_auto_network_class = {
.type = PT_BOOL,
.id = "ssl_peer_verify",
.name = N_("SSL verify peer"),
.desc = N_("Verify the peer's SSL."),
.off = offsetof(iptv_network_t, in_ssl_peer_verify),
.opts = PO_EXPERT
},
Expand All @@ -876,6 +901,8 @@ const idclass_t iptv_auto_network_class = {
.type = PT_STR,
.id = "remove_args",
.name = N_("Remove HTTP arguments"),
.desc = N_("Key and value pairs to remove from the query "
"string in the URL."),
.off = offsetof(iptv_network_t, in_remove_args),
.def.s = "ticket",
.opts = PO_EXPERT
Expand Down
9 changes: 7 additions & 2 deletions src/input/mpegts/mpegts_input.c
Expand Up @@ -219,6 +219,9 @@ mpegts_input_class_linked_enum( void * self, const char *lang )
return m;
}

PROP_DOC(priority)
PROP_DOC(streaming_priority)

const idclass_t mpegts_input_class =
{
.ic_super = &tvh_input_class,
Expand All @@ -242,7 +245,8 @@ const idclass_t mpegts_input_class =
.id = "priority",
.name = N_("Priority"),
.desc = N_("The tuner priority value (a higher value means to "
"use this tuner out of preference)."),
"use this tuner out of preference). See Help for details."),
.doc = prop_doc_priority,
.off = offsetof(mpegts_input_t, mi_priority),
.def.i = 1,
.opts = PO_ADVANCED
Expand All @@ -254,7 +258,8 @@ const idclass_t mpegts_input_class =
.desc = N_("The tuner priority value for streamed channels "
"through HTTP or HTSP (a higher value means to use "
"this tuner out of preference). If not set (zero), "
"the standard priority value is used."),
"the standard priority value is used. See Help for details."),
.doc = prop_doc_streaming_priority,
.off = offsetof(mpegts_input_t, mi_streaming_priority),
.def.i = 1,
.opts = PO_ADVANCED
Expand Down

0 comments on commit dd8dbeb

Please sign in to comment.