mirror of
				https://github.com/aler9/gortsplib
				synced 2025-10-31 02:26:57 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			488 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			488 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package gortsplib
 | |
| 
 | |
| // Transport is a RTSP transport protocol.
 | |
| type Transport int
 | |
| 
 | |
| // standard transport protocols.
 | |
| const (
 | |
| 	TransportUDP Transport = iota
 | |
| 	TransportUDPMulticast
 | |
| 	TransportTCP
 | |
| )
 | |
| 
 | |
| var transportLabels = map[Transport]string{
 | |
| 	TransportUDP:          "UDP",
 | |
| 	TransportUDPMulticast: "UDP-multicast",
 | |
| 	TransportTCP:          "TCP",
 | |
| }
 | |
| 
 | |
| // String implements fmt.Stringer.
 | |
| func (t Transport) String() string {
 | |
| 	if l, ok := transportLabels[t]; ok {
 | |
| 		return l
 | |
| 	}
 | |
| 	return "unknown"
 | |
| }
 | 
