cmd/revid-cli: added flags related to RTSP input

Added 'RTSPCamera' option to description for 'Input' revid-cli flag. Also added other flags required
to set config params for RTSP input, like RTSPURL, RTPRecvAddr and RTCPAddr.
This commit is contained in:
Saxon 2019-05-16 12:55:35 +09:30
parent 25bb49bce7
commit 5a2f15054d
1 changed files with 7 additions and 1 deletions

View File

@ -105,7 +105,10 @@ func handleFlags() revid.Config {
var (
cpuprofile = flag.String("cpuprofile", "", "write cpu profile to `file`")
inputPtr = flag.String("Input", "", "The input type: Raspivid, File, Webcam")
inputPtr = flag.String("Input", "", "The input type: Raspivid, File, Webcam, RTSPCamera")
rtspURLPtr = flag.String("RTSPURL", "", "The URL for an RTSP server.")
rtpRecvAddrPtr = flag.String("RTPRecvAddr", "", "The RTP address we would like to receive RTP from.")
rtcpAddrPtr = flag.String("RTCPAddr", "", "The address for RTCP communication.")
inputCodecPtr = flag.String("InputCodec", "", "The codec of the input: H264, Mjpeg")
rtmpMethodPtr = flag.String("RtmpMethod", "", "The method used to send over rtmp: Ffmpeg, Librtmp")
quantizePtr = flag.Bool("Quantize", false, "Quantize input (non-variable bitrate)")
@ -223,6 +226,9 @@ func handleFlags() revid.Config {
netsender.ConfigFile = *configFilePtr
}
cfg.RTSPURL = *rtspURLPtr
cfg.RTPRecvAddr = *rtpRecvAddrPtr
cfg.RTCPAddr = *rtcpAddrPtr
cfg.Quantize = *quantizePtr
cfg.Rotation = *rotationPtr
cfg.FlipHorizontal = *horizontalFlipPtr