mirror of
https://github.com/lkmio/lkm.git
synced 2025-10-05 15:16:49 +08:00
完善注释
This commit is contained in:
@@ -42,7 +42,7 @@ func (s *Session) OnPublish(app, stream_ string, response chan utils.HookState)
|
|||||||
source.Init(source.Input, source.Close, stream.ReceiveBufferTCPBlockCount)
|
source.Init(source.Input, source.Close, stream.ReceiveBufferTCPBlockCount)
|
||||||
source.SetUrlValues(values)
|
source.SetUrlValues(values)
|
||||||
|
|
||||||
//推流事件Source统一处理, 是否已经存在, Hook回调....
|
//统一处理source推流事件, source是否已经存在, hook回调....
|
||||||
_, state := stream.PreparePublishSource(source, true)
|
_, state := stream.PreparePublishSource(source, true)
|
||||||
if utils.HookStateOK != state {
|
if utils.HookStateOK != state {
|
||||||
log.Sugar.Errorf("rtmp推流失败 source:%s", sourceId)
|
log.Sugar.Errorf("rtmp推流失败 source:%s", sourceId)
|
||||||
@@ -87,7 +87,7 @@ func (s *Session) Input(conn net.Conn, data []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Session) Close() {
|
func (s *Session) Close() {
|
||||||
//session/conn/stack相关引用, go释放不了...手动赋值为nil
|
//session/conn/stack相互引用, go释放不了...手动赋值为nil
|
||||||
s.conn = nil
|
s.conn = nil
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
|
@@ -143,7 +143,7 @@ type PublishSource struct {
|
|||||||
|
|
||||||
TransDeMuxer stream.DeMuxer //负责从推流协议中解析出AVStream和AVPacket
|
TransDeMuxer stream.DeMuxer //负责从推流协议中解析出AVStream和AVPacket
|
||||||
recordSink Sink //每个Source的录制流
|
recordSink Sink //每个Source的录制流
|
||||||
hlsStream TransStream //如果开开启HLS传输流, 不等拉流时, 创建直接生成
|
hlsStream TransStream //HLS传输流, 如果开启, 在@seee writeHeader 直接创建, 如果等拉流时再创建, 会进一步加大HLS延迟.
|
||||||
audioTranscoders []transcode.Transcoder //音频解码器
|
audioTranscoders []transcode.Transcoder //音频解码器
|
||||||
videoTranscoders []transcode.Transcoder //视频解码器
|
videoTranscoders []transcode.Transcoder //视频解码器
|
||||||
originStreams StreamManager //推流的音视频Streams
|
originStreams StreamManager //推流的音视频Streams
|
||||||
|
Reference in New Issue
Block a user