From feaa721916303c36dcd676c11ac74ecdec2db006 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 7 Jul 2013 18:47:39 +0200 Subject: core: make network options available even if old net code is disabled Preparation for removing the old network code. --- stream/http.c | 1 + stream/network.c | 11 ----------- stream/network.h | 10 ---------- stream/stream_lavf.c | 3 +-- stream/stream_udp.c | 1 + 5 files changed, 3 insertions(+), 23 deletions(-) (limited to 'stream') 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 #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 #include +#include "core/options.h" #include "stream.h" #include "url.h" #include "udp.h" -- cgit v1.2.3