mirror of https://bitbucket.org/ausocean/av.git
main: updated logging in h264 file to mpegts file driver for revid
This commit is contained in:
parent
547e24da7d
commit
043ff7779a
|
@ -28,10 +28,10 @@ LICENSE
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"bitbucket.org/ausocean/av/revid"
|
"bitbucket.org/ausocean/av/revid"
|
||||||
|
"bitbucket.org/ausocean/utils/smartlogger"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -39,6 +39,7 @@ const (
|
||||||
outputFile = "output.ts"
|
outputFile = "output.ts"
|
||||||
frameRate = "25"
|
frameRate = "25"
|
||||||
runDuration = 120 * time.Second
|
runDuration = 120 * time.Second
|
||||||
|
logPath = "/var/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Test h264 inputfile to flv format into rtmp using librtmp c wrapper
|
// Test h264 inputfile to flv format into rtmp using librtmp c wrapper
|
||||||
|
@ -51,10 +52,11 @@ func main() {
|
||||||
Output: revid.File,
|
Output: revid.File,
|
||||||
OutputFileName: outputFile,
|
OutputFileName: outputFile,
|
||||||
Packetization: revid.Mpegts,
|
Packetization: revid.Mpegts,
|
||||||
|
Logger: smartlogger.New(smartlogger.Info, logPath),
|
||||||
}
|
}
|
||||||
revidInst, err := revid.New(config, nil)
|
revidInst, err := revid.New(config, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Should not of have got an error!: %v\n", err.Error())
|
config.Logger.Log(smartlogger.Error, "Should not have got an error!:", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
revidInst.Start()
|
revidInst.Start()
|
||||||
|
|
Loading…
Reference in New Issue