summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-07 18:47:39 +0200
committerwm4 <wm4@nowhere>2013-07-07 19:40:35 +0200
commitfeaa721916303c36dcd676c11ac74ecdec2db006 (patch)
tree745578fb3c91e9c62ffb9596e1843e41cc29b31a /core
parent2c732a46ba37182692748acd2b72310d21c451f8 (diff)
downloadmpv-feaa721916303c36dcd676c11ac74ecdec2db006.tar.bz2
mpv-feaa721916303c36dcd676c11ac74ecdec2db006.tar.xz
core: make network options available even if old net code is disabled
Preparation for removing the old network code.
Diffstat (limited to 'core')
-rw-r--r--core/options.c10
-rw-r--r--core/options.h10
2 files changed, 18 insertions, 2 deletions
diff --git a/core/options.c b/core/options.c
index 5e1104d3e6..3a60e3c810 100644
--- a/core/options.c
+++ b/core/options.c
@@ -40,6 +40,14 @@
#include "mp_core.h"
#include "osdep/priority.h"
+char *network_username=NULL;
+char *network_password=NULL;
+int network_bandwidth=0;
+int network_cookies_enabled = 0;
+char *network_useragent="MPlayer 1.1-4.7";
+char *network_referrer=NULL;
+char **network_http_header_fields=NULL;
+
extern char *lirc_configfile;
extern int mp_msg_color;
@@ -343,7 +351,6 @@ const m_option_t mp_opts[] = {
{"bluray-angle", &bluray_angle, CONF_TYPE_INT, CONF_RANGE, 0, 999, NULL},
#endif /* CONFIG_LIBBLURAY */
-#ifdef CONFIG_NETWORKING
{"user", &network_username, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"passwd", &network_password, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"bandwidth", &network_bandwidth, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
@@ -358,7 +365,6 @@ const m_option_t mp_opts[] = {
#ifdef HAVE_AF_INET6
{"prefer-ipv6", &network_prefer_ipv4, CONF_TYPE_FLAG, 0, 1, 0, NULL},
#endif /* HAVE_AF_INET6 */
-#endif /* CONFIG_NETWORKING */
// ------------------------- demuxer options --------------------
diff --git a/core/options.h b/core/options.h
index 80398bae95..54048d9966 100644
--- a/core/options.h
+++ b/core/options.h
@@ -266,6 +266,16 @@ typedef struct MPOpts {
} encode_output;
} MPOpts;
+// Should be moved into MPOpts
+extern char **network_http_header_fields;
+extern char *network_username;
+extern char *network_password;
+extern int network_bandwidth;
+extern char *network_useragent;
+extern char *network_referrer;
+extern int network_cookies_enabled;
+extern char *cookies_file;
+
extern const m_option_t mp_opts[];
extern const struct MPOpts mp_default_opts;