summaryrefslogtreecommitdiff
path: root/user/rtmpdump
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-18 21:40:04 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-18 21:40:04 -0500
commit1ca40d8ae502ace87d558a1d26d649366a3b0d34 (patch)
tree3403795aa8713ba3178c910492ca6787de12404e /user/rtmpdump
parentf931e2d891b8a77694c37b4be525796b20932db8 (diff)
downloadpackages-1ca40d8ae502ace87d558a1d26d649366a3b0d34.tar.gz
packages-1ca40d8ae502ace87d558a1d26d649366a3b0d34.tar.bz2
packages-1ca40d8ae502ace87d558a1d26d649366a3b0d34.tar.xz
packages-1ca40d8ae502ace87d558a1d26d649366a3b0d34.zip
user/rtmpdump: pull in, fix up
Diffstat (limited to 'user/rtmpdump')
-rw-r--r--user/rtmpdump/APKBUILD39
-rw-r--r--user/rtmpdump/fix-chunk-size.patch46
2 files changed, 85 insertions, 0 deletions
diff --git a/user/rtmpdump/APKBUILD b/user/rtmpdump/APKBUILD
new file mode 100644
index 000000000..aeaf04c49
--- /dev/null
+++ b/user/rtmpdump/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Carlo Landmeter
+# Maintainer:
+pkgname=rtmpdump
+verbase=2.4
+pkgver=2.4_git20160909
+pkgrel=4
+pkgdesc="A tool to download rtmp:// and rtmpe:// streams"
+url="http://rtmpdump.mplayerhq.hu/"
+arch="all"
+options="!check" # No test suite.
+license="GPL-2.0+"
+depends=""
+depends_dev="zlib-dev"
+makedepends="$depends_dev linux-headers openssl-dev"
+subpackages="$pkgname-dev $pkgname-doc librtmp"
+giturl="git://git.ffmpeg.org/rtmpdump"
+disturl="dev.alpinelinux.org:/archive/rtmpdump"
+source="http://dev.alpinelinux.org/archive/rtmpdump/rtmpdump-${pkgver}.tar.gz
+ fix-chunk-size.patch"
+
+build() {
+ cd "$builddir"
+ make
+}
+
+package() {
+ cd "$builddir"
+ make -j1 prefix=/usr MANDIR="$pkgdir/usr/share/man" DESTDIR="$pkgdir" install
+}
+
+librtmp() {
+ pkgdesc="Real Time Messaging Protocol (RTMP) library"
+ replaces="rtmpdump"
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
+}
+
+sha512sums="e42eda75679addb6f919f42ddce2d27a6988f505602bb70ecb4d071324b59f21d573f8b73fda3b29960c095e20303b84f6eb6254cd327803430d8065cf5d172b rtmpdump-2.4_git20160909.tar.gz
+f97b4780fb8cfffccf59785c5a89c8d4929e21ec587192f10602caaf9a0b008dfbfebaa09db1d9d955fc9911fc443d76bf19972cc59fedfab5a8889f7fe70b5d fix-chunk-size.patch"
diff --git a/user/rtmpdump/fix-chunk-size.patch b/user/rtmpdump/fix-chunk-size.patch
new file mode 100644
index 000000000..b71427327
--- /dev/null
+++ b/user/rtmpdump/fix-chunk-size.patch
@@ -0,0 +1,46 @@
+diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
+index a2863b0..ac1b3be 100644
+--- a/librtmp/rtmp.c
++++ b/librtmp/rtmp.c
+@@ -2077,6 +2077,29 @@ RTMP_SendClientBW(RTMP *r)
+ }
+
+ static int
++SendClientChunkSize(RTMP *r, int chunkSize)
++{
++ RTMPPacket packet;
++ char pbuf[256], *pend = pbuf + sizeof(pbuf);
++ int ret;
++
++ packet.m_nChannel = 0x02; /* control channel (invoke) */
++ packet.m_headerType = RTMP_PACKET_SIZE_LARGE;
++ packet.m_packetType = RTMP_PACKET_TYPE_CHUNK_SIZE;
++ packet.m_nTimeStamp = 0;
++ packet.m_nInfoField2 = 0;
++ packet.m_hasAbsTimestamp = 0;
++ packet.m_body = pbuf + RTMP_MAX_HEADER_SIZE;
++
++ packet.m_nBodySize = 4;
++
++ AMF_EncodeInt32(packet.m_body, pend, chunkSize);
++ ret = RTMP_SendPacket(r, &packet, FALSE);
++ r->m_outChunkSize = chunkSize;
++ return ret;
++}
++
++static int
+ SendBytesReceived(RTMP *r)
+ {
+ RTMPPacket packet;
+@@ -3349,6 +3372,11 @@ HandleChangeChunkSize(RTMP *r, const RTMPPacket *packet)
+ r->m_inChunkSize = AMF_DecodeInt32(packet->m_body);
+ RTMP_Log(RTMP_LOGDEBUG, "%s, received: chunk size change to %d", __FUNCTION__,
+ r->m_inChunkSize);
++ if (r->Link.protocol & RTMP_FEATURE_WRITE)
++ {
++ RTMP_Log(RTMP_LOGDEBUG, "%s, updating outChunkSize too", __FUNCTION__);
++ SendClientChunkSize(r, r->m_inChunkSize);
++ }
+ }
+ }
+