goonvif/net.go

22 lines
625 B
Go
Raw Normal View History

2024-10-31 18:22:47 +08:00
package goonvif
import "git.pyer.club/kingecg/goonvif/onvif/xsd/onvif"
func makeStreamSetup(streamType string, transport string) onvif.StreamSetup {
return onvif.StreamSetup{
Stream: onvif.StreamType(streamType),
Transport: onvif.Transport{
Protocol: onvif.TransportProtocol(transport),
},
}
}
const (
StreamTypeRTPUnicast = "RTP-Unicast"
StreamTypeRTPMulticast = "RTP-Multicast"
)
var UdpUnicastStreamSetup = makeStreamSetup(StreamTypeRTPUnicast, "UDP")
var TcpUnicastStreamSetup = makeStreamSetup(StreamTypeRTPUnicast, "TCP")
var RtspMulticastStreamSetup = makeStreamSetup(StreamTypeRTPMulticast, "UDP")