Implement an HTTP API to query and control the server

This commit is contained in:
aler9
2021-07-04 18:13:49 +02:00
committed by Alessandro Ros
parent e516d265d6
commit ed375583d0
21 changed files with 1139 additions and 227 deletions

View File

@@ -91,12 +91,6 @@ func (s *rtspSource) Close() {
s.ctxCancel()
}
// IsSource implements source.
func (s *rtspSource) IsSource() {}
// IsSourceStatic implements sourceStatic.
func (s *rtspSource) IsSourceStatic() {}
func (s *rtspSource) log(level logger.Level, format string, args ...interface{}) {
s.parent.Log(level, "[rtsp source] "+format, args...)
}
@@ -214,3 +208,10 @@ func (s *rtspSource) runInner() bool {
return true
}
}
// OnSourceAPIDescribe implements source.
func (*rtspSource) OnSourceAPIDescribe() interface{} {
return struct {
Type string `json:"type"`
}{"rtspSource"}
}