aboutsummaryrefslogtreecommitdiff
path: root/multimedia/mpeg4ip
diff options
context:
space:
mode:
authorMichael Johnson <ahze@FreeBSD.org>2008-07-27 23:52:32 +0000
committerMichael Johnson <ahze@FreeBSD.org>2008-07-27 23:52:32 +0000
commit1fdd6a008f45b6e5719a721af0173e29d4b7b7a2 (patch)
treefe614e3d1265ce8967ead9a61e3f5b6f31dfa8cd /multimedia/mpeg4ip
parenta1414ad0e5660b554c525871f525b97856f62aa5 (diff)
downloadports-1fdd6a008f45b6e5719a721af0173e29d4b7b7a2.tar.gz
ports-1fdd6a008f45b6e5719a721af0173e29d4b7b7a2.zip
Notes
Diffstat (limited to 'multimedia/mpeg4ip')
-rw-r--r--multimedia/mpeg4ip/Makefile8
-rw-r--r--multimedia/mpeg4ip/files/patch-server_mp4live_video_ffmpeg.cpp25
2 files changed, 30 insertions, 3 deletions
diff --git a/multimedia/mpeg4ip/Makefile b/multimedia/mpeg4ip/Makefile
index 3cb4b3384158..162e07a2212d 100644
--- a/multimedia/mpeg4ip/Makefile
+++ b/multimedia/mpeg4ip/Makefile
@@ -157,7 +157,8 @@ post-patch:
s|$$(top_srcdir)/lib/mp4v2/libmp4v2.la||; \
s|$$(top_srcdir)/lib/gnu/libmpeg4ip_gnu.la||; \
s|$$(top_srcdir)/lib/mp4av/libmp4av.la||; \
- s|@LIBS@|@LIBS@ -lmp4v2 -lmp4av -lmpeg4ip_gnu|'
+ s|@LIBS@|@LIBS@ -lmp4v2 -lmp4av -lmpeg4ip_gnu|; \
+ s|nasm|yasm|'
@${REINPLACE_CMD} -e 's|mpeg4ip.h||; \
s|mpeg4ip_config.h||; s|mpeg4ip_version.h||' \
${WRKSRC}/include/Makefile.in
@@ -172,6 +173,7 @@ post-patch:
's|<stdint.h>|<inttypes.h>|; \
s|mp4v2/mp4.h|mp4.h|; \
s|<malloc.h>|<stdlib.h>|; \
+ s|<avcodec.h>|<libavcodec/avcodec.h>|; \
s|<strstream.h>|<iostream>|'
# replacing distfile's libs with ports' versions
# SDL related fixes
@@ -180,7 +182,7 @@ post-patch:
s|sdl-config|${SDL_CONFIG}|; \
s|^(SDL_LIBS=).+$$|\1"`${SDL_CONFIG} --libs`"|; \
s|-Wmissing-declarations||; s|-Wmissing-prototypes||; \
- s|>&/|>/|' \
+ s|>&/|>/|; s|nasm|yasm|' \
${CONFIGURE_WRKSRC}/configure
# do not install manm man pages
@${REINPLACE_CMD} -E \
@@ -219,7 +221,7 @@ WITHOUT_MMX=yes
.ifdef(WITHOUT_MMX)
CONFIGURE_ARGS+= --disable-mmx
.else
-BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm
+BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm
.endif
# compiler optimizations
.if defined(WITH_OPTIMIZED_CFLAGS)
diff --git a/multimedia/mpeg4ip/files/patch-server_mp4live_video_ffmpeg.cpp b/multimedia/mpeg4ip/files/patch-server_mp4live_video_ffmpeg.cpp
new file mode 100644
index 000000000000..2fd02ad2c05e
--- /dev/null
+++ b/multimedia/mpeg4ip/files/patch-server_mp4live_video_ffmpeg.cpp
@@ -0,0 +1,25 @@
+--- server/mp4live/video_ffmpeg.cpp.orig 2008-07-27 18:33:54.140404708 -0500
++++ server/mp4live/video_ffmpeg.cpp 2008-07-27 18:34:54.699683611 -0500
+@@ -121,9 +121,6 @@
+ m_avctx->bit_rate =
+ Profile()->GetIntegerValue(CFG_VIDEO_BIT_RATE) * 1000;
+ #ifndef HAVE_AVCODECCONTEXT_TIME_BASE
+- m_avctx->frame_rate = (int)(Profile()->GetFloatValue(CFG_VIDEO_FRAME_RATE) + 0.5);
+- m_avctx->frame_rate_base = 1;
+-#else
+ m_avctx->time_base = (AVRational){1, (int)(Profile()->GetFloatValue(CFG_VIDEO_FRAME_RATE) + .5)};
+ m_avctx->pix_fmt = PIX_FMT_YUV420P;
+ m_avctx->me_method = ME_EPZS;
+@@ -131,9 +128,9 @@
+ if (Profile()->GetIntegerValue(CFG_VIDEO_MPEG4_PAR_WIDTH) > 0 &&
+ Profile()->GetIntegerValue(CFG_VIDEO_MPEG4_PAR_HEIGHT) > 0) {
+ #ifndef HAVE_AVRATIONAL
+- float asp = (float)Profile()->GetIntegerValue(CFG_VIDEO_MPEG4_PAR_WIDTH);
+- asp /= (float)Profile()->GetIntegerValue(CFG_VIDEO_MPEG4_PAR_HEIGHT);
+- m_avctx->aspect_ratio = asp;
++ AVRational asp = {Profile()->GetIntegerValue(CFG_VIDEO_MPEG4_PAR_WIDTH),
++ Profile()->GetIntegerValue(CFG_VIDEO_MPEG4_PAR_HEIGHT)};
++ m_avctx->sample_aspect_ratio = asp;
+ #else
+ AVRational asp =
+ {Profile()->GetIntegerValue(CFG_VIDEO_MPEG4_PAR_WIDTH),