summaryrefslogtreecommitdiffstats
path: root/stream
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 /stream
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 'stream')
-rw-r--r--stream/http.c1
-rw-r--r--stream/network.c11
-rw-r--r--stream/network.h10
-rw-r--r--stream/stream_lavf.c3
-rw-r--r--stream/stream_udp.c1
5 files changed, 3 insertions, 23 deletions
diff --git a/stream/http.c b/stream/http.c
index 2ec7c9d58c..d17261910f 100644
--- a/stream/http.c
+++ b/stream/http.c
@@ -35,6 +35,7 @@
#include "http.h"
#include "url.h"
+#include "core/options.h"
#include "core/mp_msg.h"
#include "stream.h"
diff --git a/stream/network.c b/stream/network.c
index 371b7f52cd..101e4507ab 100644
--- a/stream/network.c
+++ b/stream/network.c
@@ -47,17 +47,6 @@
#include "cookies.h"
#include "url.h"
-/* Variables for the command line option -user, -passwd, -bandwidth,
- -user-agent and -nocookies */
-
-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;
-
/* IPv6 options */
int network_ipv4_only_proxy = 0;
diff --git a/stream/network.h b/stream/network.h
index a2d1d3d173..65ec3d41d9 100644
--- a/stream/network.h
+++ b/stream/network.h
@@ -61,16 +61,6 @@ typedef struct {
extern const mime_struct_t mime_type_table[];
-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 int network_prefer_ipv4;
extern int network_ipv4_only_proxy;
extern int reuse_socket;
diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c
index a21b46c46d..640c719109 100644
--- a/stream/stream_lavf.c
+++ b/stream/stream_lavf.c
@@ -21,6 +21,7 @@
#include <libavutil/opt.h>
#include "config.h"
+#include "core/options.h"
#include "core/mp_msg.h"
#include "stream.h"
#include "core/m_option.h"
@@ -178,7 +179,6 @@ static int open_f(stream_t *stream, int mode, void *opts, int *file_format)
filename = talloc_asprintf(temp, "mmsh://%.*s", BSTR_P(b_filename));
}
-#ifdef CONFIG_NETWORKING
// HTTP specific options (other protocols ignore them)
if (network_useragent)
av_dict_set(&dict, "user-agent", network_useragent, 0);
@@ -197,7 +197,6 @@ static int open_f(stream_t *stream, int mode, void *opts, int *file_format)
}
if (strlen(cust_headers))
av_dict_set(&dict, "headers", cust_headers, 0);
-#endif
av_dict_set(&dict, "icy", "1", 0);
int err = avio_open2(&avio, filename, flags, NULL, &dict);
diff --git a/stream/stream_udp.c b/stream/stream_udp.c
index d447a9238c..f3a3918e63 100644
--- a/stream/stream_udp.c
+++ b/stream/stream_udp.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <string.h>
+#include "core/options.h"
#include "stream.h"
#include "url.h"
#include "udp.h"