diff --git a/configure.ac b/configure.ac index f30acc18aa..74a6601755 100644 --- a/configure.ac +++ b/configure.ac @@ -215,7 +215,7 @@ dnl *** checks for dependency libraries *** dnl GLib -GLIB_REQ=2.40.0 +GLIB_REQ=2.44.0 AG_GST_GLIB_CHECK([$GLIB_REQ]) dnl Orc diff --git a/gst/udp/gstmultiudpsink.c b/gst/udp/gstmultiudpsink.c index 13f1cc2037..942a2518a1 100644 --- a/gst/udp/gstmultiudpsink.c +++ b/gst/udp/gstmultiudpsink.c @@ -557,45 +557,6 @@ gst_multiudpsink_finalize (GObject * object) G_OBJECT_CLASS (parent_class)->finalize (object); } -/* replacement until we can depend unconditionally on the real one in GLib */ -#ifndef HAVE_G_SOCKET_SEND_MESSAGES -#define g_socket_send_messages gst_socket_send_messages - -static gint -gst_socket_send_messages (GSocket * socket, GstOutputMessage * messages, - guint num_messages, gint flags, GCancellable * cancellable, GError ** error) -{ - gssize result; - gint i; - - for (i = 0; i < num_messages; ++i) { - GstOutputMessage *msg = &messages[i]; - GError *msg_error = NULL; - - result = g_socket_send_message (socket, msg->address, - msg->vectors, msg->num_vectors, - msg->control_messages, msg->num_control_messages, - flags, cancellable, &msg_error); - - if (result < 0) { - /* if we couldn't send all messages, just return how many we did - * manage to send, provided we managed to send at least one */ - if (msg_error->code == G_IO_ERROR_WOULD_BLOCK && i > 0) { - g_error_free (msg_error); - return i; - } else { - g_propagate_error (error, msg_error); - return -1; - } - } - - msg->bytes_sent = result; - } - - return i; -} -#endif /* HAVE_G_SOCKET_SEND_MESSAGES */ - static gsize fill_vectors (GOutputVector * vecs, GstMapInfo * maps, guint n, GstBuffer * buf) { diff --git a/gst/udp/gstmultiudpsink.h b/gst/udp/gstmultiudpsink.h index 8849f38c7b..6310724ff9 100644 --- a/gst/udp/gstmultiudpsink.h +++ b/gst/udp/gstmultiudpsink.h @@ -38,27 +38,7 @@ G_BEGIN_DECLS typedef struct _GstMultiUDPSink GstMultiUDPSink; typedef struct _GstMultiUDPSinkClass GstMultiUDPSinkClass; -#if GLIB_CHECK_VERSION (2, 43, 2) -#define HAVE_G_SOCKET_SEND_MESSAGES -#endif - -#ifndef HAVE_G_SOCKET_SEND_MESSAGES -/* same as GOutputMessage used for g_socket_send_messages() */ -typedef struct { - /*< private >*/ - GSocketAddress *address; - - GOutputVector *vectors; - guint num_vectors; - - guint bytes_sent; - - GSocketControlMessage **control_messages; - guint num_control_messages; -} GstOutputMessage; -#else typedef GOutputMessage GstOutputMessage; -#endif /* HAVE_G_SOCKET_SEND_MESSAGES*/ typedef struct { gint ref_count; /* for memory management */ diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c index 681e77d27f..a8871915b9 100644 --- a/gst/udp/gstudpsrc.c +++ b/gst/udp/gstudpsrc.c @@ -897,12 +897,8 @@ retry: * with udpsink generated a "port unreachable" ICMP response. We ignore * that and try again. * On Windows we get G_IO_ERROR_CONNECTION_CLOSED instead */ -#if GLIB_CHECK_VERSION(2,44,0) if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_HOST_UNREACHABLE) || g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CONNECTION_CLOSED)) { -#else - if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_HOST_UNREACHABLE)) { -#endif g_clear_error (&err); goto retry; } diff --git a/meson.build b/meson.build index 5022483ef3..b967cb810f 100644 --- a/meson.build +++ b/meson.build @@ -19,7 +19,7 @@ gst_version_is_dev = gst_version_minor % 2 == 1 and gst_version_micro < 90 # FIXME: automagic have_cxx = add_languages('cpp', required : false) -glib_req = '>= 2.40.0' +glib_req = '>= 2.44.0' orc_req = '>= 0.4.17' gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)