summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSam Hurst <Sam.Hurst@bbc.co.uk>2017-07-26 17:43:19 +0100
committerPhilippe Normand <philn@igalia.com>2017-07-26 18:57:38 +0100
commitb922edce7b6d659f114a34f6e78768e9165584e7 (patch)
treefb1834908d8485ad49a885128c2b974e8e0863a2 /ext
parentd3c8462e6c5760405b728ab48414a035d3172e08 (diff)
curl: Reorganise header files to fix macOS builds
https://bugzilla.gnome.org/show_bug.cgi?id=744261
Diffstat (limited to 'ext')
-rw-r--r--ext/curl/curltask.h1
-rw-r--r--ext/curl/gstcurldefaults.h22
-rw-r--r--ext/curl/gstcurlhttpsrc.c5
-rw-r--r--ext/curl/gstcurlhttpsrc.h25
4 files changed, 28 insertions, 25 deletions
diff --git a/ext/curl/curltask.h b/ext/curl/curltask.h
index bfd5c9fbc..d0ec29008 100644
--- a/ext/curl/curltask.h
+++ b/ext/curl/curltask.h
@@ -47,7 +47,6 @@
#define CURLTASK_H_
#include <curl/curl.h>
-#include "gstcurldefaults.h"
#define GSTCURL_ERROR_PRINT(...) GST_CAT_ERROR (gst_curl_loop_debug, __VA_ARGS__)
#define GSTCURL_WARNING_PRINT(...) GST_CAT_WARNING (gst_curl_loop_debug, __VA_ARGS__)
diff --git a/ext/curl/gstcurldefaults.h b/ext/curl/gstcurldefaults.h
index 0bd881ebf..9af77f4fe 100644
--- a/ext/curl/gstcurldefaults.h
+++ b/ext/curl/gstcurldefaults.h
@@ -122,4 +122,26 @@
#define GSTCURL_HANDLE_MIN_RETRIES -1
#define GSTCURL_HANDLE_MAX_RETRIES 9999
+/* Because g_param_spec_int requires min/max bounding... */
+#define GSTCURL_MIN_REDIRECTIONS -1
+#define GSTCURL_MAX_REDIRECTIONS 255
+#define GSTCURL_MIN_CONNECTION_TIME 2
+#define GSTCURL_MAX_CONNECTION_TIME 60
+#define GSTCURL_MIN_CONNECTIONS_SERVER 1
+#define GSTCURL_MAX_CONNECTIONS_SERVER 60
+#define GSTCURL_MIN_CONNECTIONS_PROXY 1
+#define GSTCURL_MAX_CONNECTIONS_PROXY 60
+#define GSTCURL_MIN_CONNECTIONS_GLOBAL 1
+#define GSTCURL_MAX_CONNECTIONS_GLOBAL 255
+#define GSTCURL_DEFAULT_CONNECTION_TIME 30
+#define GSTCURL_DEFAULT_CONNECTIONS_SERVER 5
+#define GSTCURL_DEFAULT_CONNECTIONS_PROXY 30
+#define GSTCURL_DEFAULT_CONNECTIONS_GLOBAL 255
+#define GSTCURL_INFO_RESPONSE(x) ((x >= 100) && (x <= 199))
+#define GSTCURL_SUCCESS_RESPONSE(x) ((x >= 200) && (x <=299))
+#define GSTCURL_REDIRECT_RESPONSE(x) ((x >= 300) && (x <= 399))
+#define GSTCURL_CLIENT_ERR_RESPONSE(x) ((x >= 400) && (x <= 499))
+#define GSTCURL_SERVER_ERR_RESPONSE(x) ((x >= 500) && (x <= 599))
+#define GSTCURL_FUNCTIONTRACE 0
+
#endif /* GSTCURLDEFAULTS_H_ */
diff --git a/ext/curl/gstcurlhttpsrc.c b/ext/curl/gstcurlhttpsrc.c
index 1d13f6a3f..0b738993b 100644
--- a/ext/curl/gstcurlhttpsrc.c
+++ b/ext/curl/gstcurlhttpsrc.c
@@ -79,6 +79,7 @@
#include "gstcurlhttpsrc.h"
#include "gstcurlqueue.h"
+#include "gstcurldefaults.h"
GST_DEBUG_CATEGORY_STATIC (gst_curl_http_src_debug);
#define GST_CAT_DEFAULT gst_curl_http_src_debug
@@ -138,6 +139,10 @@ static void gst_curl_http_src_request_remove (GstCurlHttpSrc * src);
static char *gst_curl_http_src_strcasestr (const char *haystack,
const char *needle);
+curl_version_info_data *gst_curl_http_src_curl_capabilities;
+gfloat pref_http_ver;
+gchar *gst_curl_http_src_default_useragent;
+
#define gst_curl_http_src_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstCurlHttpSrc, gst_curl_http_src, GST_TYPE_PUSH_SRC,
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER,
diff --git a/ext/curl/gstcurlhttpsrc.h b/ext/curl/gstcurlhttpsrc.h
index 5219fc64e..b312f0c68 100644
--- a/ext/curl/gstcurlhttpsrc.h
+++ b/ext/curl/gstcurlhttpsrc.h
@@ -71,27 +71,7 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CURLHTTPSRC))
#define GST_IS_CURLHTTPSRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CURLHTTPSRC))
-/* Because g_param_spec_int requires min/max bounding... */
-#define GSTCURL_MIN_REDIRECTIONS -1
-#define GSTCURL_MAX_REDIRECTIONS 255
-#define GSTCURL_MIN_CONNECTION_TIME 2
-#define GSTCURL_MAX_CONNECTION_TIME 60
-#define GSTCURL_MIN_CONNECTIONS_SERVER 1
-#define GSTCURL_MAX_CONNECTIONS_SERVER 60
-#define GSTCURL_MIN_CONNECTIONS_PROXY 1
-#define GSTCURL_MAX_CONNECTIONS_PROXY 60
-#define GSTCURL_MIN_CONNECTIONS_GLOBAL 1
-#define GSTCURL_MAX_CONNECTIONS_GLOBAL 255
-#define GSTCURL_DEFAULT_CONNECTION_TIME 30
-#define GSTCURL_DEFAULT_CONNECTIONS_SERVER 5
-#define GSTCURL_DEFAULT_CONNECTIONS_PROXY 30
-#define GSTCURL_DEFAULT_CONNECTIONS_GLOBAL 255
-#define GSTCURL_INFO_RESPONSE(x) ((x >= 100) && (x <= 199))
-#define GSTCURL_SUCCESS_RESPONSE(x) ((x >= 200) && (x <=299))
-#define GSTCURL_REDIRECT_RESPONSE(x) ((x >= 300) && (x <= 399))
-#define GSTCURL_CLIENT_ERR_RESPONSE(x) ((x >= 400) && (x <= 499))
-#define GSTCURL_SERVER_ERR_RESPONSE(x) ((x >= 500) && (x <= 599))
-#define GSTCURL_FUNCTIONTRACE 0
+
#if GSTCURL_FUNCTIONTRACE
#define GSTCURL_FUNCTION_ENTRY(x) GST_DEBUG_OBJECT(x, "Entering function");
#define GSTCURL_FUNCTION_EXIT(x) GST_DEBUG_OBJECT(x, "Leaving function");
@@ -266,9 +246,6 @@ enum
PROP_MAX
};
-curl_version_info_data *gst_curl_http_src_curl_capabilities;
-gfloat pref_http_ver;
-gchar *gst_curl_http_src_default_useragent;
GType gst_curl_http_src_get_type (void);
G_END_DECLS