From c465256dc1d9a67d380a03aa0d0f7ae7fa4f36dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 2 Oct 2014 11:56:09 +0300 Subject: [PATCH 1/8] configure.ac: The OpenWebRTC GStreamer plugins install no pkg-config file And they are only a runtime dependency, no build dependency. --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 11ec1b50..b458e633 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,6 @@ PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= 1.0.10 gstreamer-rtp-1.0 >= 1.0.1 PKG_CHECK_MODULES(NICE, [nice >= 0.1.4]) PKG_CHECK_MODULES(ORC, [orc-0.4]) PKG_CHECK_MODULES(SEED, [seed]) -PKG_CHECK_MODULES(OPENWEBRTC_GST_PLUGINS, [openwebrtc-gst-plugins]) # check for gobject-introspection m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [ From 719125304717cc67b60a8f8c50f82d64fb019ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 2 Oct 2014 11:56:38 +0300 Subject: [PATCH 2/8] build: Don't use -pedantic and -ansi They will fail the build too easily with external headers and don't do what one would expect. Instead let autoconf figure out the right compiler flags for using a standard conformant C compiler. --- bridge/Makefile.am | 1 - configure.ac | 1 + local/Makefile.am | 4 +--- owr/Makefile.am | 2 -- transport/Makefile.am | 2 -- 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/bridge/Makefile.am b/bridge/Makefile.am index 6e10d7ac..2e10250f 100644 --- a/bridge/Makefile.am +++ b/bridge/Makefile.am @@ -16,7 +16,6 @@ AM_CFLAGS = \ -Wall \ -Wextra \ -Werror \ - -pedantic \ $(DEBUG_CFLAGS) lib_LTLIBRARIES = libopenwebrtc_bridge.la diff --git a/configure.ac b/configure.ac index b458e633..67140226 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,7 @@ AM_INIT_AUTOMAKE([1.11 -Wno-portability]) AM_SILENT_RULES([yes]) AC_PROG_CC +AC_PROG_CC_STDC LT_INIT diff --git a/local/Makefile.am b/local/Makefile.am index 10a4a1d0..4bab4a76 100644 --- a/local/Makefile.am +++ b/local/Makefile.am @@ -9,11 +9,9 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/owr AM_CFLAGS = \ - -ansi \ -Wall \ -Wextra \ - -Werror \ - -pedantic + -Werror noinst_LTLIBRARIES = libopenwebrtc_local.la diff --git a/owr/Makefile.am b/owr/Makefile.am index 1df399e5..89a60920 100644 --- a/owr/Makefile.am +++ b/owr/Makefile.am @@ -8,11 +8,9 @@ AM_CPPFLAGS = \ $(GSTREAMER_CFLAGS) AM_CFLAGS = \ - -ansi \ -Wall \ -Wextra \ -Werror \ - -pedantic \ $(DEBUG_CFLAGS) lib_LTLIBRARIES = libopenwebrtc.la diff --git a/transport/Makefile.am b/transport/Makefile.am index 17061eb2..a050421b 100644 --- a/transport/Makefile.am +++ b/transport/Makefile.am @@ -11,11 +11,9 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/owr AM_CFLAGS = \ - -ansi \ -Wall \ -Wextra \ -Werror \ - -pedantic \ $(DEBUG_CFLAGS) noinst_LTLIBRARIES = libopenwebrtc_transport.la From 4d9416ce2e1b1d96a8466f737fcbae91451aa26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 2 Oct 2014 11:58:36 +0300 Subject: [PATCH 3/8] nice: Version 0.1.7.1 or newer is required to build --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 67140226..979b8ffb 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_SUBST(LIBOPENWEBRTC_CFLAGS) PKG_CHECK_MODULES(GLIB, [glib-2.0, gobject-2.0, gmodule-2.0, gthread-2.0]) PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= 1.0.10 gstreamer-rtp-1.0 >= 1.0.10]) -PKG_CHECK_MODULES(NICE, [nice >= 0.1.4]) +PKG_CHECK_MODULES(NICE, [nice >= 0.1.7.1]) PKG_CHECK_MODULES(ORC, [orc-0.4]) PKG_CHECK_MODULES(SEED, [seed]) From 0c3a546be6651eb28171167cef9a7156024fe2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 2 Oct 2014 12:01:22 +0300 Subject: [PATCH 4/8] owr_local_media_source: Work around wrong compiler warning owr_local_media_source.c: In function 'owr_local_media_source_get_pad': owr_local_media_source.c:119:10: error: 'source' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (!gst_element_link(a, b)) \ ^ owr_local_media_source.c:296:17: note: 'source' was declared here GstElement *source, *capsfilter = NULL, *tee; --- local/owr_local_media_source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/owr_local_media_source.c b/local/owr_local_media_source.c index ec2c9e33..d03e3d23 100644 --- a/local/owr_local_media_source.c +++ b/local/owr_local_media_source.c @@ -293,7 +293,7 @@ static GstPad *owr_local_media_source_get_pad(OwrMediaSource *media_source, GstC OwrLocalMediaSource *local_source; OwrLocalMediaSourcePrivate *priv; GstElement *source_bin, *post_tee_bin; - GstElement *source, *capsfilter = NULL, *tee; + GstElement *source = NULL, *capsfilter = NULL, *tee; GstPad *ghostpad = NULL; gchar *pad_name; OwrMediaType media_type = OWR_MEDIA_TYPE_UNKNOWN; From 3c159612cc894e1fdb7084813f7b364a2dc60fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 2 Oct 2014 12:58:00 +0300 Subject: [PATCH 5/8] build: Requires gstreamer-app-1.0 and gstreamer-video-1.0 too --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 979b8ffb..f00e3660 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ LIBOPENWEBRTC_CFLAGS="-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32 -DGLIB_VERSI AC_SUBST(LIBOPENWEBRTC_CFLAGS) PKG_CHECK_MODULES(GLIB, [glib-2.0, gobject-2.0, gmodule-2.0, gthread-2.0]) -PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= 1.0.10 gstreamer-rtp-1.0 >= 1.0.10]) +PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= 1.0.10 gstreamer-rtp-1.0 >= 1.0.10 gstreamer-video-1.0 >= 1.0.10 gstreamer-app-1.0 >= 1.0.10]) PKG_CHECK_MODULES(NICE, [nice >= 0.1.7.1]) PKG_CHECK_MODULES(ORC, [orc-0.4]) PKG_CHECK_MODULES(SEED, [seed]) From b2fb39e88b323411a177f5bd75a867c99cdfe5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 2 Oct 2014 12:58:57 +0300 Subject: [PATCH 6/8] transport/owr_candidate: Use - instead of _ to prevent assertions with G_PARAM_STATIC_STRINGS --- transport/owr_candidate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transport/owr_candidate.c b/transport/owr_candidate.c index ec6d91b4..5605a200 100644 --- a/transport/owr_candidate.c +++ b/transport/owr_candidate.c @@ -230,12 +230,12 @@ static void owr_candidate_class_init(OwrCandidateClass *klass) OWR_CANDIDATE_TYPE_HOST, OWR_CANDIDATE_TYPE_RELAY, OWR_CANDIDATE_TYPE_HOST, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); - obj_properties[PROP_COMPONENT_TYPE] = g_param_spec_uint("component_type", "Component type", + obj_properties[PROP_COMPONENT_TYPE] = g_param_spec_uint("component-type", "Component type", "The stream component type (RTP/RTCP)", OWR_COMPONENT_TYPE_RTP, OWR_COMPONENT_TYPE_RTCP, OWR_COMPONENT_TYPE_RTP, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); - obj_properties[PROP_TRANSPORT_TYPE] = g_param_spec_uint("transport_type", "Transport type", + obj_properties[PROP_TRANSPORT_TYPE] = g_param_spec_uint("transport-type", "Transport type", "The transport type (UDP or TCP (active/passive/simultaneous open))", OWR_TRANSPORT_TYPE_UDP, OWR_TRANSPORT_TYPE_TCP_SO, OWR_TRANSPORT_TYPE_UDP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); From f45e763d7c34a1b21eb59172da5643bab029983e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 2 Oct 2014 13:02:49 +0300 Subject: [PATCH 7/8] build: Fix linking of the bridge daemon --- bridge/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bridge/Makefile.am b/bridge/Makefile.am index 2e10250f..385c33e8 100644 --- a/bridge/Makefile.am +++ b/bridge/Makefile.am @@ -36,7 +36,8 @@ libopenwebrtc_bridge_la_LDFLAGS = -export-dynamic bin_PROGRAMS = daemon daemon_SOURCES = daemon.c -daemon_LDFLAGS = -static -export-dynamic $(SEED_LIBS) libopenwebrtc_bridge.la +daemon_LDFLAGS = -static -export-dynamic $(SEED_LIBS) +daemon_LDADD = libopenwebrtc_bridge.la includedir = $(prefix)/include/owr include_HEADERS = \ From 404af77d161b62469bc128d4d96248665344df62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 2 Oct 2014 22:43:36 +0300 Subject: [PATCH 8/8] Require GStreamer >= 1.4 and write the version only once --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f00e3660..cf624d17 100644 --- a/configure.ac +++ b/configure.ac @@ -18,8 +18,9 @@ LT_INIT LIBOPENWEBRTC_CFLAGS="-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_DISABLE_DEPRECATION_WARNINGS" AC_SUBST(LIBOPENWEBRTC_CFLAGS) +GST_REQUIRED=1.4 PKG_CHECK_MODULES(GLIB, [glib-2.0, gobject-2.0, gmodule-2.0, gthread-2.0]) -PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= 1.0.10 gstreamer-rtp-1.0 >= 1.0.10 gstreamer-video-1.0 >= 1.0.10 gstreamer-app-1.0 >= 1.0.10]) +PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= $GST_REQUIRED gstreamer-rtp-1.0 >= $GST_REQUIRED gstreamer-video-1.0 >= $GST_REQUIRED gstreamer-app-1.0 >= $GST_REQUIRED]) PKG_CHECK_MODULES(NICE, [nice >= 0.1.7.1]) PKG_CHECK_MODULES(ORC, [orc-0.4]) PKG_CHECK_MODULES(SEED, [seed])