【文件属性】:
文件名称:GO语言的RTMP库gortmp.zip
文件大小:70KB
文件格式:ZIP
更新时间:2022-08-05 00:22:28
开源项目
GO语言实现的RTMP库
目前实现了Client模式
Examples:
// To connect FMS server
obConn, err := rtmp.Dial(url, handler, 100)
// To connect
err = obConn.Connect()
// When new stream created, handler event OnStreamCreated() would been called
func (handler *TestOutboundConnHandler) OnStreamCreated(stream rtmp.OutboundStream) {
// To play
err = stream.Play(*streamName, nil, nil, nil)
// Or publish
err = stream.Publish(*streamName, "live")
}
// To publish data
stream.PublishAudioData(data, deltaTimestamp)
// or
stream.PublishVideoData(data, deltaTimestamp)
// or
stream.PublishData(tagHeader.TagType, data, deltaTimestamp)
// You can close stream by
stream.Close()
// You can close connection by
obConn.Close()
标签:gortmp
【文件预览】:
gortmp-master
----.travis.yml(211B)
----handshake_test.go(3KB)
----header_test.go(5KB)
----inboundstream.go(7KB)
----message.go(2KB)
----my_test_bytes.go(28KB)
----server.go(2KB)
----outboundstream.go(9KB)
----chunkstream.go(3KB)
----vlc_test_bytes.go(28KB)
----LICENSE(1KB)
----command.go(1KB)
----header.go(11KB)
----.gitignore(2KB)
----defines_test.go(2KB)
----conn.go(33KB)
----outboundconn.go(12KB)
----inboundconn.go(8KB)
----demo()
--------server()
--------proxy()
--------publisher()
--------player()
----handshake.go(10KB)
----README.md(1KB)
----.gitattributes(483B)
----defines.go(19KB)
----fp_test_bytes.go(28KB)