mirror of https://bitbucket.org/ausocean/av.git
protocol/rtsp/cmd/record: sess => clt in record
This commit is contained in:
parent
dd58851e6c
commit
ba7e768269
|
@ -41,32 +41,32 @@ func main() {
|
|||
trackPtr := flag.String("track", "track1", "The track that we would like to receive media from.")
|
||||
flag.Parse()
|
||||
|
||||
sess, err := rtsp.NewClient(*rtspServerPtr)
|
||||
clt, err := rtsp.NewClient(*rtspServerPtr)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("creating RTSP session failed with error: %v", err))
|
||||
panic(fmt.Sprintf("creating RTSP client failed with error: %v", err))
|
||||
}
|
||||
|
||||
resp, err := sess.Options()
|
||||
resp, err := clt.Options()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
fmt.Println("Options:")
|
||||
fmt.Println(resp)
|
||||
|
||||
resp, err = sess.Describe()
|
||||
resp, err = clt.Describe()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
fmt.Println("Describe:")
|
||||
fmt.Println(resp)
|
||||
|
||||
resp, err = sess.Setup(*trackPtr, fmt.Sprintf("RTP/AVP;unicast;client_port=%d-%d", *clientPortPtr, *clientPortPtr+1))
|
||||
resp, err = clt.Setup(*trackPtr, fmt.Sprintf("RTP/AVP;unicast;client_port=%d-%d", *clientPortPtr, *clientPortPtr+1))
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
log.Println(resp)
|
||||
|
||||
resp, err = sess.Play()
|
||||
resp, err = clt.Play()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue