mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-04 23:32:44 +08:00
Implement an HTTP API to query and control the server
This commit is contained in:
@@ -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"}
|
||||
}
|
||||
|
Reference in New Issue
Block a user