mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
LP-109 video gadget: add Mac support
credits go to Ben Meng for making the video gadget work on Mac
This commit is contained in:
parent
6929e3407b
commit
e30340237f
@ -1,6 +1,29 @@
|
||||
DEFINES += USE_GSTREAMER
|
||||
opencv:DEFINES += USE_OPENCV
|
||||
|
||||
macx {
|
||||
GLIB_DIR = $$system(brew --prefix glib)
|
||||
GSTREAMER_DIR = $$system(brew --prefix gstreamer)
|
||||
GST_BASE_DIR = $$system(brew --prefix gst-plugins-base)
|
||||
|
||||
message(Using glib from here: $$GLIB_DIR)
|
||||
message(Using gstreamer from here: $$GSTREAMER_DIR)
|
||||
message(Using gst base from here: $GST_BASE_DIR)
|
||||
|
||||
INCLUDEPATH += $$GLIB_DIR/include/glib-2.0
|
||||
INCLUDEPATH += $$GLIB_DIR/lib/glib-2.0/include
|
||||
|
||||
INCLUDEPATH += $$GST_BASE_DIR/include/gstreamer-1.0/
|
||||
INCLUDEPATH += $$GSTREAMER_DIR/include/gstreamer-1.0
|
||||
INCLUDEPATH += $$GSTREAMER_DIR/lib/gstreamer-1.0/include
|
||||
|
||||
LIBS +=-L$$GLIB_DIR/lib
|
||||
LIBS += -L$$GSTREAMER_DIR/lib -L$$GST_BASE_DIR/lib
|
||||
|
||||
LIBS += -lglib-2.0 -lgobject-2.0
|
||||
LIBS += -lgstreamer-1.0 -lgstapp-1.0 -lgstpbutils-1.0 -lgstvideo-1.0
|
||||
}
|
||||
|
||||
linux|win32 {
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += glib-2.0 gobject-2.0
|
||||
|
@ -39,6 +39,8 @@ Upgrade to latest version of the packages using Synaptic Package Manager or CLI
|
||||
# Mac
|
||||
###############################################################################
|
||||
|
||||
brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav libav x264
|
||||
|
||||
###############################################################################
|
||||
# How to find required libraries (for copydata.pro)
|
||||
###############################################################################
|
||||
|
@ -91,7 +91,10 @@ VideoWidget::VideoWidget(QWidget *parent) :
|
||||
|
||||
// make the widget native so it gets its own native window id that we will pass to gstreamer
|
||||
setAttribute(Qt::WA_NativeWindow);
|
||||
// setAttribute(Qt::WA_DontCreateNativeAncestors);
|
||||
#ifdef Q_OS_MAC
|
||||
// WA_DontCreateNativeAncestors is needed on mac
|
||||
setAttribute(Qt::WA_DontCreateNativeAncestors);
|
||||
#endif
|
||||
|
||||
// set black background
|
||||
QPalette pal(palette());
|
||||
|
Loading…
Reference in New Issue
Block a user