tello: remove commentted out lines from video example
Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
parent
4fe09d8e04
commit
99410dc4d1
|
@ -3,7 +3,8 @@
|
|||
// Do not build by default.
|
||||
|
||||
/*
|
||||
You must have ffmpeg and ffplay installed in order to run this code.
|
||||
You must have ffmpeg and ffplay installed in order to run this code. it will connect to the Tello
|
||||
and then open a window using ffplay showing the streaming video.
|
||||
|
||||
How to run
|
||||
|
||||
|
@ -25,7 +26,6 @@ func main() {
|
|||
drone := tello.NewDriver("8890")
|
||||
|
||||
work := func() {
|
||||
// launch ffplay and get it ready to display video
|
||||
ffplay := exec.Command("ffplay", "-i", "pipe:0")
|
||||
ffplayIn, _ := ffplay.StdinPipe()
|
||||
if err := ffplay.Start(); err != nil {
|
||||
|
@ -43,12 +43,6 @@ func main() {
|
|||
|
||||
drone.On(tello.VideoFrameEvent, func(data interface{}) {
|
||||
pkt := data.([]byte)
|
||||
// if len(pkt) > 6 && pkt[0] == 0x00 && pkt[1] == 0x00 && pkt[2] == 0x00 && pkt[3] == 0x01 {
|
||||
// nalType := pkt[6] & 0x1f
|
||||
// //fmt.Println("nal type = ", nalType)
|
||||
// }
|
||||
|
||||
//fmt.Printf("Writing %d bytes\n", len(pkt))
|
||||
if _, err := ffplayIn.Write(pkt); err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue