mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-05 07:36:57 +08:00
Implement an HTTP API to query and control the server
This commit is contained in:
@@ -78,12 +78,6 @@ func (s *rtmpSource) Close() {
|
||||
s.ctxCancel()
|
||||
}
|
||||
|
||||
// IsSource implements source.
|
||||
func (s *rtmpSource) IsSource() {}
|
||||
|
||||
// IsSourceStatic implements sourceStatic.
|
||||
func (s *rtmpSource) IsSourceStatic() {}
|
||||
|
||||
func (s *rtmpSource) log(level logger.Level, format string, args ...interface{}) {
|
||||
s.parent.Log(level, "[rtmp source] "+format, args...)
|
||||
}
|
||||
@@ -269,3 +263,10 @@ func (s *rtmpSource) runInner() bool {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// OnSourceAPIDescribe implements source.
|
||||
func (*rtmpSource) OnSourceAPIDescribe() interface{} {
|
||||
return struct {
|
||||
Type string `json:"type"`
|
||||
}{"rtmpSource"}
|
||||
}
|
||||
|
Reference in New Issue
Block a user