Commit ee2a2df8 authored by dogmaphobic's avatar dogmaphobic

iOS Build

parent 16ad6be3
......@@ -54,10 +54,13 @@ linux {
error("Unsupported Mac toolchain, only 64-bit LLVM+clang is supported")
}
} else : ios {
!equals(QT_MAJOR_VERSION, 5) | !greaterThan(QT_MINOR_VERSION, 4) {
error("Unsupported Qt version, 5.5.x or greater is required for iOS")
}
message("iOS build")
CONFIG += iOSBuild MobileBuild app_bundle
DEFINES += __ios__
warning("iOS build is experimental and not yet functional")
warning("iOS build is experimental and not yet fully functional")
} else {
error("Unsupported build platform, only Linux, Windows, Android and Mac (Mac OS and iOS) are supported")
}
......@@ -107,10 +110,10 @@ iOSBuild {
# For whatever reason, the iOS build fails with these set. Some files have the full,
# properly concatenaded path and file name while others have only the second portion,
# as if BUILDDIR was empty.
OBJECTS_DIR = ~/tmp/qgcfoo
MOC_DIR = ~/tmp/qgcfoo
UI_DIR = ~/tmp/qgcfoo
RCC_DIR = ~/tmp/qgcfoo
OBJECTS_DIR = $$(HOME)/tmp/qgcfoo
MOC_DIR = $$(HOME)/tmp/qgcfoo
UI_DIR = $$(HOME)/tmp/qgcfoo
RCC_DIR = $$(HOME)/tmp/qgcfoo
} else {
OBJECTS_DIR = $${BUILDDIR}/obj
MOC_DIR = $${BUILDDIR}/moc
......@@ -126,7 +129,7 @@ AndroidBuild {
# We place the created plugin lib into the objects dir so that make clean will clean it as well
iOSBuild {
LOCATION_PLUGIN_DESTDIR = ~/tmp/qgcfoo
LOCATION_PLUGIN_DESTDIR = $$(HOME)/tmp/qgcfoo
} else {
LOCATION_PLUGIN_DESTDIR = $$OBJECTS_DIR
}
......
......@@ -28,7 +28,6 @@ LinuxBuild {
CONFIG += link_pkgconfig
packagesExist(gstreamer-1.0) {
message("Including support for video streaming")
DEFINES += QGC_GST_STREAMING
PKGCONFIG += gstreamer-1.0 gstreamer-video-1.0
CONFIG += VideoEnabled
}
......@@ -37,11 +36,19 @@ LinuxBuild {
GST_ROOT = /Library/Frameworks/GStreamer.framework
exists($$GST_ROOT) {
message("Including support for video streaming")
DEFINES += QGC_GST_STREAMING
CONFIG += VideoEnabled
INCLUDEPATH += $$GST_ROOT/Headers
LIBS += -F/Library/Frameworks -framework GStreamer
}
} else:iOSBuild {
#- gstreamer framework installed by the gstreamer iOS SDK installer (default to home directory)
GST_ROOT = $$(HOME)/Library/Developer/GStreamer/iPhone.sdk/GStreamer.framework
exists($$GST_ROOT) {
message("Including support for video streaming")
CONFIG += VideoEnabled
INCLUDEPATH += $$GST_ROOT/Headers
LIBS += -F$$(HOME)/Library/Developer/GStreamer/iPhone.sdk -framework GStreamer
}
} else:WindowsBuild {
#- gstreamer installed by default under c:/gstreamer
# This is not working. It builds but at runtime, it expects to find
......@@ -51,7 +58,6 @@ LinuxBuild {
GST_ROOT = c:/gstreamer/1.0/x86
exists($$GST_ROOT) {
message("Including support for video streaming")
DEFINES += QGC_GST_STREAMING
CONFIG += VideoEnabled
LIBS += -L$$GST_ROOT/lib/gstreamer-1.0/static -lgstreamer-1.0 -lgstvideo-1.0 -lgstbase-1.0
LIBS += -L$$GST_ROOT/lib -lglib-2.0 -lintl -lgobject-2.0
......@@ -67,6 +73,7 @@ LinuxBuild {
VideoEnabled {
DEFINES += \
QGC_GST_STREAMING \
GST_PLUGIN_BUILD_STATIC \
QTGLVIDEOSINK_NAME=qt5glvideosink \
QTVIDEOSINK_NAME=qt5videosink
......
......@@ -161,7 +161,7 @@ bool BaseDelegate::event(QEvent *event)
BufferEvent *bufEvent = dynamic_cast<BufferEvent*>(event);
Q_ASSERT(bufEvent);
GST_TRACE_OBJECT(m_sink, "Received buffer %"GST_PTR_FORMAT, bufEvent->buffer);
GST_TRACE_OBJECT(m_sink, "Received buffer %" GST_PTR_FORMAT, bufEvent->buffer);
if (isActive()) {
gst_buffer_replace (&m_buffer, bufEvent->buffer);
......
......@@ -43,7 +43,7 @@ QWidget *QWidgetVideoSinkDelegate::widget() const
void QWidgetVideoSinkDelegate::setWidget(QWidget *widget)
{
GST_LOG_OBJECT(m_sink, "Setting \"widget\" property to %"GST_PTR_FORMAT, widget);
GST_LOG_OBJECT(m_sink, "Setting \"widget\" property to %" GST_PTR_FORMAT, widget);
if (m_widget) {
m_widget.data()->removeEventFilter(this);
......
......@@ -254,7 +254,7 @@ gst_qt_quick2_video_sink_show_frame(GstVideoSink *sink, GstBuffer *buffer)
{
GstQtQuick2VideoSink *self = GST_QT_QUICK2_VIDEO_SINK (sink);
GST_TRACE_OBJECT(self, "Posting new buffer (%"GST_PTR_FORMAT") for rendering.", buffer);
GST_TRACE_OBJECT(self, "Posting new buffer (%" GST_PTR_FORMAT ") for rendering.", buffer);
QCoreApplication::postEvent(self->priv->delegate, new BaseDelegate::BufferEvent(buffer));
......
......@@ -213,7 +213,7 @@ GstFlowReturn GstQtVideoSinkBase::show_frame(GstVideoSink *video_sink, GstBuffer
{
GstQtVideoSinkBase *sink = GST_QT_VIDEO_SINK_BASE(video_sink);
GST_TRACE_OBJECT(sink, "Posting new buffer (%"GST_PTR_FORMAT") for rendering.", buffer);
GST_TRACE_OBJECT(sink, "Posting new buffer (%" GST_PTR_FORMAT") for rendering.", buffer);
QCoreApplication::postEvent(sink->delegate, new BaseDelegate::BufferEvent(buffer));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment