golanggohlsrtmpwebrtcmedia-serverobs-studiortcprtmp-proxyrtmp-serverrtprtsprtsp-proxyrtsp-relayrtsp-serversrtstreamingwebrtc-proxy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
767 B
34 lines
767 B
package stats |
|
|
|
func ptrInt64() *int64 { |
|
v := int64(0) |
|
return &v |
|
} |
|
|
|
// Stats contains statistics. |
|
type Stats struct { |
|
// use pointers to avoid a crash on 32bit platforms |
|
// https://github.com/golang/go/issues/9959 |
|
CountPublishers *int64 |
|
CountReaders *int64 |
|
CountSourcesRTSP *int64 |
|
CountSourcesRTSPRunning *int64 |
|
CountSourcesRTMP *int64 |
|
CountSourcesRTMPRunning *int64 |
|
} |
|
|
|
// New allocates a Stats. |
|
func New() *Stats { |
|
return &Stats{ |
|
CountPublishers: ptrInt64(), |
|
CountReaders: ptrInt64(), |
|
CountSourcesRTSP: ptrInt64(), |
|
CountSourcesRTSPRunning: ptrInt64(), |
|
CountSourcesRTMP: ptrInt64(), |
|
CountSourcesRTMPRunning: ptrInt64(), |
|
} |
|
} |
|
|
|
// Close closes a stats. |
|
func (s *Stats) Close() { |
|
}
|
|
|