split out the libmp4v2 part from mpeg4ip -- all users in the pkgsrc

tree just need that library, the player in mpeg4ip just causes an unwanted
dependency on SDL and complications due to plugin building
This commit is contained in:
drochner 2007-02-09 19:57:48 +00:00
parent 44395fe33c
commit 70986b479c
17 changed files with 386 additions and 0 deletions

View file

@ -0,0 +1,8 @@
The MPEG4IP project provides a standards-based system for encoding,
streaming, and playing encoded audio, video and text. To achieve
this we've integrated a number of existing open source packages,
and created some original code to fill in the gaps.
Please note this project is intended for developers who are interested
in standards based audio and video, and Internet streaming. It is
not intended for end-users.

View file

@ -0,0 +1,23 @@
# $NetBSD: Makefile,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
DISTNAME= mpeg4ip-1.5.0.1
PKGNAME= libmp4v2-1.5.0.1
CATEGORIES= multimedia
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mpeg4ip/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://mpeg4ip.sourceforge.net/
COMMENT= libmp4v2 from mpeg4ip
CONFLICTS+= mpeg4ip<1.5.0.1
USE_LANGUAGES= c c++
USE_PKGLOCALEDIR= yes
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
CONFIGURE_SCRIPT= bootstrap
BUILD_DIRS= lib/mp4v2
INSTALL_DIRS+= lib/mp4v2 doc/mp4v2
.include "../../mk/bsd.pkg.mk"

111
multimedia/libmp4v2/PLIST Normal file
View file

@ -0,0 +1,111 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
include/mp4.h
lib/libmp4v2.la
man/man3/MP4.3
man/man3/MP4AddAudioTrack.3
man/man3/MP4AddHintTrack.3
man/man3/MP4AddODTrack.3
man/man3/MP4AddRtpESConfigurationPacket.3
man/man3/MP4AddRtpHint.3
man/man3/MP4AddRtpImmediateData.3
man/man3/MP4AddRtpPacket.3
man/man3/MP4AddRtpSampleData.3
man/man3/MP4AddRtpVideoHint.3
man/man3/MP4AddSceneTrack.3
man/man3/MP4AddSystemsTrack.3
man/man3/MP4AddTrack.3
man/man3/MP4AddTrackEdit.3
man/man3/MP4AddVideoTrack.3
man/man3/MP4AppendHintTrackSdp.3
man/man3/MP4AppendSessionSdp.3
man/man3/MP4BinaryToBase16.3
man/man3/MP4BinaryToBase64.3
man/man3/MP4CloneTrack.3
man/man3/MP4Close.3
man/man3/MP4ConvertFromMovieDuration.3
man/man3/MP4ConvertFromTrackDuration.3
man/man3/MP4ConvertFromTrackTimestamp.3
man/man3/MP4ConvertToTrackDuration.3
man/man3/MP4ConvertToTrackTimestamp.3
man/man3/MP4CopySample.3
man/man3/MP4CopyTrack.3
man/man3/MP4Create.3
man/man3/MP4DeleteTrack.3
man/man3/MP4DeleteTrackEdit.3
man/man3/MP4Dump.3
man/man3/MP4FileInfo.3
man/man3/MP4FindTrackId.3
man/man3/MP4FindTrackIndex.3
man/man3/MP4GetAudioProfileLevel.3
man/man3/MP4GetDuration.3
man/man3/MP4GetGraphicsProfileLevel.3
man/man3/MP4GetHintTrackReferenceTrackId.3
man/man3/MP4GetHintTrackRtpPayload.3
man/man3/MP4GetHintTrackSdp.3
man/man3/MP4GetNumberOfTracks.3
man/man3/MP4GetODProfileLevel.3
man/man3/MP4GetRtpHintNumberOfPackets.3
man/man3/MP4GetRtpPacketBFrame.3
man/man3/MP4GetRtpPacketTransmitOffset.3
man/man3/MP4GetRtpTimestampStart.3
man/man3/MP4GetSampleDuration.3
man/man3/MP4GetSampleIdFromEditTime.3
man/man3/MP4GetSampleIdFromTime.3
man/man3/MP4GetSampleRenderingOffset.3
man/man3/MP4GetSampleSize.3
man/man3/MP4GetSampleSync.3
man/man3/MP4GetSampleTime.3
man/man3/MP4GetSceneProfileLevel.3
man/man3/MP4GetSessionSdp.3
man/man3/MP4GetTimeScale.3
man/man3/MP4GetTrackAudioMpeg4Type.3
man/man3/MP4GetTrackAudioType.3
man/man3/MP4GetTrackBitRate.3
man/man3/MP4GetTrackDuration.3
man/man3/MP4GetTrackESConfiguration.3
man/man3/MP4GetTrackEditDuration.3
man/man3/MP4GetTrackEditDwell.3
man/man3/MP4GetTrackEditMediaStart.3
man/man3/MP4GetTrackEditStart.3
man/man3/MP4GetTrackEditTotalDuration.3
man/man3/MP4GetTrackFixedSampleDuration.3
man/man3/MP4GetTrackMaxSampleSize.3
man/man3/MP4GetTrackNumberOfEdits.3
man/man3/MP4GetTrackNumberOfSamples.3
man/man3/MP4GetTrackTimeScale.3
man/man3/MP4GetTrackType.3
man/man3/MP4GetTrackVideoFrameRate.3
man/man3/MP4GetTrackVideoHeight.3
man/man3/MP4GetTrackVideoType.3
man/man3/MP4GetTrackVideoWidth.3
man/man3/MP4GetVerbosity.3
man/man3/MP4GetVideoProfileLevel.3
man/man3/MP4Info.3
man/man3/MP4MakeIsmaCompliant.3
man/man3/MP4Modify.3
man/man3/MP4Optimize.3
man/man3/MP4Read.3
man/man3/MP4ReadRtpHint.3
man/man3/MP4ReadRtpPacket.3
man/man3/MP4ReadSample.3
man/man3/MP4ReadSampleFromEditTime.3
man/man3/MP4ReadSampleFromTime.3
man/man3/MP4SetAudioProfileLevel.3
man/man3/MP4SetGraphicsProfileLevel.3
man/man3/MP4SetHintTrackRtpPayload.3
man/man3/MP4SetHintTrackSdp.3
man/man3/MP4SetODProfileLevel.3
man/man3/MP4SetRtpTimestampStart.3
man/man3/MP4SetSampleRenderingOffset.3
man/man3/MP4SetSceneProfileLevel.3
man/man3/MP4SetSessionSdp.3
man/man3/MP4SetTimeScale.3
man/man3/MP4SetTrackESConfiguration.3
man/man3/MP4SetTrackEditDuration.3
man/man3/MP4SetTrackEditDwell.3
man/man3/MP4SetTrackEditMediaStart.3
man/man3/MP4SetTrackTimeScale.3
man/man3/MP4SetVerbosity.3
man/man3/MP4SetVideoProfileLevel.3
man/man3/MP4WriteRtpHint.3
man/man3/MP4WriteSample.3

View file

@ -0,0 +1,19 @@
# $NetBSD: buildlink3.mk,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
LIBMP4V2_BUILDLINK3_MK:= ${LIBMP4V2_BUILDLINK3_MK}+
.if ${BUILDLINK_DEPTH} == "+"
BUILDLINK_DEPENDS+= libmp4v2
.endif
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlibmp4v2}
BUILDLINK_PACKAGES+= libmp4v2
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}libmp4v2
.if ${LIBMP4V2_BUILDLINK3_MK} == "+"
BUILDLINK_API_DEPENDS.libmp4v2+= libmp4v2>=1.5.0.1
BUILDLINK_PKGSRCDIR.libmp4v2?= ../../multimedia/libmp4v2
.endif # LIBMP4V2_BUILDLINK3_MK
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}

View file

@ -0,0 +1,17 @@
$NetBSD: distinfo,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
SHA1 (mpeg4ip-1.5.0.1.tar.gz) = 1271de695ed65284d9c39aa91bf26c5494603fd3
RMD160 (mpeg4ip-1.5.0.1.tar.gz) = fee5c21c17a470e6de349e07d233a1eb46b2064a
Size (mpeg4ip-1.5.0.1.tar.gz) = 4826180 bytes
SHA1 (patch-aa) = c35f7bfd5f8fe229fd022def69a7030ffa837c07
SHA1 (patch-ab) = 93875dfe86b50c399113915fbac523becae3e2aa
SHA1 (patch-ac) = 9e4683fdbbfa3b85941243547773814ea50125a9
SHA1 (patch-ad) = e5dd062d7f17230bf27ffde0fc2db72d8357fd56
SHA1 (patch-ae) = 0418c4fa0fd966b3d5303d4f95a300d94fc48111
SHA1 (patch-af) = a69e136fbe8db5ae844c90ae5e2f06e86bf2ed85
SHA1 (patch-ag) = 76ec743b051ef39e4edb211a15a2accbf491d0b1
SHA1 (patch-ah) = b5db1d879cf790c2b9c7e9132b14e1fc59e9cb4d
SHA1 (patch-ai) = 8815f81cc09bb36944bf33691aaf9060b545c76e
SHA1 (patch-aj) = f0aeab4c17bb8a737a9ae3d4385c9f2989540ea7
SHA1 (patch-ak) = 36da5d4d2824cc8b3ac62e10924058dd651cb2a7
SHA1 (patch-al) = ee0beacdc9595f258cc1833f0d3ab91209c2ab1b

View file

@ -0,0 +1,22 @@
$NetBSD: patch-aa,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
--- bootstrap.orig 2005-08-12 17:17:17.000000000 +0000
+++ bootstrap
@@ -34,7 +34,7 @@ if (test ! -f "$MPEG4IP_SRC/configure")
exit 1
fi
-target_system=`uname -s`
+target_system=Linux
if sdl-config --version >/dev/null 2>/dev/null
then
echo "SDL appears to be installed"
@@ -56,7 +56,7 @@ if test $target_system = "Linux"; then
if test $have_faac = "yes"; then
# we have lame and faac - see if faac is built with mp4 support
- faac --help >&faac_help
+ faac --help >faac_help 2>&1
sdf=`grep "MP4 support unavailable" faac_help`
rm -f faac_help
if test -z "$sdf"; then

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ab,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
--- configure.orig 2005-11-11 00:26:00.000000000 +0000
+++ configure
@@ -1570,7 +1570,7 @@ echo "$as_me: error: Please run bootstra
{ (exit 1); exit 1; }; }
exit -1
fi
-rm -f config.h >&/dev/null
+rm -f config.h >/dev/null
touch config.h
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do

View file

@ -0,0 +1,17 @@
$NetBSD: patch-ac,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
--- include/mpeg4ip_byteswap.h.orig 2006-04-28 09:17:18.000000000 +0000
+++ include/mpeg4ip_byteswap.h
@@ -50,6 +50,12 @@
#define B2N_32(x) x = swap32(x)
#define B2N_64(x) x = swap64(x)
+#elif defined(__DragonFly__)
+#include <sys/endian.h>
+#define B2N_16(x) x = be16toh(x)
+#define B2N_32(x) x = be32toh(x)
+#define B2N_64(x) x = be64toh(x)
+
/* This is a slow but portable implementation, it has multiple evaluation
* problems so beware.
* FreeBSD and Solaris don't have <byteswap.h> or any other such

View file

@ -0,0 +1,22 @@
$NetBSD: patch-ad,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
--- lib/SDLAudio/configure.orig 2006-04-28 09:21:28.000000000 +0000
+++ lib/SDLAudio/configure
@@ -23435,7 +23435,7 @@ fi;
# causes Carbon.p complaints?
# pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
;;
- *-*-freebsd*)
+ *-*-freebsd* | *-*-dragonfly*)
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
pthread_lib="-pthread"
;;
@@ -24553,7 +24553,7 @@ case "$target" in
# Set up files for the thread library
# Set up files for the timer library
;;
- *-*-freebsd*)
+ *-*-freebsd* | *-*-dragonfly*)
ARCH=freebsd
CheckDiskAudio

View file

@ -0,0 +1,14 @@
$NetBSD: patch-ae,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
--- include/mpeg4ip.h.orig 2006-06-08 12:22:14.000000000 +0900
+++ include/mpeg4ip.h 2006-06-08 12:23:04.000000000 +0900
@@ -233,7 +233,8 @@
#define ADV_SPACE(a) {while (isspace(*(a)) && (*(a) != '\0'))(a)++;}
-#ifndef HAVE_GTK
+#ifndef __G_LIB_H__
+/* #ifndef HAVE_GTK */
typedef char gchar;
typedef unsigned char guchar;

View file

@ -0,0 +1,19 @@
$NetBSD: patch-af,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
gcc4 does not like "static" external function declarations.
--- lib/SDLAudio/src/audio/sun/SDL_sunaudio.c.orig 2004-02-24 21:36:07.000000000 +0100
+++ lib/SDLAudio/src/audio/sun/SDL_sunaudio.c 2006-06-16 09:16:42.000000000 +0200
@@ -163,9 +163,11 @@ void DSP_WaitAudio(_THIS)
#endif
}
+static Uint8 snd2au(int sample);
+
void DSP_PlayAudio(_THIS)
{
- static Uint8 snd2au(int sample);
+
/* Write the audio data */
if ( ulaw_only ) {
/* Assuming that this->spec.freq >= 8000 Hz */

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ag,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
--- common/video/iso-mpeg4/src/Makefile.in.orig 2006-07-22 21:14:45.000000000 +0200
+++ common/video/iso-mpeg4/src/Makefile.in 2006-07-22 21:14:54.000000000 +0200
@@ -255,7 +255,7 @@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
-AM_CXXFLAGS = -D__TRACE_AND_STATS_ -D__DOUBLE_PRECISION_ -D_REENTRANT -DNOCONTROLS -fexceptions -Wall -Werror -D_OBSS_ @BILLS_CPPWARNINGS@
+AM_CXXFLAGS = -D__TRACE_AND_STATS_ -D__DOUBLE_PRECISION_ -D_REENTRANT -DNOCONTROLS -fexceptions -Wall -D_OBSS_ @BILLS_CPPWARNINGS@
INCLUDES = -I$(srcdir)/../include
lib_LTLIBRARIES = libmpeg4ip_mpeg4_iso.la
mp4vdec_SOURCES = \

View file

@ -0,0 +1,17 @@
$NetBSD: patch-ah,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
The MAX macro is not defined on all systems (e.g. solaris)
--- lib/rtp/rtp.c.orig 2006-03-20 18:08:24.000000000 -0500
+++ lib/rtp/rtp.c
@@ -61,6 +61,10 @@
#include "rtp.h"
+#ifndef MAX
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+
typedef struct {
uint32_t key; /* Original allocation number */
uint32_t size; /* Size of allocation requested */

View file

@ -0,0 +1,24 @@
$NetBSD: patch-ai,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
Tags: for-upstream
--- doc/mp4v2/Makefile.am.orig 2003-02-06 20:15:04.000000000 +0100
+++ doc/mp4v2/Makefile.am 2007-01-05 18:20:54.000000000 +0100
@@ -1,5 +1,4 @@
-this_FILES = \
- api.mpt \
+man_MANS = \
MP4.3 \
MP4AddAudioTrack.3 \
MP4AddHintTrack.3 \
@@ -109,7 +108,6 @@ this_FILES = \
MP4WriteRtpHint.3 \
MP4WriteSample.3
-
-man_MANS = $(this_FILES)
-
-EXTRA_DIST = $(this_FILES)
+EXTRA_DIST = \
+ api.mpt \
+ $(this_FILES)

View file

@ -0,0 +1,14 @@
$NetBSD: patch-aj,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
Tags: not-for-upstream
--- doc/mp4v2/Makefile.in.orig 2007-01-05 18:21:23.000000000 +0100
+++ doc/mp4v2/Makefile.in 2007-01-05 18:21:29.000000000 +0100
@@ -231,7 +231,6 @@ target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
this_FILES = \
- api.mpt \
MP4.3 \
MP4AddAudioTrack.3 \
MP4AddHintTrack.3 \

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ak,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
--- lib/mp4v2/Makefile.in.orig 2007-02-09 13:03:33.000000000 +0100
+++ lib/mp4v2/Makefile.in
@@ -284,7 +284,7 @@ target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
-SUBDIRS = . test util
+#SUBDIRS = . test util
INCLUDES = -I$(top_srcdir)/include
AM_CXXFLAGS = @BILLS_CPPWARNINGS@
lib_LTLIBRARIES = libmp4v2.la

View file

@ -0,0 +1,20 @@
$NetBSD: patch-al,v 1.1.1.1 2007/02/09 19:57:48 drochner Exp $
--- lib/mp4v2/mp4.h.orig 2006-02-22 23:47:07.000000000 +0100
+++ lib/mp4v2/mp4.h
@@ -31,8 +31,15 @@
#ifndef __MP4_INCLUDED__
#define __MP4_INCLUDED__
+#ifdef MPEG4IP
/* include system and project specific headers */
#include "mpeg4ip.h"
+#else
+#include <sys/types.h>
+#include <strings.h>
+#include <stdio.h>
+#include <stdbool.h>
+#endif
#include <math.h> /* to define float HUGE_VAL and/or NAN */
#ifndef NAN