mirror of https://bitbucket.org/ausocean/av.git
Merged in remove-cmd-field (pull request #371)
revid: remove cmd field from revid struct Approved-by: Saxon Milton <saxon.milton@gmail.com>
This commit is contained in:
commit
32cce4b85f
|
@ -33,7 +33,6 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os/exec"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
@ -91,12 +90,6 @@ type Revid struct {
|
||||||
// in Revid.Stop().
|
// in Revid.Stop().
|
||||||
closeInput func() error
|
closeInput func() error
|
||||||
|
|
||||||
// cmd is the exec'd process that may be used to produce
|
|
||||||
// the input stream.
|
|
||||||
// FIXME(kortschak): This should not exist. Replace this
|
|
||||||
// with a context.Context cancellation.
|
|
||||||
cmd *exec.Cmd
|
|
||||||
|
|
||||||
// lexTo, encoder and packer handle transcoding the input stream.
|
// lexTo, encoder and packer handle transcoding the input stream.
|
||||||
lexTo func(dest io.Writer, src io.Reader, delay time.Duration) error
|
lexTo func(dest io.Writer, src io.Reader, delay time.Duration) error
|
||||||
|
|
||||||
|
@ -481,10 +474,6 @@ func (r *Revid) Stop() {
|
||||||
|
|
||||||
r.cfg.Logger.Log(logger.Info, pkg+"closed pipeline")
|
r.cfg.Logger.Log(logger.Info, pkg+"closed pipeline")
|
||||||
|
|
||||||
if r.cmd != nil && r.cmd.Process != nil {
|
|
||||||
r.cfg.Logger.Log(logger.Info, pkg+"killing input proccess")
|
|
||||||
r.cmd.Process.Kill()
|
|
||||||
}
|
|
||||||
r.cfg.Logger.Log(logger.Info, pkg+"waiting for routines to close")
|
r.cfg.Logger.Log(logger.Info, pkg+"waiting for routines to close")
|
||||||
|
|
||||||
r.wg.Wait()
|
r.wg.Wait()
|
||||||
|
|
Loading…
Reference in New Issue