main: updated logging in h264 file to mpegts file driver for revid

This commit is contained in:
saxon 2018-09-11 18:40:45 +09:30
parent 547e24da7d
commit 043ff7779a
1 changed files with 4 additions and 2 deletions

View File

@ -28,10 +28,10 @@ LICENSE
package main
import (
"log"
"time"
"bitbucket.org/ausocean/av/revid"
"bitbucket.org/ausocean/utils/smartlogger"
)
const (
@ -39,6 +39,7 @@ const (
outputFile = "output.ts"
frameRate = "25"
runDuration = 120 * time.Second
logPath = "/var/log"
)
// Test h264 inputfile to flv format into rtmp using librtmp c wrapper
@ -51,10 +52,11 @@ func main() {
Output: revid.File,
OutputFileName: outputFile,
Packetization: revid.Mpegts,
Logger: smartlogger.New(smartlogger.Info, logPath),
}
revidInst, err := revid.New(config, 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
}
revidInst.Start()