Skip to content

Commit

Permalink
tello: remove commentted out lines from video example
Browse files Browse the repository at this point in the history
Signed-off-by: Ron Evans <[email protected]>
  • Loading branch information
deadprogram committed Apr 18, 2018
1 parent 4fe09d8 commit 99410dc
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions examples/tello_video.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand All @@ -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)
}
Expand Down

0 comments on commit 99410dc

Please sign in to comment.