From ba9ce9b37f2b1a30839c1ea0097f3723eb1076a1 Mon Sep 17 00:00:00 2001 From: saxon Date: Sat, 25 Aug 2018 23:29:40 +0930 Subject: [PATCH] rtmp: created rtmp_sys.go file to emulate rtmp_sys.c in c librtmp library and moved SET_RCVTIMEO there --- rtmp/rtmp.go | 5 ----- rtmp/rtmp_sys.go | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 rtmp/rtmp_sys.go diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index bea19140..728deaed 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -149,11 +149,6 @@ var ( } ) -// TODO: find location in c file -func SET_RCVTIMEO(tv *int32, s int32) { - *tv = s * 1000 -} - func startSession(rtmp *C_RTMP, u string, timeout uint32) (*C_RTMP, error) { connect_timeout := int32(timeout) rtmp = C_RTMP_Alloc() diff --git a/rtmp/rtmp_sys.go b/rtmp/rtmp_sys.go new file mode 100644 index 00000000..13fdc361 --- /dev/null +++ b/rtmp/rtmp_sys.go @@ -0,0 +1,7 @@ +package rtmp + +// #define SET_RCVTIMEO(tv,s) int tv = s*1000 +// rtmp_sys.h +43 +func SET_RCVTIMEO(tv *int32, s int32) { + *tv = s * 1000 +}