summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2011-04-29 13:49:36 (GMT)
committer Jaromil <jaromil@dyne.org>2011-04-29 13:49:36 (GMT)
commit0c3e751de7c16f0975dfa6533823d2a7701c8df5 (patch)
tree9cb96636524ca6db0c1d962ac5d1d6ef10e6fa05
parentabdbc9b5c8ea7bdb1660a5d990f13f7cacfc6323 (diff)
SetPlayMode implemented to loop
-rw-r--r--configure.ac3
-rw-r--r--src/Makefile.am1
-rw-r--r--src/cmdline.c10
3 files changed, 11 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 4b8ba8c..794f24f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,7 +60,7 @@ if test x$have_upnp = xyes; then
AC_MSG_RESULT(yes)
AC_DEFINE(USE_UPNP,1,[Define if building auto-detect for UPNP devices via miniupnp])
UPNP_LIBS="-lminiupnpc"
- UPNP_CFLAGS="-Iminiupnpc"
+ UPNP_CFLAGS="-I /usr/include/miniupnpc"
elif test x$have_upnp != xno; then
# compile from indicated dir
AC_MSG_RESULT([yes, from $enableval])
@@ -71,7 +71,6 @@ else
AC_MSG_RESULT(no)
fi
AC_SUBST(UPNP_LIBS)
-AC_SUBST(UPNP_CFLAGS)
dnl ==============================================================
diff --git a/src/Makefile.am b/src/Makefile.am
index fcb288d..f942658 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,5 @@
bin_PROGRAMS = avremote
avremote_SOURCES = avremote.c avremote.h cmdline.c discover.c discover.h parsers.c parsers.h
-avremove_CFLAGS = $(UPNP_CFLAGS)
avremote_LDADD = $(UPNP_LIBS)
diff --git a/src/cmdline.c b/src/cmdline.c
index 73c40ef..9b0ea5a 100644
--- a/src/cmdline.c
+++ b/src/cmdline.c
@@ -78,6 +78,7 @@ void cmdline(int argc, char **argv) {
" discover search for upnp devices on the network\n"
#endif
" load load a file and prepare it for playback\n"
+ " mode set playback mode (NORMAL or REPEAT_ONE)\n"
" play start playing the selected file\n"
" pause pause currently running playback\n"
" stop stop playback and return to menu\n"
@@ -230,6 +231,15 @@ int main(int argc, char **argv) {
break;
+ case 'm': // set the playmode:
+ // "NORMAL", "REPEAT_ONE", "REPEAT_ALL", "RANDOM"
+ {
+ char tmp[256];
+ snprintf(tmp,255,"<NewPlayMode>%s</NewPlayMode>",filename);
+ render_upnp(upnp,"SetPlayMode",tmp);
+ }
+ break;
+
default:
fprintf(stderr,"warning: command not recognized, sending anyway.\n");
render_upnp(upnp,command,"");