From 1841b16febe004b05cdcebd7b5e761282504fa81 Mon Sep 17 00:00:00 2001 From: saxon Date: Tue, 7 Aug 2018 13:54:58 +0930 Subject: [PATCH] Commented my structs with locations and names in librtmp C library --- rtmp/rtmp.go | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 019c1e37..50562957 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -218,7 +218,9 @@ type session struct { timeout uint } -type RTMP struct { +// typedef struct RTMP +// rtmp.h +237 +type C_RTMP struct { m_inChunkSize int m_outChunkSize int m_nBWCheckCounter int @@ -259,6 +261,8 @@ type RTMP struct { Link RTMP_LNK } +// typedef struct RTMPPacket +// rtmp.h +113 type RTMPPacket struct { m_headerType uint8 m_packetType uint8 @@ -272,16 +276,22 @@ type RTMPPacket struct { m_body *byte } +// typedef struct RTMPMethod +// rtmp.h +231 type RTMP_METHOD struct { name AVal num int } +// typedef struct AVal +// amf.h +57 type AVal struct { av_val *byte av_len int } +// typedef struct RTMP_READ +// rtmp.h +200 type RTMP_READ struct { buf *byte bufpos *byte @@ -300,6 +310,8 @@ type RTMP_READ struct { nIgnoredFlvFrameCounter uint32 } +// typedef struct RTMP_READ +// rtmp.h +200 type RTMPSockBuf struct { sb_socket int sb_size int @@ -309,6 +321,8 @@ type RTMPSockBuf struct { sb_ssl uintptr } +// typedef struct RTMPChunk +// rtmp.h +105 type RTMPChunk struct { c_headerSize int c_chunkSize int @@ -316,6 +330,8 @@ type RTMPChunk struct { c_header [RTMP_MAX_HEADER_SIZE]byte } +// typedef struct RTMP_LNK +// rtmp.h +144 type RTMP_LNK struct { hostname AVal sockshost AVal @@ -345,6 +361,8 @@ type RTMP_LNK struct { port uint16 } +// typedef struct AMF_Object +// amf.h AMFObject +67 type AMFObject struct { o_num int o_props *C.AMFObjectProperty