summaryrefslogtreecommitdiff
path: root/src/xine-engine/xine.c
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-07-03 10:55:37 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-07-03 10:55:37 +0000
commita040a7282a760eb3ee8dd627cf9280a0e8f72117 (patch)
tree4acdceaf6ee2901ae7c777104bb20785dfc940a5 /src/xine-engine/xine.c
parent8ffabdbc667bf05c313a295c34ac7a340b86a315 (diff)
downloadxine-lib-a040a7282a760eb3ee8dd627cf9280a0e8f72117.tar.gz
xine-lib-a040a7282a760eb3ee8dd627cf9280a0e8f72117.tar.bz2
Add a media.network.timeout configuration for a timeout while running select() on streams, to avoid getting frozen if trying to connect to an unreachable server (or if the connection is lost.
CVS patchset: 8087 CVS date: 2006/07/03 10:55:37
Diffstat (limited to 'src/xine-engine/xine.c')
-rw-r--r--src/xine-engine/xine.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 99c46d1e3..e6bf5f26d 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.c,v 1.323 2006/04/08 16:42:37 valtri Exp $
+ * $Id: xine.c,v 1.324 2006/07/03 10:55:37 dgp85 Exp $
*/
/*
@@ -1547,6 +1547,18 @@ void xine_init (xine_t *this) {
XINE_CONFIG_SECURITY, NULL, this);
/*
+ * timeout for network I/O to avoid freezes
+ */
+ this->config->register_num(this->config,
+ "media.network.timeout", 30,
+ _("Timeout for network stream reading (in seconds)"),
+ _("Specifies the timeout when reading from network streams, in seconds."
+ "Too low values might stop streaming when the source is slow or the"
+ "bandwidth is occupied, too high values will freeze the player if the"
+ "connection is lost."),
+ 0, NULL, this);
+
+ /*
* keep track of all opened streams
*/
this->streams = xine_list_new();