summaryrefslogtreecommitdiff
path: root/audio/mserv/patches
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2003-09-03 19:55:25 +0000
committerabs <abs@pkgsrc.org>2003-09-03 19:55:25 +0000
commitf08c1a78f72c26041c9db85d29547e68cdbef157 (patch)
treed916818fd63c62ef5035ea086c2956b52094f1ee /audio/mserv/patches
parent7941f9c480a3123d1c64f517c2814336fb4f3125 (diff)
downloadpkgsrc-f08c1a78f72c26041c9db85d29547e68cdbef157.tar.gz
Update mserv to 0.35nb1
Fix english.lang install location Install mservedit Add INSTALL and LICENSE to PLIST Fix config 'player_ogg=prog_ogg' -> 'player_ogg=prog_ogg123' Add PARSE_OGG_INFO
Diffstat (limited to 'audio/mserv/patches')
-rw-r--r--audio/mserv/patches/patch-aa4
-rw-r--r--audio/mserv/patches/patch-ac99
-rw-r--r--audio/mserv/patches/patch-af4
3 files changed, 99 insertions, 8 deletions
diff --git a/audio/mserv/patches/patch-aa b/audio/mserv/patches/patch-aa
index dc08a5e46db..ec320f9bee4 100644
--- a/audio/mserv/patches/patch-aa
+++ b/audio/mserv/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.6 2003/09/03 12:35:12 martin Exp $
+$NetBSD: patch-aa,v 1.7 2003/09/03 19:55:28 abs Exp $
--- mserv/Makefile.in.orig 2003-08-03 16:57:19.000000000 +0200
+++ mserv/Makefile.in 2003-09-03 14:01:16.000000000 +0200
@@ -7,7 +7,7 @@ $NetBSD: patch-aa,v 1.6 2003/09/03 12:35:12 martin Exp $
target_vendor = @target_vendor@
-INCLUDES = -I../hdr -DDATADIR=\"${datadir}\"
-+INCLUDES = -I../hdr -DDATADIR=\"${datadir}\" -DBINDIR=\"${prefix}/bin\"
++INCLUDES = -I../hdr -DDATADIR=\"${datadir}\" -DBINDIR=\"${prefix}/bin\" -DPARSE_OGG_INFO=1
bin_PROGRAMS = mserv
diff --git a/audio/mserv/patches/patch-ac b/audio/mserv/patches/patch-ac
index 027f015d01a..be6de327900 100644
--- a/audio/mserv/patches/patch-ac
+++ b/audio/mserv/patches/patch-ac
@@ -1,8 +1,18 @@
-$NetBSD: patch-ac,v 1.5 2003/09/03 12:35:12 martin Exp $
+$NetBSD: patch-ac,v 1.6 2003/09/03 19:55:28 abs Exp $
---- mserv/mserv.c.orig 2003-08-03 16:57:20.000000000 +0200
-+++ mserv/mserv.c 2003-09-03 13:52:35.000000000 +0200
-@@ -67,7 +67,7 @@
+--- mserv/mserv.c.orig Sun Aug 3 15:57:20 2003
++++ mserv/mserv.c
+@@ -62,12 +62,17 @@ met:
+ #include <sys/ioctl.h>
+ #include <time.h>
+
++#ifdef PARSE_OGG_INFO
++#include <vorbis/codec.h>
++#include <vorbis/vorbisfile.h>
++#endif
++
+ #include "mserv.h"
+ #include "misc.h"
#include "cmd.h"
#include "acl.h"
#include "mp3info.h"
@@ -11,3 +21,84 @@ $NetBSD: patch-ac,v 1.5 2003/09/03 12:35:12 martin Exp $
#include "defconf.h"
#include "conf.h"
#include "opt.h"
+@@ -2098,8 +2103,17 @@ static t_track *mserv_loadtrk(const char
+ }
+ if (duration == 0 && !*miscinfo) {
+ len = strlen(fullpath_file);
++#ifdef PARSE_OGG_INFO
++ if (len > 4 && !stricmp(".mp3", fullpath_file+len-4) ||
++ !stricmp(".ogg", fullpath_file+len-4)) {
++ if (!stricmp(".mp3", fullpath_file+len-4))
++ duration = mserv_mp3info_readlen(fullpath_file, &bitrate, &id3tag);
++ else
++ duration = mserv_ogginfo_readlen(fullpath_file, &bitrate, &id3tag);
++#else
+ if (len > 4 && !stricmp(".mp3", fullpath_file+len-4)) {
+ duration = mserv_mp3info_readlen(fullpath_file, &bitrate, &id3tag);
++#endif
+ if (duration == -1) {
+ mserv_log("Unable to determine details of mp3 '%s': %s",
+ filename, strerror(errno));
+@@ -3427,6 +3441,62 @@ int mserv_setmixer(t_client *cl, int wha
+ close(mixer_fd);
+ mserv_response(cl, "NAN", NULL);
+ return -1;
++}
++
++#endif
++
++#ifdef PARSE_OGG_INFO
++int mserv_ogginfo_readlen(const char *fname, int *bitrate_ret,
++ t_id3tag *id3tag)
++{
++ OggVorbis_File vf;
++ FILE *f;
++ ogg_sync_state sync;
++ vorbis_info *vi;
++ vorbis_comment *vc;
++ char **comment;
++ double duration;
++
++ if (id3tag)
++ memset(id3tag, 0, sizeof(*id3tag));
++
++ if ((f = fopen(fname, "rb")) == NULL)
++ return -1;
++
++ if (ov_open(f, &vf, NULL, 0) < 0) {
++ fclose(f);
++ return -1;
++ }
++
++ if ( !(vi = ov_info(&vf, -1)) || !(vc = ov_comment(&vf, -1))) {
++ ov_clear(&vf);
++ fclose(f);
++ return -1;
++ }
++
++ if (bitrate_ret)
++ *bitrate_ret = vi->bitrate_nominal;
++
++ for (comment = vc->user_comments ; *comment ; ++comment) {
++ if (strncmp(*comment, "title=", 6) == 0) {
++ strlcpy(id3tag->title, *comment + 6, MP3ID3_TITLELEN+1);
++ id3tag->present = 1;
++ }
++ else if (strncmp(*comment, "artist=", 7) == 0)
++ strlcpy(id3tag->artist, *comment + 7, MP3ID3_ARTISTLEN+1);
++ else if (strncmp(*comment, "album=", 6) == 0)
++ strlcpy(id3tag->album, *comment + 6, MP3ID3_ALBUMLEN+1);
++ else if (strncmp(*comment, "date=", 5) == 0)
++ strlcpy(id3tag->year, *comment + 5, MP3ID3_YEARLEN+1);
++ else if (strncmp(*comment, "genre=", 6) == 0)
++ strlcpy(id3tag->genre, *comment + 6, 31);
++ /* tracknumber ignored */
++ }
++
++ duration = ov_time_total(&vf, -1);
++ ov_clear(&vf);
++ fclose(f);
++ return (int)duration * 100;
+ }
+
+ #endif
diff --git a/audio/mserv/patches/patch-af b/audio/mserv/patches/patch-af
index c85252ba51c..695db1f8890 100644
--- a/audio/mserv/patches/patch-af
+++ b/audio/mserv/patches/patch-af
@@ -1,4 +1,4 @@
-$NetBSD: patch-af,v 1.6 2003/09/03 12:35:13 martin Exp $
+$NetBSD: patch-af,v 1.7 2003/09/03 19:55:28 abs Exp $
--- mserv/defconf.c.orig 2003-08-04 20:25:36.000000000 +0200
+++ mserv/defconf.c 2003-09-03 13:44:02.000000000 +0200
@@ -82,7 +82,7 @@ $NetBSD: patch-af,v 1.6 2003/09/03 12:35:13 martin Exp $
+"player_mp3=prog_mpg123\n"
+"player_wav=prog_play\n"
+"player_au=prog_play\n"
-+"player_ogg=prog_ogg\n"
++"player_ogg=prog_ogg123\n"
+"\n"
+"# Set default random mode, either on or off. You must still tell mserv to\n"
+"# start playing (PLAY).\n"