mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-11-02 11:54:10 +08:00
cleanup --version
This commit is contained in:
@@ -68,7 +68,7 @@ RTSP server.
|
|||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
--help Show context-sensitive help (also try --help-long and --help-man).
|
--help Show context-sensitive help (also try --help-long and --help-man).
|
||||||
--version print rtsp-simple-server version
|
--version print version
|
||||||
--protocols="udp,tcp" supported protocols
|
--protocols="udp,tcp" supported protocols
|
||||||
--rtsp-port=8554 port of the RTSP TCP listener
|
--rtsp-port=8554 port of the RTSP TCP listener
|
||||||
--rtp-port=8000 port of the RTP UDP listener
|
--rtp-port=8000 port of the RTP UDP listener
|
||||||
|
|||||||
4
main.go
4
main.go
@@ -67,7 +67,7 @@ func newProgram(sargs []string) (*program, error) {
|
|||||||
kingpin.CommandLine.Help = "rtsp-simple-server " + Version + "\n\n" +
|
kingpin.CommandLine.Help = "rtsp-simple-server " + Version + "\n\n" +
|
||||||
"RTSP server."
|
"RTSP server."
|
||||||
|
|
||||||
argVersion := kingpin.Flag("version", "print rtsp-simple-server version").Bool()
|
argVersion := kingpin.Flag("version", "print version").Bool()
|
||||||
argProtocolsStr := kingpin.Flag("protocols", "supported protocols").Default("udp,tcp").String()
|
argProtocolsStr := kingpin.Flag("protocols", "supported protocols").Default("udp,tcp").String()
|
||||||
argRtspPort := kingpin.Flag("rtsp-port", "port of the RTSP TCP listener").Default("8554").Int()
|
argRtspPort := kingpin.Flag("rtsp-port", "port of the RTSP TCP listener").Default("8554").Int()
|
||||||
argRtpPort := kingpin.Flag("rtp-port", "port of the RTP UDP listener").Default("8000").Int()
|
argRtpPort := kingpin.Flag("rtp-port", "port of the RTP UDP listener").Default("8000").Int()
|
||||||
@@ -100,7 +100,7 @@ func newProgram(sargs []string) (*program, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if args.version == true {
|
if args.version == true {
|
||||||
fmt.Println("rtsp-simple-server " + Version)
|
fmt.Println(Version)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user