From 26588fbdb3dc4d55d4b5a85ca98d69e718e56d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 2 Oct 2015 22:21:45 +0300 Subject: [PATCH] Update GLib dependency to 2.40.0 --- configure.ac | 2 +- gst/udp/gstudpsrc.c | 44 -------------------------------------------- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/configure.ac b/configure.ac index d7acb3a5c0..882b4efd92 100644 --- a/configure.ac +++ b/configure.ac @@ -203,7 +203,7 @@ dnl *** checks for dependency libraries *** dnl GLib -GLIB_REQ=2.32.0 +GLIB_REQ=2.40.0 AG_GST_GLIB_CHECK([$GLIB_REQ]) dnl Orc diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c index b4ebba46c7..4929b25e2c 100644 --- a/gst/udp/gstudpsrc.c +++ b/gst/udp/gstudpsrc.c @@ -112,9 +112,7 @@ #include -#if GLIB_CHECK_VERSION (2, 35, 7) #include -#else /* nicked from gnetworking.h */ #ifdef G_OS_WIN32 @@ -984,7 +982,6 @@ gst_udpsrc_open (GstUDPSrc * src) goto getsockname_error; } -#if GLIB_CHECK_VERSION (2, 35, 7) { gint val = 0; @@ -1016,47 +1013,6 @@ gst_udpsrc_open (GstUDPSrc * src) GST_DEBUG_OBJECT (src, "could not get udp buffer size"); } } -#elif defined (SO_RCVBUF) - { - gint rcvsize, ret; - socklen_t len; - - len = sizeof (rcvsize); - if (src->buffer_size != 0) { - rcvsize = src->buffer_size; - - GST_DEBUG_OBJECT (src, "setting udp buffer of %d bytes", rcvsize); - /* set buffer size, Note that on Linux this is typically limited to a - * maximum of around 100K. Also a minimum of 128 bytes is required on - * Linux. */ - ret = - setsockopt (g_socket_get_fd (src->used_socket), SOL_SOCKET, SO_RCVBUF, - (void *) &rcvsize, len); - if (ret != 0) { - GST_ELEMENT_WARNING (src, RESOURCE, SETTINGS, (NULL), - ("Could not create a buffer of requested %d bytes, %d: %s (%d)", - rcvsize, ret, g_strerror (errno), errno)); - } - } - - /* read the value of the receive buffer. Note that on linux this returns 2x the - * value we set because the kernel allocates extra memory for metadata. - * The default on Linux is about 100K (which is about 50K without metadata) */ - ret = - getsockopt (g_socket_get_fd (src->used_socket), SOL_SOCKET, SO_RCVBUF, - (void *) &rcvsize, &len); - if (ret == 0) - GST_DEBUG_OBJECT (src, "have udp buffer of %d bytes", rcvsize); - else - GST_DEBUG_OBJECT (src, "could not get udp buffer size"); - } -#else - if (src->buffer_size != 0) { - GST_WARNING_OBJECT (src, "don't know how to set udp buffer size on this " - "OS. Consider upgrading your GLib to >= 2.35.7 and re-compiling the " - "GStreamer udp plugin"); - } -#endif g_socket_set_broadcast (src->used_socket, TRUE);