remove StreamType from base

This commit is contained in:
aler9
2021-10-30 16:39:02 +02:00
committed by Alessandro Ros
parent 6d340cdf39
commit e8e2059b0d
5 changed files with 27 additions and 43 deletions

View File

@@ -1,16 +1,25 @@
package gortsplib
import (
"github.com/aler9/gortsplib/pkg/base"
)
// StreamType is the stream type.
type StreamType = base.StreamType
// StreamType is a stream type.
type StreamType int
const (
// StreamTypeRTP means that the stream contains RTP packets
StreamTypeRTP StreamType = base.StreamTypeRTP
StreamTypeRTP StreamType = iota
// StreamTypeRTCP means that the stream contains RTCP packets
StreamTypeRTCP StreamType = base.StreamTypeRTCP
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"
}