summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2011-04-19 09:40:31 (GMT)
committer Jaromil <jaromil@dyne.org>2011-04-19 09:40:31 (GMT)
commit51998e85210c147cd52c581a33e460fea8fee2b8 (patch)
treeb35fd41eb3e9b479c4335cd1b8fdf148a1cc3afc
parentaa51ed4b35fc355952fb9a352a7e25d3b39a7dcb (diff)
parent3552ad3b64407601073f0a45e3f13ebd3dc4e459 (diff)
Merge branch 'master' into upstream
-rw-r--r--ChangeLog8
-rw-r--r--README5
-rw-r--r--TODO.org9
-rw-r--r--config.h.in73
-rw-r--r--configure.ac21
-rw-r--r--src/Makefile.am6
-rw-r--r--src/cmdline.c7
-rw-r--r--src/discover.c13
8 files changed, 47 insertions, 95 deletions
diff --git a/ChangeLog b/ChangeLog
index e69de29..c531e63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -0,0 +1,8 @@
+
+19 April 2011 - Device detection
+ Possibility to detect UPNP root devices on the same network
+ Optional linking to miniupnpc
+
+12 April 2011 - Initial release
+ Basic functionalities: load, play, stop, pause
+ No dependencies
diff --git a/README b/README
index 1a4411b..20fed7d 100644
--- a/README
+++ b/README
@@ -1,5 +1,8 @@
+ _
+ /\\ /|_) _ ._ _ __|_ _
+/--\\/ | \(/_| | |(_)|_(/_
-AVRemote - tool to send AVTransport commands to UPNP media services
+ Small tool to send AVTransport commands to UPNP media services
http://nimk.nl/syncstarter
diff --git a/TODO.org b/TODO.org
index 4ad7490..32c0929 100644
--- a/TODO.org
+++ b/TODO.org
@@ -1,10 +1,15 @@
#+TITLE: TODO for AVRemote
-
-* Release 1.0 :10%:
+* Release 1.0 :20%:
** TODO [#A] HTTP streaming URLs load
** TODO [#B] Realize how seek can work
** TODO [#B] Use a select() call on socket
** TODO [#C] Monitor GetTransportState for results
+
+** DONE [#B] Auto detection of devices and ports :miniupnpc:
+
+ miniupnpc works, but its mostly designed for internet gateway
+ routers and has a lot of overhead (despite the mini in the name).
+ it makes sense to rewrite just the messaging that we need.
diff --git a/config.h.in b/config.h.in
deleted file mode 100644
index b7e8c25..0000000
--- a/config.h.in
+++ /dev/null
@@ -1,73 +0,0 @@
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the `inet_ntop' function. */
-#undef HAVE_INET_NTOP
-
-/* Define to 1 if you have the `inet_pton' function. */
-#undef HAVE_INET_PTON
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if the system has the type `in_port_t'. */
-#undef HAVE_IN_PORT_T
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdio.h> header file. */
-#undef HAVE_STDIO_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if the system has the type `struct in_pktinfo'. */
-#undef HAVE_STRUCT_IN_PKTINFO
-
-/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */
-#undef HAVE_STRUCT_SOCKADDR_SA_LEN
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Package URL */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
diff --git a/configure.ac b/configure.ac
index 3a521e4..4b8ba8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ dnl ==============================================================
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
-AC_INIT([avremote],[0.1.0],[jaromil@nimk.nl],[AVRemote])
+AC_INIT([avremote],[0.2.0],[jaromil@nimk.nl],[AVRemote])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
@@ -59,14 +59,19 @@ if test x$have_upnp = xyes; then
# this is the default behaviour for --enable-upnp with no arguments
AC_MSG_RESULT(yes)
AC_DEFINE(USE_UPNP,1,[Define if building auto-detect for UPNP devices via miniupnp])
-else
- AC_MSG_RESULT(no)
-fi
-if test x$have_upnp = xyes; then
UPNP_LIBS="-lminiupnpc"
- # TODO OSX and WIN
+ UPNP_CFLAGS="-Iminiupnpc"
+elif test x$have_upnp != xno; then
+# compile from indicated dir
+ AC_MSG_RESULT([yes, from $enableval])
+ AC_DEFINE(USE_UPNP,1,[Define if building auto-detect for UPNP devices via miniupnp])
+ UPNP_LIBS="$enableval/libminiupnpc.a"
+ UPNP_CFLAGS="-I$enableval"
+else
+ AC_MSG_RESULT(no)
fi
AC_SUBST(UPNP_LIBS)
+AC_SUBST(UPNP_CFLAGS)
dnl ==============================================================
@@ -85,10 +90,8 @@ fi
# declare the flags gathered so far
-CFLAGS="$GLOBAL_CFLAGS $CFLAGS"
+CFLAGS="$GLOBAL_CFLAGS $CFLAGS $UPNP_CFLAGS"
AC_SUBST(CFLAGS)
-CXXFLAGS="$GLOBAL_CFLAGS $CXXFLAGS"
-AC_SUBST(CXXFLAGS)
AC_CONFIG_FILES([
Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..9067e84
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,6 @@
+bin_PROGRAMS = avremote
+
+avremote_SOURCES = avremote.c avremote.h cmdline.c discover.c
+avremove_CFLAGS = $(UPNP_CFLAGS)
+avremote_LDADD = $(UPNP_LIBS)
+
diff --git a/src/cmdline.c b/src/cmdline.c
index 39736a9..7516786 100644
--- a/src/cmdline.c
+++ b/src/cmdline.c
@@ -95,10 +95,11 @@ void cmdline(int argc, char **argv) {
exit(0);
case 'v':
- fprintf(stderr,"AVRemote - simple commandline tool to send AVTransport commands over UPNP\n"
- "version 0.1 (Apr/2011) by Jaromil - Netherlands Media Art Institute\n"
+ fprintf(stderr,"%s - simple commandline tool to send AVTransport commands over UPNP\n"
+ "version %s (Apr/2011) by Jaromil - Netherlands Media Art Institute\n"
"Copyright (C) 2011 NIMk Artlab, License GNU AGPL v3+\n"
- "This is free software: you are free to change and redistribute it\n");
+ "This is free software: you are free to change and redistribute it\n",
+ PACKAGE, VERSION);
exit(0);
case 's':
diff --git a/src/discover.c b/src/discover.c
index 43fc168..86639a0 100644
--- a/src/discover.c
+++ b/src/discover.c
@@ -6,10 +6,10 @@
#ifdef USE_UPNP
-#include <miniupnpc/miniwget.h>
-#include <miniupnpc/miniupnpc.h>
-#include <miniupnpc/upnpcommands.h>
-#include <miniupnpc/upnperrors.h>
+#include <miniwget.h>
+#include <miniupnpc.h>
+#include <upnpcommands.h>
+#include <upnperrors.h>
int upnp_discover()
@@ -28,11 +28,10 @@ int upnp_discover()
r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
if (!r) {
- fprintf(stderr,"no valid UPnP IGDs found\n");
+ fprintf(stderr,"no valid UPnP devices found\n");
- } else if (r == 3) { // 3 = an UPnP device has been found (not an IGD)
+ } else if (r == 3) { // 3 = an UPnP root device has been found (not an IGD)
- fprintf(stderr,"UPnP found an AVTransport device:\n",r);
dev = devlist;
while(dev) {