-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Labels
Description
This issue requires this pull request to be merged:
#380
The initial implementation of osvrServerAutoStart
and osvrServerRelease
only supports Windows at the moment (and a commented out, untested version for *nix platforms).
The Android implementation is a bit special. On Android, this API needs to start the server in the same process on a separate thread. There is an example of this in the OSVR-Android-Samples here:
https://github.com/OSVR/OSVR-Android-Samples/blob/master/OSVROpenGL/app/src/main/jni/main.cpp#L245-L260
However, the osvrServerAutoStart
implementation will need to work differently than the sample:
- The configuration file, for now, should either be dynamically generated or hard coded. The "current working directory" hack in the sample won't cut it for the general case.
- Eventually, we'll have a shared configuration that persists between apps. For now, hard code it as is done in the sample.
- Instead of auto-loading plugins or searching for plugins on the file system and dynamically loading them, the Android platform needs to include all plugins as "libraries", which on Android have to be placed in one single flat architecture-specific directory, which is never extracted from the apk when the app is installed.
- The "plugins" will have to be pre-loaded outside of OSVR-Core, explicitly.
- The
osvrServerAutoStart
function is going to need to call the plugin entry points explicitly at the right moment. - The
osvrServerAutoStart
may be able to skip some steps in theosvr::server::configureServerFromFile
function as they don't apply to Android (e.g. plugin/driver auto-loading).
osvrServerRelease
is no longer a no-op on Android, but must clean up the server thread.- Both
osvrServerAutoStart
andosvrServerRelease
must be idempotent and thread-safe.