-
Notifications
You must be signed in to change notification settings - Fork 10
/
stream_configuration.go
30 lines (27 loc) · 1.05 KB
/
stream_configuration.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package videoserver
import (
"github.com/deepch/vdk/av"
"github.com/google/uuid"
)
// StreamConfiguration is a configuration parameters for specific stream
type StreamConfiguration struct {
URL string `json:"url"`
Status bool `json:"status"`
SupportedOutputTypes []StreamType `json:"supported_output_types"`
Codecs []av.CodecData `json:"codecs"`
Clients map[uuid.UUID]viewer `json:"-"`
hlsChanel chan av.Packet
mp4Chanel chan av.Packet
verboseLevel VerboseLevel
archive *StreamArchiveWrapper
}
// NewStreamConfiguration returns default configuration
func NewStreamConfiguration(streamURL string, supportedTypes []StreamType) *StreamConfiguration {
return &StreamConfiguration{
URL: streamURL,
Clients: make(map[uuid.UUID]viewer),
hlsChanel: make(chan av.Packet, 100),
mp4Chanel: make(chan av.Packet, 100),
SupportedOutputTypes: supportedTypes,
}
}