mirror of https://bitbucket.org/ausocean/av.git
revid: changed the input enum for RTSP input from RTSPCamera to RTSP
This commit is contained in:
parent
39a573e10b
commit
88ffdf08b5
|
@ -105,7 +105,7 @@ func handleFlags() revid.Config {
|
|||
var (
|
||||
cpuprofile = flag.String("cpuprofile", "", "write cpu profile to `file`")
|
||||
|
||||
inputPtr = flag.String("Input", "", "The input type: Raspivid, File, Webcam, RTSPCamera")
|
||||
inputPtr = flag.String("Input", "", "The input type: Raspivid, File, Webcam, RTSP")
|
||||
rtspURLPtr = flag.String("RTSPURL", "", "The URL for an RTSP server.")
|
||||
inputCodecPtr = flag.String("InputCodec", "", "The codec of the input: H264, Mjpeg")
|
||||
rtmpMethodPtr = flag.String("RtmpMethod", "", "The method used to send over rtmp: Ffmpeg, Librtmp")
|
||||
|
@ -181,8 +181,8 @@ func handleFlags() revid.Config {
|
|||
cfg.Input = revid.V4L
|
||||
case "File":
|
||||
cfg.Input = revid.File
|
||||
case "RTSPCamera":
|
||||
cfg.Input = revid.RTSPCamera
|
||||
case "RTSP":
|
||||
cfg.Input = revid.RTSP
|
||||
case "":
|
||||
default:
|
||||
log.Log(logger.Error, pkg+"bad input argument")
|
||||
|
|
|
@ -131,7 +131,7 @@ const (
|
|||
Udp
|
||||
MpegtsRtp
|
||||
Rtp
|
||||
RTSPCamera
|
||||
RTSP
|
||||
)
|
||||
|
||||
// Default config settings
|
||||
|
@ -174,7 +174,7 @@ func (c *Config) Validate(r *Revid) error {
|
|||
}
|
||||
|
||||
switch c.Input {
|
||||
case Raspivid, V4L, File, RTSPCamera:
|
||||
case Raspivid, V4L, File, RTSP:
|
||||
case NothingDefined:
|
||||
c.Logger.Log(logger.Info, pkg+"no input type defined, defaulting", "input", defaultInput)
|
||||
c.Input = defaultInput
|
||||
|
|
|
@ -178,7 +178,7 @@ func (r *Revid) reset(config Config) error {
|
|||
switch r.config.Input {
|
||||
case Raspivid, File, V4L:
|
||||
st = mts.H264
|
||||
case RTSPCamera:
|
||||
case RTSP:
|
||||
st = mts.H265
|
||||
}
|
||||
e := mts.NewEncoder(dst, float64(fps), st)
|
||||
|
@ -287,7 +287,7 @@ func (r *Revid) setupPipeline(mtsEnc, flvEnc func(dst io.WriteCloser, rate int)
|
|||
case File:
|
||||
r.setupInput = r.setupInputForFile
|
||||
r.lexTo = h264.Lex
|
||||
case RTSPCamera:
|
||||
case RTSP:
|
||||
r.setupInput = r.startRTSPCamera
|
||||
r.lexTo = h265.NewLexer(false).Lex
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue