mirror of
https://github.com/servo/servo.git
synced 2025-06-13 19:04:30 +00:00
Added gstreamer support to the magicleap port
This commit is contained in:
parent
555fa75b2c
commit
11b3d78f40
11 changed files with 246 additions and 11 deletions
|
@ -2,25 +2,45 @@ KIND = program
|
|||
|
||||
INCS = \
|
||||
code/inc/ \
|
||||
code/inc.gen/
|
||||
code/inc.gen/ \
|
||||
$(GSTREAMER_DIR)/system/include/glib-2.0 \
|
||||
$(GSTREAMER_DIR)/system/lib64/glib-2.0/include/ \
|
||||
$(GSTREAMER_DIR)/system/include/gstreamer-1.0
|
||||
|
||||
SRCS = \
|
||||
code/src/main.cpp \
|
||||
code/src/Servo2D.cpp
|
||||
|
||||
LIBPATHS.debug = \
|
||||
$(GSTREAMER_DIR)/system/lib64/ \
|
||||
../../../target/magicleap/aarch64-linux-android/debug
|
||||
|
||||
LIBPATHS.release = \
|
||||
$(GSTREAMER_DIR)/system/lib64/ \
|
||||
../../../target/magicleap/aarch64-linux-android/release
|
||||
|
||||
LDFLAGS.device = \
|
||||
-L$(MLSDK)/lumin/stl/libc++/lib
|
||||
|
||||
DATAS = \
|
||||
$(GSTREAMER_DIR)/system/lib64/*.so : bin/ \
|
||||
$(GSTREAMER_DIR)/system/lib64/gstreamer-1.0/*.so : bin/
|
||||
|
||||
STLIBS = \
|
||||
mlservo
|
||||
|
||||
SHLIBS = \
|
||||
glib-2.0 \
|
||||
gobject-2.0 \
|
||||
gstreamer-1.0 \
|
||||
gstapp-1.0 \
|
||||
gstaudio-1.0 \
|
||||
gstbase-1.0 \
|
||||
gstgl-1.0 \
|
||||
gstplayer-1.0 \
|
||||
gstsdp-1.0 \
|
||||
gstvideo-1.0 \
|
||||
gstwebrtc-1.0 \
|
||||
c++abi \
|
||||
log \
|
||||
z
|
||||
|
|
|
@ -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_,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue