mirror of
https://github.com/lkmio/lkm.git
synced 2025-09-26 19:21:14 +08:00
支持国标级联
This commit is contained in:
@@ -124,7 +124,7 @@ func (h handler) OnDescribe(request Request) (*http.Response, []byte, error) {
|
||||
}
|
||||
}
|
||||
|
||||
sinkId := stream.GenerateSinkId(request.session.conn.RemoteAddr())
|
||||
sinkId := stream.NetAddr2SinkId(request.session.conn.RemoteAddr())
|
||||
sink_ := NewSink(sinkId, request.sourceId, request.session.conn, func(sdp string) {
|
||||
response = NewOKResponse(request.headers.Get("Cseq"))
|
||||
response.Header.Set("Content-Type", "application/sdp")
|
||||
|
@@ -28,9 +28,9 @@ type sink struct {
|
||||
playing bool //是否已经收到play请求
|
||||
}
|
||||
|
||||
func NewSink(id stream.SinkId, sourceId string, conn net.Conn, cb func(sdp string)) stream.Sink {
|
||||
func NewSink(id stream.SinkID, sourceId string, conn net.Conn, cb func(sdp string)) stream.Sink {
|
||||
return &sink{
|
||||
stream.BaseSink{Id_: id, SourceId_: sourceId, Protocol_: stream.ProtocolRtsp, Conn: conn},
|
||||
stream.BaseSink{ID: id, SourceID: sourceId, Protocol: stream.TransStreamRtsp, Conn: conn},
|
||||
nil,
|
||||
cb,
|
||||
false,
|
||||
|
@@ -275,7 +275,7 @@ func NewTransStream(addr net.IPAddr, urlFormat string) stream.TransStream {
|
||||
return t
|
||||
}
|
||||
|
||||
func TransStreamFactory(source stream.Source, protocol stream.Protocol, streams []utils.AVStream) (stream.TransStream, error) {
|
||||
func TransStreamFactory(source stream.Source, protocol stream.TransStreamProtocol, streams []utils.AVStream) (stream.TransStream, error) {
|
||||
trackFormat := "?track=%d"
|
||||
return NewTransStream(net.IPAddr{
|
||||
IP: net.ParseIP(stream.AppConfig.PublicIP),
|
||||
|
Reference in New Issue
Block a user