rtmp: created rtmp_sys.go file to emulate rtmp_sys.c in c librtmp library and moved SET_RCVTIMEO there

This commit is contained in:
saxon 2018-08-25 23:29:40 +09:30
parent 6c84506af2
commit ba9ce9b37f
2 changed files with 7 additions and 5 deletions

View File

@ -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()

7
rtmp/rtmp_sys.go Normal file
View File

@ -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
}