mirror of
https://github.com/lkmio/lkm.git
synced 2025-10-03 14:26:27 +08:00
完善rtmp拉流
This commit is contained in:
@@ -1,10 +1,24 @@
|
||||
package rtmp
|
||||
|
||||
import (
|
||||
"github.com/yangjiechina/avformat/utils"
|
||||
"github.com/yangjiechina/live-server/stream"
|
||||
"net"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func CreateTransStream(protocol stream.Protocol, streams []utils.AVStream) stream.ITransStream {
|
||||
if stream.ProtocolRtmp == protocol {
|
||||
return &TransStream{}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
stream.TransStreamFactory = CreateTransStream
|
||||
}
|
||||
|
||||
func TestServer(t *testing.T) {
|
||||
impl := serverImpl{}
|
||||
addr := "0.0.0.0:1935"
|
||||
|
Reference in New Issue
Block a user