libmp4v2 used to be part of faad, but is no longer.  here is a port
for a standalone, updated libmp4v2 from the mpeg4ip project.

I've tested this with an updated faac.  the only other port using
libmp4v2 is audio/daapd.  I've included a patch for the daapd
port.  I would really appreciate if a daapd user an confirm this
does not break daapd functionality, so I can get along with updating
faad/faac.

note: this port conflicts with the current faad port/package,
so you'll have to pkg_delete faad first.

-- 
[EMAIL PROTECTED]
SDF Public Access UNIX System - http://sdf.lonestar.org


Attachment: libmp4v2-1.5.0.1-port.tgz
Description: application/tar-gz

Index: Makefile
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/daapd/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile    15 Sep 2007 21:26:00 -0000      1.5
+++ Makefile    6 Sep 2008 18:39:15 -0000
@@ -2,6 +2,7 @@
 
 COMMENT=       server for the DAA protocol
 DISTNAME=      daapd-0.2.4b
+PKGNAME=       ${DISTNAME}p0
 EXTRACT_SUFX=  .tgz
 CATEGORIES=    audio net
 MASTER_SITES=  ${HOMEPAGE}
@@ -14,7 +15,7 @@
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_PACKAGE_FTP=    Yes
 
-LIB_DEPENDS=   mp4v2::audio/faad \
+LIB_DEPENDS=   mp4v2.>=1::multimedia/libmp4v2 \
                id3tag.>=3.0::audio/libid3tag \
                howl::net/howl
 
Index: patches/patch-db_cc
===================================================================
RCS file: patches/patch-db_cc
diff -N patches/patch-db_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-db_cc 6 Sep 2008 18:39:15 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- db.cc.orig Tue Jul 22 02:40:07 2008
++++ db.cc      Tue Jul 22 02:40:07 2008
+@@ -325,7 +325,7 @@ void Database::addM4a( std::string& path, struct stat 
+                       MP4TrackId trackId = MP4FindTrackId(mp4file, 0);
+                       u32 timeScale = MP4GetTrackTimeScale(mp4file, trackId);
+                       MP4Duration trackDuration = 
MP4GetTrackDuration(mp4file, trackId);
+-                      double msDuration = 
UINT64_TO_DOUBLE(MP4ConvertFromTrackDuration(mp4file, trackId, trackDuration, 
MP4_MSECS_TIME_SCALE));
++                      double msDuration = 
(double)(MP4ConvertFromTrackDuration(mp4file, trackId, trackDuration, 
MP4_MSECS_TIME_SCALE));
+                       u32 avgBitRate = MP4GetTrackBitRate(mp4file, trackId);
+                       song->time = (u32) (msDuration);
+                       song->bitrate = (u16) ((avgBitRate + 500) / 1000);
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/daapd/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 PLIST
--- pkg/PLIST   21 Jan 2005 06:49:11 -0000      1.1.1.1
+++ pkg/PLIST   6 Sep 2008 18:39:15 -0000
@@ -1,5 +1,5 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2005/01/21 06:49:11 jolan Exp $
-bin/daapd
[EMAIL PROTECTED] bin/daapd
 @man man/man8/daapd.8
 share/doc/daapd/
 share/doc/daapd/FAQ

Reply via email to