Added gstreamer support to the magicleap port

This commit is contained in:
Alan Jeffrey 2019-08-06 17:59:22 -05:00
parent 555fa75b2c
commit 11b3d78f40
11 changed files with 246 additions and 11 deletions

View file

@ -173,6 +173,15 @@ int Servo2D::init() {
EGLSurface surf = plane_->getEGLSurface();
EGLDisplay dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
// Set up gstreamer
auto tmpdir = getTempPath();
auto bindir = getPackagePath() + "bin";
auto registry = getWritablePath() + "gstreamer-registry.bin";
setenv("GIO_MODULE_DIR", bindir.c_str(), 1);
setenv("GST_PLUGIN_SYSTEM_PATH", bindir.c_str(), 1);
setenv("GST_REGISTRY", registry.c_str(), 1);
setenv("XDG_CACHE_HOME", tmpdir.c_str(), 1);
// Hook into servo
servo_ = init_servo(ctx, surf, dpy, true,
this, logger, history, url, keyboard, uri_, args_,