mirror of
https://github.com/bluenviron/mediamtx
synced 2024-12-17 12:14:34 +00:00
implement PAUSE
This commit is contained in:
parent
c3e99ee583
commit
b02a15b8df
@ -383,6 +383,16 @@ func (c *rtspClient) run(wg sync.WaitGroup) {
|
||||
c.state = "PLAY"
|
||||
c.p.mutex.Unlock()
|
||||
|
||||
case "PAUSE":
|
||||
if c.state != "PLAY" {
|
||||
c.log("ERR: client is in state '%s'", c.state)
|
||||
return
|
||||
}
|
||||
|
||||
c.p.mutex.Lock()
|
||||
c.state = "PRE_PLAY"
|
||||
c.p.mutex.Unlock()
|
||||
|
||||
case "RECORD":
|
||||
if c.state != "PRE_RECORD" {
|
||||
c.log("ERR: client is in state '%s'", c.state)
|
||||
|
Loading…
Reference in New Issue
Block a user