summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--multimedia/Makefile1
-rw-r--r--multimedia/naludump/Makefile26
-rw-r--r--multimedia/naludump/distinfo2
-rw-r--r--multimedia/naludump/files/patch-Makefile11
-rw-r--r--multimedia/naludump/files/patch-libsi-headers.h14
-rw-r--r--multimedia/naludump/files/patch-libsi-si.c24
-rw-r--r--multimedia/naludump/files/patch-tools.c15
-rw-r--r--multimedia/naludump/pkg-descr11
8 files changed, 104 insertions, 0 deletions
diff --git a/multimedia/Makefile b/multimedia/Makefile
index dec5aac9ef36..92d913a28cf8 100644
--- a/multimedia/Makefile
+++ b/multimedia/Makefile
@@ -241,6 +241,7 @@
SUBDIR += mxflib
SUBDIR += mythtv
SUBDIR += mythtv-frontend
+ SUBDIR += naludump
SUBDIR += nxtvepg
SUBDIR += oggvideotools
SUBDIR += ogmrip
diff --git a/multimedia/naludump/Makefile b/multimedia/naludump/Makefile
new file mode 100644
index 000000000000..d950a22e71dc
--- /dev/null
+++ b/multimedia/naludump/Makefile
@@ -0,0 +1,26 @@
+# Created by: Juergen Lock <nox@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= naludump
+PORTVERSION= 0.1.1
+CATEGORIES= multimedia
+MASTER_SITES= http://www.udo-richter.de/vdr/files/
+
+MAINTAINER= nox@FreeBSD.org
+COMMENT= Delete NALU fill data from h.264 TS files
+
+LICENSE= GPLv2
+
+USES= gmake iconv:wchar_t tar:tgz
+PATCH_STRIP= -p1
+CFLAGS+= "-I${LOCALBASE}/include"
+CFLAGS+= "-L${LOCALBASE}/lib"
+CFLAGS+= ${ICONV_LIB}
+MAKE_ARGS+= CC="${CC}" CXX="${CXX}"
+MAKE_ARGS+= CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
+PLIST_FILES+= bin/${PORTNAME}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/multimedia/naludump/distinfo b/multimedia/naludump/distinfo
new file mode 100644
index 000000000000..8919798a34c3
--- /dev/null
+++ b/multimedia/naludump/distinfo
@@ -0,0 +1,2 @@
+SHA256 (naludump-0.1.1.tgz) = b6bd1899b4e4aad8f850b6892b06f9b639e576a5801d2fa63a6a593a022fd2ca
+SIZE (naludump-0.1.1.tgz) = 50459
diff --git a/multimedia/naludump/files/patch-Makefile b/multimedia/naludump/files/patch-Makefile
new file mode 100644
index 000000000000..0460ea29e81a
--- /dev/null
+++ b/multimedia/naludump/files/patch-Makefile
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -8,6 +8,8 @@ OBJS = naludump.o remux.o tools.o libsi/
+
+ DEFINES += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+
++DEFINES += -DO_LARGEFILE=0
++
+ all: naludump
+
+ # Implicit rules:
diff --git a/multimedia/naludump/files/patch-libsi-headers.h b/multimedia/naludump/files/patch-libsi-headers.h
new file mode 100644
index 000000000000..4e2f0101870b
--- /dev/null
+++ b/multimedia/naludump/files/patch-libsi-headers.h
@@ -0,0 +1,14 @@
+--- a/libsi/headers.h
++++ b/libsi/headers.h
+@@ -17,7 +17,11 @@
+ #ifndef LIBSI_HEADERS_H
+ #define LIBSI_HEADERS_H
+
++#ifdef __FreeBSD__
++#include <sys/endian.h>
++#else
+ #include <endian.h>
++#endif
+
+ namespace SI {
+
diff --git a/multimedia/naludump/files/patch-libsi-si.c b/multimedia/naludump/files/patch-libsi-si.c
new file mode 100644
index 000000000000..770e8c704a82
--- /dev/null
+++ b/multimedia/naludump/files/patch-libsi-si.c
@@ -0,0 +1,24 @@
+--- a/libsi/si.c
++++ b/libsi/si.c
+@@ -13,7 +13,9 @@
+ #include "si.h"
+ #include <errno.h>
+ #include <iconv.h>
++#ifndef __FreeBSD__
+ #include <malloc.h>
++#endif
+ #include <stdlib.h> // for broadcaster stupidity workaround
+ #include <string.h>
+ #include "descriptor.h"
+@@ -381,7 +383,11 @@ bool convertCharacterTable(const char *f
+ if (SystemCharacterTable) {
+ iconv_t cd = iconv_open(SystemCharacterTable, fromCode);
+ if (cd != (iconv_t)-1) {
++#ifdef __FreeBSD__
++ const char *fromPtr = from;
++#else
+ char *fromPtr = (char *)from;
++#endif
+ while (fromLength > 0 && toLength > 1) {
+ if (iconv(cd, &fromPtr, &fromLength, &to, &toLength) == size_t(-1)) {
+ if (errno == EILSEQ) {
diff --git a/multimedia/naludump/files/patch-tools.c b/multimedia/naludump/files/patch-tools.c
new file mode 100644
index 000000000000..9463db9c9442
--- /dev/null
+++ b/multimedia/naludump/files/patch-tools.c
@@ -0,0 +1,15 @@
+--- a/tools.c
++++ b/tools.c
+@@ -14,7 +14,12 @@
+ #include <stdarg.h>
+ #include <stdlib.h>
+ #include <sys/time.h>
++#ifdef __FreeBSD__
++#include <sys/param.h>
++#include <sys/mount.h>
++#else
+ #include <sys/vfs.h>
++#endif
+ #include <time.h>
+ #include <unistd.h>
+ #include <utime.h>
diff --git a/multimedia/naludump/pkg-descr b/multimedia/naludump/pkg-descr
new file mode 100644
index 000000000000..394c2fe3b5c4
--- /dev/null
+++ b/multimedia/naludump/pkg-descr
@@ -0,0 +1,11 @@
+Naludump is a tool to delete NALU fill data from h.264 streams embedded into
+TS files. The overall file structure isn't modified, only complete TS packets
+of NALU fill data are removed.
+
+Naludump contains lots of code of Klaus Schmidinger's VDR, and is based on
+cocepts from Marten Richter's Nalustripper.
+
+Usage:
+naludump inputfile.ts [outputfile.ts]
+
+WWW: http://www.udo-richter.de/vdr/naludump.en.html