Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
IPTV: add configurable stream timeout
  • Loading branch information
perexg committed May 14, 2014
1 parent 6dc94ef commit b857a84
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/input/mpegts/iptv/iptv.c
Expand Up @@ -161,6 +161,14 @@ iptv_input_get_weight ( mpegts_input_t *mi )

}

static int
iptv_input_get_grace ( 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_max_timeout;
}

static int
iptv_input_start_mux ( mpegts_input_t *mi, mpegts_mux_instance_t *mmi )
{
Expand Down Expand Up @@ -406,6 +414,13 @@ const idclass_t iptv_network_class = {
.off = offsetof(iptv_network_t, in_max_bandwidth),
.def.i = 0,
},
{
.type = PT_U32,
.id = "max_timeout",
.name = "Max timeout (seconds)",
.off = offsetof(iptv_network_t, in_max_timeout),
.def.i = 15,
},
{}
}
};
Expand Down Expand Up @@ -529,6 +544,7 @@ void iptv_init ( void )
iptv_input->mi_stop_mux = iptv_input_stop_mux;
iptv_input->mi_is_free = iptv_input_is_free;
iptv_input->mi_get_weight = iptv_input_get_weight;
iptv_input->mi_get_grace = iptv_input_get_grace;
iptv_input->mi_display_name = iptv_input_display_name;
iptv_input->mi_enabled = 1;

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

uint32_t in_max_streams;
uint32_t in_max_bandwidth;
uint32_t in_max_timeout;
};

iptv_network_t *iptv_network_create0 ( const char *uuid, htsmsg_t *conf );
Expand Down

7 comments on commit b857a84

@nmaclean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@perexg do you have a stream I can test with this? or post it in the forms?

@perexg
Copy link
Contributor Author

@perexg perexg commented on b857a84 May 15, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http://happytimes.me/atn/stream.php?id=%D6%1BcX%92s%29%19%174%06%F2%E3%3A%D3R

or you may try to use a tvheadend service URL ;-)

@nmaclean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesnt work... Am I doing something wrong - em1 is my interface name.

screenshot from 2014-05-15 09 18 55

@ckarrie
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nmaclean Its in the Network Settings:
bildschirmfoto 2014-05-15 um 13 32 55

@nmaclean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - I have added that, now adding the mux but get this? Can I see you mux settings for this?

2014-05-15 12:47:50.876 mpegts: http://happytimes.me/atn/stream.php?id=%D6%1BcX%92s%29%19%174%06%F2%E3%3A%D3R - starting for 'initscan' (weight 2)
2014-05-15 12:47:50.876 mpegts: http://happytimes.me/atn/stream.php?id=%D6%1BcX%92s%29%19%174%06%F2%E3%3A%D3R - tuning on IPTV
2014-05-15 12:47:51.090 subscription: 'initscan' subscribing to mux, weight: 2, adapter: 'IPTV', network: 'happytestme', mux: 'http://happytimes.me/atn/stream.php?id=%D6%1BcX%92s%29%19%174%06%F2%E3%3A%D3R'
2014-05-15 12:47:55.025 mpegts: http://happytimes.me/atn/stream.php?id=%D6%1BcX%92s%29%19%174%06%F2%E3%3A%D3R - initial scan no data, failed

@perexg
Copy link
Contributor Author

@perexg perexg commented on b857a84 May 15, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nmaclean : Increase the timeout value in the IPTV network settings dialog to 15 seconds.

@nmaclean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it works now. Thanks.

Please sign in to comment.