地面站终端 App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Gus Grubba 41eff746c3 Update README.md 10 years ago
..
gstqtvideosink Documenting marshaller creation for posterity. 10 years ago
README.md Update README.md 10 years ago
VideoItem.cc Build fix. 10 years ago
VideoItem.h Handling build and runtime when NO video support is available. 10 years ago
VideoReceiver.cc Initial setup for Mac Installer (Video Steaming) 10 years ago
VideoReceiver.h Handling build and runtime when NO video support is available. 10 years ago
VideoStreaming.pri Initial setup for Mac Installer (Video Steaming) 10 years ago
VideoSurface.cc Handling build and runtime when NO video support is available. 10 years ago
VideoSurface.h Handling build and runtime when NO video support is available. 10 years ago
VideoSurface_p.h Linux Build 10 years ago

README.md

QGroundControl

Video Streaming

For supported platforms, QGroundControl implements an UDP RTP video streaming receiver in its Main Flight Display. It uses GStreamer and a stripped down version of QtGstreamer. To build video streaming support, you will need to install the GStreamer development packages for the desired target platform.

If you do have the proper GStreamer development libraries installed where QGC looks for it, the QGC build system will automatically use it and build video streaming support. If you would like to disable video streaming support, you can add DISABLE_VIDEOSTREAMING to the DEFINES build variable.

Pipeline

For the time being, the pipeline is somewhat hardcoded, using h.264. It's best to use a camera capable of hardware encoding h.264, such as the Logitech C920. On the sender end, you would run something like this:

gst-launch-1.0 uvch264src initial-bitrate=1000000 average-bitrate=1000000 iframe-period=1000 device=/dev/video0 name=src auto-start=true src.vidsrc ! video/x-h264,width=1920,height=1080,framerate=24/1 ! h264parse ! rtph264pay ! udpsink host=xxx.xxx.xxx.xxx port=5000

Where xxx.xxx.xxx.xxx is the IP address where QGC is running. You may tweak the bitrate, the resolution and the FPS based on your needs and/or available bandwidth.

On the receiving end, if you want to test it from the command line, you can use something like:

gst-launch-1.0 udpsrc port=5000 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264' ! rtph264depay ! avdec_h264 ! autovideosink fps-update-interval=1000 sync=false

Linux

Use apt-get to install GStreamer 1.0

sudo apt-get install gstreamer1.0*
sudo apt-get install libgstreamer1.0*

The build system is setup to use pkgconfig and it will find the necessary headers and libraries automatically.

Mac OS

Download the gstreamer framework from here: http://gstreamer.freedesktop.org/data/pkg/osx. The current version, as this is written is 1.5.2.

You need two packages:

The installer places them under /Library/Frameworks/GStreamer.framework, which is where the QGC build system will look for it. That's all that is needed. When you build QGC and it finds the gstreamer framework, it automatically builds video streaming support.

👉 To run gstreamer commands from the command line, you can add the path to find them (either in ~/.profile or ~/.bashrc):

export PATH=$PATH:/Library/Frameworks/GStreamer.framework/Commands

iOS

TODO: Binaries found in http://gstreamer.freedesktop.org/data/pkg/ios (work in progress)

Android

TODO: Binaries found in http://gstreamer.freedesktop.org/data/pkg/android (work in progress)

Windows

TODO: Binaries found in http://gstreamer.freedesktop.org/data/pkg/windows (work in progress)