22 lines
625 B
Go
22 lines
625 B
Go
|
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")
|