mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 07:37:07 +08:00
remove StreamType from base
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
Reference in New Issue
Block a user