mirror of https://bitbucket.org/ausocean/av.git
fixing build errors
This commit is contained in:
parent
40079c6346
commit
e9693c3289
|
@ -141,7 +141,7 @@ func NewRevidInstance(config Config) (r *revidInst, err error) {
|
|||
return nil, err
|
||||
}
|
||||
}
|
||||
r.generator = tsgenerator.NewTsGenerator(r.config.FrameRate)
|
||||
r.generator = tsgenerator.NewTsGenerator(25)
|
||||
r.generator.Start()
|
||||
r.h264Parser = h264.H264Parser{OutputChan: r.generator.GetNalInputChan()}
|
||||
r.h264Parser.Start()
|
||||
|
@ -179,9 +179,9 @@ func (r *revidInst) Start() {
|
|||
switch r.config.Input {
|
||||
case Raspivid:
|
||||
r.Log(Info, "Starting raspivid!")
|
||||
cmd = exec.Command("raspivid", "-o", "-", "-n", "-t", "0", "-b",
|
||||
r.cmd = exec.Command("raspivid", "-o", "-", "-n", "-t", "0", "-b",
|
||||
r.config.Bitrate, "-qp", r.config.Quantization, "-w", r.config.Width, "-h", r.config.Height, "-fps", r.config.FrameRate, "-ih", "-g", "100")
|
||||
stdout, _ := cmd.StdoutPipe()
|
||||
stdout, _ := r.cmd.StdoutPipe()
|
||||
err := r.cmd.Start()
|
||||
r.inputReader = bufio.NewReader(stdout)
|
||||
if err != nil {
|
||||
|
|
|
@ -54,6 +54,9 @@ type TsGenerator interface {
|
|||
generate()
|
||||
GetNalInputChan() chan<- []byte
|
||||
GetTsOutputChan() <-chan *mpegts.MpegTsPacket
|
||||
Start()
|
||||
genPts()(pts uint64)
|
||||
genPcr()(pts uint64)
|
||||
}
|
||||
|
||||
type tsGenerator struct {
|
||||
|
|
Loading…
Reference in New Issue