diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-08-08 21:40:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-08 21:40:50 -0400 |
commit | 337703e03f3c9cc515de2613a56faac04df49a7d (patch) | |
tree | fe61c459b8d72330781b60f9974de3fd89f21bee /support/magicleap/Servo2D/code | |
parent | 555fa75b2c7f4faa0818e86296a4ea3d5b8e4d42 (diff) | |
parent | 11b3d78f403f901b1badd336c35d9d4fda804dab (diff) | |
download | servo-337703e03f3c9cc515de2613a56faac04df49a7d.tar.gz servo-337703e03f3c9cc515de2613a56faac04df49a7d.zip |
Auto merge of #23929 - asajeffrey:magicleap-gstreamer, r=jdm
Added gstreamer support to the magicleap port
<!-- Please describe your changes on the following line: -->
With this PR we can watch videos in magicleap servo.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because I'm not sure how we'd test it
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23929)
<!-- Reviewable:end -->
Diffstat (limited to 'support/magicleap/Servo2D/code')
-rw-r--r-- | support/magicleap/Servo2D/code/src/Servo2D.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/support/magicleap/Servo2D/code/src/Servo2D.cpp b/support/magicleap/Servo2D/code/src/Servo2D.cpp index 2ba1d3a17cb..768abbcae21 100644 --- a/support/magicleap/Servo2D/code/src/Servo2D.cpp +++ b/support/magicleap/Servo2D/code/src/Servo2D.cpp @@ -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_, |