summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-06-06 20:25:25 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-06-06 21:04:14 -0700
commitb5acbc37299218b90908bbaf341cf971ad957c07 (patch)
treecea8311d8edde621ae70e1af4cbff868dccdcc67
parent3c6e577749128d007cd7a86b18e3b92515062e04 (diff)
mediaplayer: workaround race condition with agl-service-mediaplayer service
On some startups the agl-service-mediaplayer triggers an event during QML + UI load which causes it to be dropped. Delaying for 300 milliseconds seems to workaround this issue, but needs to be replaced with a proper method in the future. Bug-AGL: SPEC-1496 Change-Id: Iefd825f79b19c422a153b3d77b4d3a472c13c372 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
-rw-r--r--app/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/main.cpp b/app/main.cpp
index 8fa8117..4713fdb 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -31,6 +31,8 @@
#include <bluetooth.h>
#include <mediaplayer.h>
+#include <unistd.h>
+
int main(int argc, char *argv[])
{
QString myname = QString("MediaPlayer");
@@ -98,6 +100,9 @@ int main(int argc, char *argv[])
context->setContextProperty("mediaplayer", new Mediaplayer(bindingAddress));
context->setContextProperty("bluetooth_connection", new Bluetooth(bindingAddress));
+
+ usleep(300000);
+
engine.load(QUrl(QStringLiteral("qrc:/MediaPlayer.qml")));
QObject *root = engine.rootObjects().first();
QQuickWindow *window = qobject_cast<QQuickWindow *>(root);
} /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
SUMMARY = "OpenGL Mathematics"
HOMEPAGE = "http://glm.g-truc.net"
DESCRIPTION = "OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specifications."
LICENSE = "MIT"
SECTION = "multimedia"

inherit pkgconfig cmake

LIC_FILES_CHKSUM = " \
	file://copying.txt;md5=6ba02d5f908587c6f3942e76bf6d92d6 \
"

ALLOW_EMPTY_${PN} = "1"

FILES_${PN}-dev += "/usr/lib/cmake/"