mirror of https://bitbucket.org/ausocean/av.git
Fixing rtmp stuff
This commit is contained in:
parent
36986d543b
commit
f3da74a364
|
@ -128,12 +128,6 @@ func NewRevidInstance(config Config) (r *revidInst, err error) {
|
|||
go r.packClips()
|
||||
r.Log(Info, "New revid instance created! config is:")
|
||||
r.Log(Info, fmt.Sprintf("%v", r.config))
|
||||
if r.setupOutput != nil {
|
||||
err = r.setupOutput()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -234,6 +228,13 @@ func (r *revidInst) Start() {
|
|||
return
|
||||
}
|
||||
r.Log(Info, "Starting Revid!")
|
||||
if r.setupOutput != nil {
|
||||
err := r.setupOutput()
|
||||
if err != nil {
|
||||
r.Log(Error, "Output setup didn't work!")
|
||||
return
|
||||
}
|
||||
}
|
||||
go r.setupInput()
|
||||
go r.outputClips()
|
||||
r.isRunning = true
|
||||
|
@ -248,6 +249,9 @@ func (r *revidInst) Stop() {
|
|||
if r.cmd != nil && r.cmd.Process != nil {
|
||||
r.cmd.Process.Kill()
|
||||
}
|
||||
if r.config.RtmpMethod == LibRtmp {
|
||||
r.rtmpInst.EndSession()
|
||||
}
|
||||
} else {
|
||||
r.Log(Warning, "revidInst.Stop() called but revid not running!")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue