mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
26 lines
502 B
Go
26 lines
502 B
Go
package gortsplib
|
|
|
|
// StreamType is a stream type.
|
|
type StreamType int
|
|
|
|
const (
|
|
// StreamTypeRTP means that the stream contains RTP packets
|
|
StreamTypeRTP StreamType = iota
|
|
|
|
// StreamTypeRTCP means that the stream contains RTCP packets
|
|
StreamTypeRTCP
|
|
)
|
|
|
|
var streamTypeLabels = map[StreamType]string{
|
|
StreamTypeRTP: "RTP",
|
|
StreamTypeRTCP: "RTCP",
|
|
}
|
|
|
|
// String implements fmt.Stringer
|
|
func (st StreamType) String() string {
|
|
if l, ok := streamTypeLabels[st]; ok {
|
|
return l
|
|
}
|
|
return "unknown"
|
|
}
|