mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
implement PAUSE
This commit is contained in:
parent
c3e99ee583
commit
b02a15b8df
1 changed files with 10 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue