pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/mserv-devel Development version of mserv: stream...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/80c6fd5e3ca6
branches:  trunk
changeset: 466133:80c6fd5e3ca6
user:      kim <kim%pkgsrc.org@localhost>
date:      Mon Jan 12 04:18:18 2004 +0000

description:
Development version of mserv: streaming server instead of local playback.

diffstat:

 audio/mserv-devel/DESCR            |    7 ++
 audio/mserv-devel/Makefile         |   35 ++++++++++++
 audio/mserv-devel/PLIST            |   25 ++++++++
 audio/mserv-devel/distinfo         |    7 ++
 audio/mserv-devel/patches/patch-aa |   13 ++++
 audio/mserv-devel/patches/patch-ab |   13 ++++
 audio/mserv-devel/patches/patch-ac |  107 +++++++++++++++++++++++++++++++++++++
 7 files changed, 207 insertions(+), 0 deletions(-)

diffs (235 lines):

diff -r 38251b7a6b9c -r 80c6fd5e3ca6 audio/mserv-devel/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/mserv-devel/DESCR   Mon Jan 12 04:18:18 2004 +0000
@@ -0,0 +1,7 @@
+The main purpose of Mserv is to play songs that those in the room want
+to hear. It works by each user rating the songs they hear - at the
+moment this means they type rate good via telnet or click GOOD via web,
+but hopefully there will be Windows/X clients available soon. Mserv
+uses the ratings, the date the song was last played, the filter
+settings and who is currently logged in. It then compiles a 'top' list
+of songs that are most likely to be played.
diff -r 38251b7a6b9c -r 80c6fd5e3ca6 audio/mserv-devel/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/mserv-devel/Makefile        Mon Jan 12 04:18:18 2004 +0000
@@ -0,0 +1,35 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/01/12 04:18:18 kim Exp $
+#
+
+DISTNAME=      mserv-0.39a
+CATEGORIES=    audio
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=mserv/}
+
+MAINTAINER=    kim%tac.nyc.ny.us@localhost
+HOMEPAGE=      http://www.mserv.org/
+COMMENT=       Local centralised music server environment
+
+GNU_CONFIGURE=         yes
+CONFIGURE_ARGS+=       --with-engine-icecast
+CONFIGURE_ARGS+=       --datadir=${PREFIX}/share/mserv
+USE_BUILDLINK2=                yes
+REPLACE_PERL=          support/mservedit webclient/main.cgi \
+                       webclient/margin.cgi webclient/mserv.cgi
+
+post-configure:
+       ${MV} ${WRKSRC}/mserv/soundcard.h ${WRKSRC}/mserv/mservsoundcard.h
+
+post-install:
+       ${INSTALL_SCRIPT} ${WRKSRC}/support/mservedit ${PREFIX}/bin
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mserv
+       ${INSTALL_DATA} \
+               ${WRKSRC}/INSTALL \
+               ${WRKSRC}/LICENSE \
+               ${PREFIX}/share/doc/mserv
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/mserv/webclient
+       ${INSTALL_DATA} \
+               ${WRKSRC}/webclient/* \
+               ${PREFIX}/share/mserv/webclient
+
+.include "../../audio/libshout/buildlink2.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 38251b7a6b9c -r 80c6fd5e3ca6 audio/mserv-devel/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/mserv-devel/PLIST   Mon Jan 12 04:18:18 2004 +0000
@@ -0,0 +1,25 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/01/12 04:18:18 kim Exp $
+bin/mserv
+bin/mservcmd
+bin/mservedit
+include/mservcli.h
+lib/libmservcli.a
+lib/libmservcli.la
+lib/libmservcli.so
+lib/libmservcli.so.0
+lib/libmservcli.so.0.1
+man/man1/mserv.1
+man/man1/mservcmd.1
+share/doc/mserv/INSTALL
+share/doc/mserv/LICENSE
+share/mserv/english.lang
+share/mserv/webclient/README
+share/mserv/webclient/back.gif
+share/mserv/webclient/index.html
+share/mserv/webclient/main.cgi
+share/mserv/webclient/margin.cgi
+share/mserv/webclient/mserv.cgi
+share/mserv/webclient/mserv7.gif
+@dirrm share/mserv/webclient
+@dirrm share/mserv
+@dirrm share/doc/mserv
diff -r 38251b7a6b9c -r 80c6fd5e3ca6 audio/mserv-devel/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/mserv-devel/distinfo        Mon Jan 12 04:18:18 2004 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/01/12 04:18:18 kim Exp $
+
+SHA1 (mserv-0.39a.tar.gz) = cb101fe7e4aca8b5fd950eec408938a2b3bf1a1b
+Size (mserv-0.39a.tar.gz) = 333570 bytes
+SHA1 (patch-aa) = 167417f1d0cd15bea6dbef46a3a0e0841d41fa4c
+SHA1 (patch-ab) = f6692d59b1da163a273639347cd53ee7c56ec64b
+SHA1 (patch-ac) = 47ac4716cbba0ff3f2acde1b896e56c309abe102
diff -r 38251b7a6b9c -r 80c6fd5e3ca6 audio/mserv-devel/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/mserv-devel/patches/patch-aa        Mon Jan 12 04:18:18 2004 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/01/12 04:18:18 kim Exp $
+
+--- mserv/cmd.c.orig   Sun Aug 31 18:51:07 2003
++++ mserv/cmd.c        Tue Oct 14 17:50:28 2003
+@@ -52,7 +52,7 @@
+ #include <math.h>
+ #include "mserv.h"
+ #include "misc.h"
+-#include "soundcard.h"
++#include "mservsoundcard.h"
+ #include "acl.h"
+ #include "filter.h"
+ #include "cmd.h"
diff -r 38251b7a6b9c -r 80c6fd5e3ca6 audio/mserv-devel/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/mserv-devel/patches/patch-ab        Mon Jan 12 04:18:18 2004 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 2004/01/12 04:18:18 kim Exp $
+
+--- mserv/mserv.c.orig Sun Aug 31 18:52:34 2003
++++ mserv/mserv.c      Tue Oct 14 17:50:57 2003
+@@ -67,7 +67,7 @@
+ #include "cmd.h"
+ #include "acl.h"
+ #include "mp3info.h"
+-#include "soundcard.h"
++#include "mservsoundcard.h"
+ #include "defconf.h"
+ #include "conf.h"
+ #include "opt.h"
diff -r 38251b7a6b9c -r 80c6fd5e3ca6 audio/mserv-devel/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/mserv-devel/patches/patch-ac        Mon Jan 12 04:18:18 2004 +0000
@@ -0,0 +1,107 @@
+$NetBSD: patch-ac,v 1.1.1.1 2004/01/12 04:18:18 kim Exp $
+
+--- mserv/output-icecast.c.orig        Sun Aug 31 18:52:35 2003
++++ mserv/output-icecast.c     Sat Oct 18 23:01:21 2003
+@@ -170,7 +170,7 @@
+     *error = "Failed setting Icecast hostname";
+     goto failed;
+   }
+-  if (shout_set_protocol(o->shout, SHOUT_PROTOCOL_HTTP) != SHOUTERR_SUCCESS) {
++  if (shout_set_protocol(o->shout, SHOUT_PROTOCOL_XAUDIOCAST) != SHOUTERR_SUCCESS) {
+     mserv_log("Failed setting Icecast protocol: %s", shout_get_error(o->shout));
+     *error = "Failed setting Icecast protocol";
+     goto failed;
+@@ -186,8 +186,8 @@
+     goto failed;
+   }
+   if (shout_set_mount(o->shout, mount) != SHOUTERR_SUCCESS) {
+-    mserv_log("Failed setting Icecast hostname: %s", shout_get_error(o->shout));
+-    *error = "Failed setting Icecast hostname";
++    mserv_log("Failed setting Icecast mount: %s", shout_get_error(o->shout));
++    *error = "Failed setting Icecast mount";
+     goto failed;
+   }
+   if (shout_set_user(o->shout, user) != SHOUTERR_SUCCESS) {
+@@ -195,7 +195,7 @@
+     *error = "Failed setting Icecast user";
+     goto failed;
+   }
+-  if (shout_set_format(o->shout, SHOUT_FORMAT_VORBIS) != SHOUTERR_SUCCESS) {
++  if (shout_set_format(o->shout, SHOUT_FORMAT_MP3) != SHOUTERR_SUCCESS) {
+     mserv_log("Failed setting Icecast format: %s", shout_get_error(o->shout));
+     *error = "Failed setting Icecast format";
+     goto failed;
+@@ -209,6 +209,7 @@
+   mserv_log("Successfully connected to Icecast host '%s@%s' for mount '%s'",
+             host, port, mount);
+ 
++#if 0
+   vorbis_info_init(&o->vi);
+   if (vorbis_encode_init(&o->vi, o->channels, o->samplerate, -1,
+                          o->bitrate, -1) != 0) {
+@@ -248,6 +249,8 @@
+       }
+     }
+   }
++#endif
++
+   /*
+   if (gettimeofday(&o->lasttime, NULL) == -1) {
+     *error = "Failed to gettimeofday()";
+@@ -389,9 +392,11 @@
+     }
+     o->buffer_ready_bytes = 0;
+   }
++
+   /* if we have no ready buffer, and we have a full normal buffer,
+    * send it to vorbis */
+   if (o->buffer_ready_bytes == 0 && o->buffer_bytes == o->buffer_size) {
++#if 0
+     vorbbuf = vorbis_analysis_buffer(&o->vd,
+                                      o->buffer_size / (o->channels * 2));
+     if (mserv_debug)
+@@ -413,7 +418,27 @@
+                 o->buffer_size / (o->channels * 2));
+     vorbis_analysis_wrote(&o->vd, o->buffer_size / (o->channels * 2));
+     o->buffer_bytes = 0;
++#else
++    reqbufsize = o->buffer_ready_bytes + o->buffer_bytes;
++    reqbufsize = ((reqbufsize / 8192) + 1) * 8192; /* add granularity */
++    if (reqbufsize > o->buffer_ready_size) {
++      newbuf = realloc(o->buffer_ready, reqbufsize);
++      mserv_log("Extending output buffer size from %d to %d bytes",
++              o->buffer_ready_size, reqbufsize);
++      if (newbuf == NULL) {
++      mserv_log("Out of memory extending output buffer");
++      exit(1);
++      }
++      o->buffer_ready = newbuf;
++      o->buffer_ready_size = reqbufsize;
++    }
++    memcpy(o->buffer_ready + o->buffer_ready_bytes,
++         o->buffer_float, o->buffer_bytes);
++    o->buffer_ready_bytes += o->buffer_bytes;
++    o->buffer_bytes = 0;
++#endif
+   }
++
+   /* if we haven't got a full buffer, read in more from the player */
+   while (o->buffer_bytes < o->buffer_size) {
+     /* try and read more from the input stream */
+@@ -508,6 +533,8 @@
+       }
+     }
+   }
++
++#if 0
+   /* does vorbis have anything decoded from what we've already sent it via
+    * vorbis_analysis_wrote above? */
+   if (mserv_debug)
+@@ -550,6 +577,7 @@
+     mserv_log("  done. received %d ogg pages from libvorbis", pages);
+     mserv_log("  encoded output buffer now %d bytes", o->buffer_ready_bytes);
+   }
++#endif
+ }
+ 
+ /* end of stream: vorbis_analysis_wrote(&o->vd, 0); */



Home | Main Index | Thread Index | Old Index