aboutsummaryrefslogtreecommitdiff
path: root/net/rtptools
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2020-01-21 20:48:12 +0000
committerStefan Eßer <se@FreeBSD.org>2020-01-21 20:48:12 +0000
commit638dad5ddd9d898d54465db7bfc115a80620cb45 (patch)
treed50996a031f26fadbb058902669df0562cbf8a24 /net/rtptools
parent777c1c0e4c187de4969a8275214f6cfb11c0234d (diff)
downloadports-638dad5ddd9d898d54465db7bfc115a80620cb45.tar.gz
ports-638dad5ddd9d898d54465db7bfc115a80620cb45.zip
Resurrect rtptools
This port has been deleted on 2019-10-16 as un-fetchable, but there is a repository on GitHub that provides the sources as last used by the port. Approved by: antoine (mentor)
Notes
Notes: svn path=/head/; revision=523740
Diffstat (limited to 'net/rtptools')
-rw-r--r--net/rtptools/Makefile33
-rw-r--r--net/rtptools/distinfo3
-rw-r--r--net/rtptools/files/patch-rtp.h23
-rw-r--r--net/rtptools/files/patch-rtpdump.c24
-rw-r--r--net/rtptools/files/patch-rtpsend.c24
-rw-r--r--net/rtptools/pkg-descr15
6 files changed, 122 insertions, 0 deletions
diff --git a/net/rtptools/Makefile b/net/rtptools/Makefile
new file mode 100644
index 000000000000..2a2491fc7375
--- /dev/null
+++ b/net/rtptools/Makefile
@@ -0,0 +1,33 @@
+# Created by: fenner
+# $FreeBSD$
+
+PORTNAME= rtptools
+DISTVERSION= 1.22
+CATEGORIES= net mbone
+
+MAINTAINER= se@FreeBSD.org
+COMMENT= Set of tools to record, playback, and monitor RTPv2 data streams
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= autoreconf
+GNU_CONFIGURE= yes
+USE_GITHUB= yes
+GH_ACCOUNT= irtlab
+
+.for f in multidump multiplay rtpdump rtpplay rtpsend rtptrans
+PLIST_FILES+= bin/${f}
+PLIST_FILES+= man/man1/${f}.1.gz
+.endfor
+
+OPTIONS_DEFINE= DOCS
+
+PORTDOCS= README.md ChangeLog.html rtptools.html
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} html
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/net/rtptools/distinfo b/net/rtptools/distinfo
new file mode 100644
index 000000000000..423f4ea2ba00
--- /dev/null
+++ b/net/rtptools/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1579552214
+SHA256 (irtlab-rtptools-1.22_GH0.tar.gz) = ac6641558200f5689234989e28ed3c44ead23757ccf2381c8878933f9c2523e0
+SIZE (irtlab-rtptools-1.22_GH0.tar.gz) = 67439
diff --git a/net/rtptools/files/patch-rtp.h b/net/rtptools/files/patch-rtp.h
new file mode 100644
index 000000000000..469b663d5dba
--- /dev/null
+++ b/net/rtptools/files/patch-rtp.h
@@ -0,0 +1,23 @@
+--- rtp.h.orig 2018-03-20 06:17:35 UTC
++++ rtp.h
+@@ -130,13 +130,18 @@ typedef struct {
+ #define RTCP_VALID_MASK (0xc000 | 0x2000 | 0xfe)
+ #define RTCP_VALID_VALUE ((RTP_VERSION << 14) | RTCP_SR)
+
++#define RTCP_FRACTION(x) (((x) >> 24) & 0xFF)
++#define RTCP_LOST(x) ((((x) & 0xFFFFFF) < 0x800000) ? \
++ ((x) & 0xFFFFFF) \
++ : (((x) & 0xFFFFFF) - 0x1000000))
++
+ /*
+ * Reception report block
+ */
+ typedef struct {
+ uint32_t ssrc; /* data source being reported */
+- unsigned int fraction:8; /* fraction lost since last SR/RR */
+- int lost:24; /* cumul. no. pkts lost (signed!) */
++ uint32_t fraclost; /* fraction lost since last SR/RR and */
++ /* cumul. no. pkts lost (signed!) */
+ uint32_t last_seq; /* extended last seq. no. received */
+ uint32_t jitter; /* interarrival jitter */
+ uint32_t lsr; /* last SR packet from this source */
diff --git a/net/rtptools/files/patch-rtpdump.c b/net/rtptools/files/patch-rtpdump.c
new file mode 100644
index 000000000000..e353f478436a
--- /dev/null
+++ b/net/rtptools/files/patch-rtpdump.c
@@ -0,0 +1,24 @@
+--- rtpdump.c.orig 2016-06-20 15:59:04 UTC
++++ rtpdump.c
+@@ -441,8 +441,8 @@ static int parse_control(FILE *out, char
+ for (i = 0; i < r->common.count; i++) {
+ fprintf(out, " (ssrc=0x%lx fraction=%g lost=%lu last_seq=%lu jit=%lu lsr=%lu dlsr=%lu )\n",
+ (unsigned long)ntohl(r->r.sr.rr[i].ssrc),
+- r->r.sr.rr[i].fraction / 256.,
+- (unsigned long)ntohl(r->r.sr.rr[i].lost), /* XXX I'm pretty sure this is wrong */
++ RTCP_FRACTION(ntohl(r->r.sr.rr[i].fraclost)) / 256.,
++ RTCP_LOST(ntohl(r->r.sr.rr[i].fraclost)),
+ (unsigned long)ntohl(r->r.sr.rr[i].last_seq),
+ (unsigned long)ntohl(r->r.sr.rr[i].jitter),
+ (unsigned long)ntohl(r->r.sr.rr[i].lsr),
+@@ -458,8 +458,8 @@ static int parse_control(FILE *out, char
+ for (i = 0; i < r->common.count; i++) {
+ fprintf(out, " (ssrc=0x%lx fraction=%g lost=%lu last_seq=%lu jit=%lu lsr=%lu dlsr=%lu )\n",
+ (unsigned long)ntohl(r->r.rr.rr[i].ssrc),
+- r->r.rr.rr[i].fraction / 256.,
+- (unsigned long)ntohl(r->r.rr.rr[i].lost),
++ RTCP_FRACTION(ntohl(r->r.rr.rr[i].fraclost)) / 256.,
++ RTCP_LOST(ntohl(r->r.rr.rr[i].fraclost)),
+ (unsigned long)ntohl(r->r.rr.rr[i].last_seq),
+ (unsigned long)ntohl(r->r.rr.rr[i].jitter),
+ (unsigned long)ntohl(r->r.rr.rr[i].lsr),
diff --git a/net/rtptools/files/patch-rtpsend.c b/net/rtptools/files/patch-rtpsend.c
new file mode 100644
index 000000000000..1153d0816ca1
--- /dev/null
+++ b/net/rtptools/files/patch-rtpsend.c
@@ -0,0 +1,24 @@
+--- rtpsend.c.orig 2016-06-20 15:59:04 UTC
++++ rtpsend.c
+@@ -354,9 +354,9 @@ static int rtcp_rr(node_t *list, char *p
+ if (strcmp(n->type, "ssrc") == 0)
+ rr->ssrc = htonl(n->num);
+ else if (strcmp(n->type, "fraction") == 0)
+- rr->fraction = (n->num)*256;
+- else if (strcmp(n->type, "lost") == 0) /* PP: alignment OK? */
+- rr->lost = htonl(n->num);
++ rr->fraclost = htonl((ntohl(rr->fraclost) & 0x00ffffff) | ((n->num)*256 << 24));
++ else if (strcmp(n->type, "lost") == 0)
++ rr->fraclost = htonl((ntohl(rr->fraclost) & 0xff000000) | n->num);
+ else if (strcmp(n->type, "last_seq") == 0)
+ rr->last_seq = htonl(n->num);
+ else if (strcmp(n->type, "jit") == 0)
+@@ -926,6 +926,8 @@ int main(int argc, char *argv[])
+ local = (struct in_addr *)host->h_addr_list[0];
+ sin.sin_addr = *local;
+ }
++ } else {
++ usage(argv[0]);
+ }
+
+ /* create/connect sockets */
diff --git a/net/rtptools/pkg-descr b/net/rtptools/pkg-descr
new file mode 100644
index 000000000000..be50ee27bf15
--- /dev/null
+++ b/net/rtptools/pkg-descr
@@ -0,0 +1,15 @@
+The rtptools distribution consists of a number of small applications that
+can be used for processing RTP data.
+
+rtpplay
+ play back RTP sessions recorded by rtpdump
+rtpsend
+ generate RTP packets from textual description, generated by hand or
+ rtpdump
+rtpdump
+ parse and print RTP packets, generating output files suitable for
+ rtpplay and rtpsend
+rtptrans
+ RTP translator between unicast and multicast networks
+
+WWW: http://www.cs.columbia.edu/irt/software/rtptools/