[farsight2/master] Move to external gupnp-igd library

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:25:30 PST 2008


---
 configure.ac                                       |    8 ++++----
 transmitters/rawudp/Makefile.am                    |   11 +++--------
 transmitters/rawudp/fs-rawudp-component.c          |   16 ++++++++--------
 transmitters/rawudp/fs-rawudp-stream-transmitter.c |    6 +++---
 4 files changed, 18 insertions(+), 23 deletions(-)

diff --git a/configure.ac b/configure.ac
index dde054e..8fe0622 100644
--- a/configure.ac
+++ b/configure.ac
@@ -366,7 +366,7 @@ fi
 AM_CONDITIONAL(WANT_PYTHON, test "x$WANT_PYTHON" = "xyes")
 
 AC_ARG_ENABLE([gupnp],
-	AC_HELP_STRING([--disable-gupnp], [Disable GUPnP support]),
+	AC_HELP_STRING([--disable-gupnp], [Disable GUPnP IGD support]),
 	[case "${enableval}" in
 	    yes) WANT_GUPNP=yes ;;
 	    no)  WANT_GUPNP=no ;;
@@ -376,17 +376,17 @@ AC_ARG_ENABLE([gupnp],
 
 HAVE_GUPNP=no
 if test "x$WANT_GUPNP" != "xno"; then
-   PKG_CHECK_MODULES(GUPNP, [ gupnp-1.0 ],
+   PKG_CHECK_MODULES(GUPNP, [ gupnp-igd-1.0 ],
     [ HAVE_GUPNP=yes ],
     [ HAVE_GUPNP=no ])
 fi
 if test "x$WANT_GUPNP" = "xyes" && test "x$HAVE_GUPNP" = "xno"; then
-   AC_ERROR([Requested GUPnP, but it is not available])
+   AC_ERROR([Requested GUPnP IGD, but it is not available])
 fi
 
 AM_CONDITIONAL(HAVE_GUPNP, test "x$HAVE_GUPNP" = "xyes")
 if test "x$HAVE_GUPNP" = "xyes"; then
-   AC_DEFINE(HAVE_GUPNP,,[Have the GUPnP library])
+   AC_DEFINE(HAVE_GUPNP,,[Have the GUPnP IGD library])
 fi
 
 
diff --git a/transmitters/rawudp/Makefile.am b/transmitters/rawudp/Makefile.am
index dd4aa4a..5fd1e9b 100644
--- a/transmitters/rawudp/Makefile.am
+++ b/transmitters/rawudp/Makefile.am
@@ -11,18 +11,13 @@ librawudp_transmitter_la_SOURCES = \
 	fs-rawudp-marshal.c \
 	stun.c
 
-if HAVE_GUPNP
-UPNP_LIBS = $(top_builddir)/gst-libs/ext/fsupnp/libfsupnp.la
-else
-UPNP_LIBS =
-endif
-
 # flags used to compile this plugin
 librawudp_transmitter_la_CFLAGS = \
 	$(FS2_INTERNAL_CFLAGS) \
 	$(FS2_CFLAGS) \
 	$(GST_PLUGINS_BASE_CFLAGS) \
-	$(GST_CFLAGS)
+	$(GST_CFLAGS) \
+	$(GUPNP_CFLAGS)
 librawudp_transmitter_la_LDFLAGS = $(FS2_PLUGIN_LDFLAGS)
 librawudp_transmitter_la_LIBADD = \
 	$(top_builddir)/gst-libs/gst/farsight/libgstfarsight-0.10.la \
@@ -30,7 +25,7 @@ librawudp_transmitter_la_LIBADD = \
 	-lgstnetbuffer- at GST_MAJORMINOR@ \
 	$(GST_BASE_LIBS) \
 	$(GST_LIBS) \
-	$(UPNP_LIBS)
+	$(GUPNP_LIBS)
 
 EXTRA_librawudp_transmitter_la_SOURCES = fs-rawudp-marshal.list
 
diff --git a/transmitters/rawudp/fs-rawudp-component.c b/transmitters/rawudp/fs-rawudp-component.c
index e5efad6..ae3dcc4 100644
--- a/transmitters/rawudp/fs-rawudp-component.c
+++ b/transmitters/rawudp/fs-rawudp-component.c
@@ -39,7 +39,7 @@
 #include <gst/netbuffer/gstnetbuffer.h>
 
 #ifdef HAVE_GUPNP
-#include <ext/fsupnp/fs-upnp-simple-igd-thread.h>
+#include <libgupnp-igd/gupnp-simple-igd-thread.h>
 #endif
 
 #include <string.h>
@@ -127,7 +127,7 @@ struct _FsRawUdpComponentPrivate
   guint upnp_mapping_timeout;
   guint upnp_discovery_timeout;
 
-  FsUpnpSimpleIgdThread *upnp_igd;
+  GUPnPSimpleIgdThread *upnp_igd;
 #endif
 
   /* Above this line, its all set at construction time */
@@ -391,9 +391,9 @@ fs_rawudp_component_class_init (FsRawUdpComponentClass *klass)
   g_object_class_install_property (gobject_class,
       PROP_UPNP_IGD,
       g_param_spec_object ("upnp-igd",
-          "The FsUpnpSimpleIgd object",
-          "This is the upnp igd abstraction object",
-          FS_TYPE_UPNP_SIMPLE_IGD_THREAD,
+          "The GUPnPSimpleIgdThread object",
+          "This is the GUPnP IGD abstraction object",
+          GUPNP_TYPE_SIMPLE_IGD_THREAD,
           G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
 #endif
 
@@ -633,7 +633,7 @@ fs_rawudp_component_stop (FsRawUdpComponent *self)
     if (self->priv->upnp_igd  &&
         (self->priv->upnp_mapping || self->priv->upnp_discovery))
     {
-      fs_upnp_simple_igd_remove_port (FS_UPNP_SIMPLE_IGD (self->priv->upnp_igd),
+      gupnp_simple_igd_remove_port (GUPNP_SIMPLE_IGD (self->priv->upnp_igd),
           "UDP", fs_rawudp_transmitter_udpport_get_port (udpport));
     }
 #endif
@@ -992,7 +992,7 @@ fs_rawudp_component_set_remote_candidate (FsRawUdpComponent *self,
 
 #ifdef HAVE_GUPNP
 static void
-_upnp_mapped_external_port (FsUpnpSimpleIgdThread *igd, gchar *proto,
+_upnp_mapped_external_port (GUPnPSimpleIgdThread *igd, gchar *proto,
     gchar *external_ip, gchar *replaces_external_ip, guint external_port,
     gchar *local_ip, guint local_port, gchar *description, gpointer user_data)
 {
@@ -1098,7 +1098,7 @@ fs_rawudp_component_gather_local_candidates (FsRawUdpComponent *self,
             G_CALLBACK (_upnp_mapped_external_port), self);
       }
 
-      fs_upnp_simple_igd_add_port (FS_UPNP_SIMPLE_IGD (self->priv->upnp_igd),
+      gupnp_simple_igd_add_port (GUPNP_SIMPLE_IGD (self->priv->upnp_igd),
           "UDP", port, ip, port, self->priv->upnp_mapping_timeout,
           "Farsight Raw UDP transmitter");
 
diff --git a/transmitters/rawudp/fs-rawudp-stream-transmitter.c b/transmitters/rawudp/fs-rawudp-stream-transmitter.c
index 7df0162..ebb4832 100644
--- a/transmitters/rawudp/fs-rawudp-stream-transmitter.c
+++ b/transmitters/rawudp/fs-rawudp-stream-transmitter.c
@@ -78,7 +78,7 @@
 #include <gst/farsight/fs-conference-iface.h>
 
 #ifdef HAVE_GUPNP
-#include <ext/fsupnp/fs-upnp-simple-igd-thread.h>
+#include <libgupnp-igd/gupnp-simple-igd-thread.h>
 #endif
 
 #include <gst/gst.h>
@@ -146,7 +146,7 @@ struct _FsRawUdpStreamTransmitterPrivate
   guint upnp_discovery_timeout;
   guint upnp_request_timeout;
 
-  FsUpnpSimpleIgdThread *upnp_igd;
+  GUPnPSimpleIgdThread *upnp_igd;
 #endif
 
   /* Everything below this line is protected by the mutex */
@@ -578,7 +578,7 @@ fs_rawudp_stream_transmitter_build (FsRawUdpStreamTransmitter *self,
       (self->priv->upnp_discovery &&
           (!self->priv->stun_ip || !self->priv->stun_port)))
   {
-    self->priv->upnp_igd = fs_upnp_simple_igd_thread_new ();
+    self->priv->upnp_igd = gupnp_simple_igd_thread_new ();
     g_object_set (self->priv->upnp_igd,
         "request-timeout", self->priv->upnp_request_timeout,
         NULL);
-- 
1.5.6.5




More information about the farsight-commits mailing list