rewrite transport header

This commit is contained in:
aler9
2020-09-05 22:19:06 +02:00
parent 37e3a1f29f
commit 8525e1e0ff
6 changed files with 266 additions and 83 deletions

View File

@@ -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