mirror of
https://github.com/aler9/gortsplib
synced 2025-10-08 16:40:09 +08:00
rewrite transport header
This commit is contained in:
21
utils.go
21
utils.go
@@ -11,7 +11,7 @@ const (
|
||||
rtspMaxContentLength = 4096
|
||||
)
|
||||
|
||||
// StreamProtocol is the protocol of a stream
|
||||
// StreamProtocol is the protocol of a stream.
|
||||
type StreamProtocol int
|
||||
|
||||
const (
|
||||
@@ -30,6 +30,25 @@ func (sp StreamProtocol) String() string {
|
||||
return "tcp"
|
||||
}
|
||||
|
||||
// StreamCast is the cast of a stream.
|
||||
type StreamCast int
|
||||
|
||||
const (
|
||||
// Unicast means that the stream will be unicasted
|
||||
StreamUnicast StreamCast = iota
|
||||
|
||||
// Multicast means that the stream will be multicasted
|
||||
StreamMulticast
|
||||
)
|
||||
|
||||
// String implements fmt.Stringer
|
||||
func (sc StreamCast) String() string {
|
||||
if sc == StreamUnicast {
|
||||
return "unicast"
|
||||
}
|
||||
return "multicast"
|
||||
}
|
||||
|
||||
// StreamType is the type of a stream.
|
||||
type StreamType int
|
||||
|
||||
|
||||
Reference in New Issue
Block a user