支持rtmp拉流

This commit is contained in:
yangjiechina
2023-11-27 16:57:04 +08:00
parent 8485f6c857
commit b88be46bb7
3 changed files with 52 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
package rtmp
import (
"github.com/yangjiechina/avformat/librtmp"
"github.com/yangjiechina/avformat/utils"
"github.com/yangjiechina/live-server/stream"
"net"
@@ -9,7 +10,7 @@ import (
func CreateTransStream(protocol stream.Protocol, streams []utils.AVStream) stream.ITransStream {
if stream.ProtocolRtmp == protocol {
return &TransStream{}
return NewTransStream(librtmp.ChunkSize)
}
return nil