Commit graph

209 commits

Author SHA1 Message Date
Jakob Bornecrantz 4b74d6b7eb ipc/server: Remove (f)printf usage from code 2020-12-09 21:03:50 +00:00
Jakob Bornecrantz 1154e58d06 ipc/server: Refactor out per_client_thread 2020-12-09 21:03:50 +00:00
Lubosz Sarnecki 1430b1b22c ipc/server: Add Android main entry point which receives fd. 2020-12-01 18:05:32 +01:00
Lubosz Sarnecki baa68fac4f ipc/server_process: Don't init listen socket and epoll on Android.
As the equivalent is already done in Java.
2020-12-01 18:05:32 +01:00
Lubosz Sarnecki 3202922ce7 ipc/server: Factor out start_server_thread function. 2020-12-01 18:05:32 +01:00
Lubosz Sarnecki db95b34e6c android/Client: Start IPC process in thread. 2020-12-01 18:05:32 +01:00
Lubosz Sarnecki 92dab7b75b android/Client: Create Android surface for OoP. 2020-12-01 18:05:32 +01:00
Ryan Pavlik 4101b3d92d android: IPC/service-related cleanups. 2020-12-01 18:05:32 +01:00
Ryan Pavlik 974e7bd1d5 ipc/android: Be a foreground service 2020-12-01 18:05:32 +01:00
Ryan Pavlik a2a61cb5cf ipc/android: Improve Client 2020-12-01 18:05:32 +01:00
Ryan Pavlik 2fe699d7c1 xrt/android: Actually start using dependency injection in Java/Kotlin code. 2020-12-01 18:05:32 +01:00
Ryan Pavlik 885dd1d4d5 gradle: Handle kotlin in multiple parts of the build 2020-12-01 18:05:32 +01:00
Ryan Pavlik fa840e1cd8 ipc/android: Initial port of parts to Kotlin. 2020-12-01 18:05:32 +01:00
Ryan Pavlik e4a346ad0b ipc/android: Clean ups and debug messages 2020-12-01 18:05:31 +01:00
Ryan Pavlik d9053e0dc5 ipc/android: Single point of truth for action name. 2020-12-01 18:05:31 +01:00
Ryan Pavlik aa222ebba1 ipc/android: Clean up, adjust action name, adjust manifest. 2020-12-01 18:05:31 +01:00
Ryan Pavlik d9453c708e ipc/android: Bump minSdkVersion 2020-12-01 18:05:31 +01:00
Ryan Pavlik 635542f905 gradle: Break release build on a // STOPSHIP comment 2020-12-01 18:05:31 +01:00
Ryan Pavlik 23e01fc656 gradle: Factor out the dependency versions to a build-wide variable 2020-12-01 18:05:31 +01:00
Lubosz Sarnecki 144a5751f6 android/ipc/Client.java: call connectSync.notify(). 2020-12-01 18:05:31 +01:00
Ryan Pavlik da68bf502b ipc/client: Start using Android-specific code if needed. 2020-12-01 18:05:31 +01:00
Ryan Pavlik 9c7cfa0229 ipc/android: Add Android-specific native code library. 2020-12-01 18:05:31 +01:00
Ryan Pavlik 3011e3c9f6 ipc/android: Add a blocking connect Java method, and small clean-ups. 2020-12-01 18:05:31 +01:00
Christoph Haag f5ef3985ba xrt: Add support for locating hand joints in action spaces 2020-11-23 20:42:54 +00:00
Lubosz Sarnecki 8d628c43a9 ipc/server: Port printf calls to static u_logging.
Make messages more consistent.
2020-11-12 15:11:40 +01:00
Lubosz Sarnecki 23aa3652a3 ipc: Port to u_logging. 2020-11-12 15:11:40 +01:00
Ryan Pavlik 86a19e6697 gradle: Remove unused dependencies. 2020-11-10 18:44:03 +00:00
Ryan Pavlik e1e7b92372 ipc/android: Add additional service options 2020-11-05 17:02:21 -06:00
Jakob Bornecrantz b5e847c814 ipc: Add support for device provided bindings 2020-11-05 14:44:04 +00:00
Christoph Haag 4709744d0a ipc: log ipc calls and dispatch with IPC_PRINT_SPEW 2020-11-03 22:32:58 +01:00
Christoph Haag 233f3cb234 ipc: hook up IPC_PRINT_SPEW and IPC_PRINT_DEBUG variables
for both server and client
2020-11-03 22:32:58 +01:00
Ryan Pavlik 5f70826ba5 xrt: Add misc missing copyright/license notices 2020-11-02 17:04:51 +00:00
Jakob Bornecrantz 75ff836e3b ipc: Add ipc_android doc group 2020-10-29 17:02:06 +00:00
Jakob Bornecrantz 585bb6fe7a ipc: Add ipc_shared doc group 2020-10-29 17:02:06 +00:00
Jakob Bornecrantz 3008e5482d ipc: Refactor folders 2020-10-29 17:02:06 +00:00
Christoph Haag 6e5206f232 ipc: Add missing position_tracking_supported passthrough 2020-10-12 22:13:48 +02:00
Christoph Haag 256e2c68d8 xrt: Implement & hook up hand joint tracking infrastructure
Include <inttypes.h> to satisfy older compilers
2020-10-12 22:13:47 +02:00
Jakob Bornecrantz 813487c2f5 ipc: Use new none distortion code 2020-10-07 23:45:46 +01:00
Christoph Haag a0dd182dae build/ctl: Explicitly depend on generated ipc client header
Including a header in the build target is the documented solution for depending on
the generation of files via custom targets.

Fixes build on alpine linux.
2020-10-04 23:44:16 +02:00
Jakob Bornecrantz 3729f2e8c9 ipc: Free client side compositor 2020-10-04 13:04:53 +01:00
Ryan Pavlik dae3ab3a4f xrt: Be sure to include config headers 2020-09-18 13:56:24 +01:00
Christoph Haag eb8a304178 ipc: print send and receive errors with ERROR, not DEBUG
These errors lead to unexpected output and should be investigated.
2020-09-11 18:52:01 +02:00
Jakob Bornecrantz 8e24dda794 xrt: Remove out_timestamp argument to xrt_device::get_tracked_pose 2020-09-07 23:37:09 +01:00
Jakob Bornecrantz 4e6a137c62 ipc: Make it possible to toggle inputs on and off 2020-08-28 11:33:38 +00:00
Ryan Pavlik b944b82f3c ipc: Fix build on Android. 2020-08-26 16:31:41 +01:00
Jakob Bornecrantz 1496262564 xrt: Constify compositor interface 2020-08-26 15:25:00 +01:00
Jakob Bornecrantz 16b9dc13e2 xrt: Correct assert for ipc data type 2020-08-25 14:55:43 +01:00
Jakob Bornecrantz efac59a1d8 ipc: Add support for depth projection 2020-08-25 14:55:43 +01:00
Jakob Bornecrantz 1914a2ee93 ipc: Tidy 2020-08-21 18:17:18 +01:00
Ryan Pavlik 56dcaf5abf ipc: Some comment improvements. 2020-08-19 16:07:00 -05:00
Ryan Pavlik 7c0df6506b ipc/client: Use Android allocator on client side. 2020-08-19 16:07:00 -05:00
Ryan Pavlik 6600e738a3 ipc: Fix loop conditions in loopback allocator 2020-08-19 11:01:49 -05:00
Jakob Bornecrantz 201b5337df ipc: It's okay to send zero handles 2020-08-19 11:45:31 +00:00
Jakob Bornecrantz 019e962f94 ipc: Tidy and better error messages 2020-08-19 11:45:31 +00:00
Jakob Bornecrantz 4754dcd11b ipc: Add support for cube, cylinder and equirect layers 2020-08-14 19:15:02 +00:00
Ryan Pavlik a6b6ab8e2c ipc: Fix conditionals about handle types. 2020-08-13 17:34:05 -05:00
Ryan Pavlik 475192ec73 xrt: Rename "fd" references to "handle"
This breaks some Android pieces, which will be fixed shortly.
2020-08-12 17:11:42 -05:00
Ryan Pavlik 146218b346 xrt: Some clang tidy fixes.
A few suppressions as well where clang-tidy did the wrong thing.
2020-08-12 17:11:42 -05:00
Ryan Pavlik f1432789ee ipc: Const correctness 2020-08-12 09:51:07 -05:00
Jakob Bornecrantz d27044a18d ipc: Add a disabled loopback allocator 2020-08-12 15:26:43 +01:00
Jakob Bornecrantz a834c9977e ipc: Make it possible to give the client compositor a image allocator 2020-08-12 15:26:05 +01:00
Jakob Bornecrantz ca786df18c xrt: Make xrt_swapchain_create_info argument const 2020-08-07 19:15:18 +01:00
Jakob Bornecrantz 0b8d800dcc ipc: Use xrt_compositor_info in proto
Transport the whole compositor info struct to the client instead of just
formats so that all information is easily moved over.
2020-08-06 15:14:49 +00:00
Jakob Bornecrantz 3bbea14f24 ipc: Remove flip_y arguments to compositor creation 2020-08-06 15:14:49 +00:00
Jakob Bornecrantz d1d841e7c3 xrt: Use new info struct for compositor formats 2020-08-06 15:14:49 +00:00
Jakob Bornecrantz e8ca242967 xrt: Remove flip_y argument to native compositor creation 2020-08-06 15:14:49 +00:00
Christoph Haag 9a52e2384f ipc: initialize msg_control buffer 2020-08-05 20:32:51 +00:00
Ryan Pavlik e6abf3dea2 ipc: Docs 2020-07-22 16:17:09 +00:00
Jakob Bornecrantz 536e461776 ipc: Implement xrt_compositor::import_swapchain 2020-07-20 13:50:01 +00:00
Jakob Bornecrantz 11b2dfe213 ipc: Add function to import a swapchain 2020-07-20 13:50:01 +00:00
Jakob Bornecrantz 9c490127bb ipc: Fix in_handles handling by syncing with the server 2020-07-20 13:50:01 +00:00
Jakob Bornecrantz b93017911e xrt: Make xrt_compositor::create_swapchain return xrt_result_t 2020-07-20 13:50:01 +00:00
Ryan Pavlik 82395b23bb ipc: Use generic shmem functions now. 2020-07-16 13:06:07 -05:00
Ryan Pavlik 20c65e74e3 ipc: Define shmem utilities for Linux and Android 2020-07-16 13:06:07 -05:00
Christoph Haag a56fa20b50 build: Install tools with meson 2020-07-16 16:04:51 +02:00
Ryan Pavlik ebc7a11e70 ipc: Support client->server "in_handles" 2020-07-16 11:51:16 +00:00
Ryan Pavlik c3552ed420 xrt: Rename xrt_gfx_fd.h to xrt_gfx_native.h 2020-07-15 17:19:30 -05:00
Ryan Pavlik 54f56716fd xrt: Rename references to compositor/swapchain/image_fd to ..._native.
Reflecting that the native buffer isn't an FD on all platforms.
2020-07-15 09:11:58 -05:00
Ryan Pavlik 86d93601d7 ipc: Work on Android using AHardwareBuffer instead of FDs for graphics 2020-07-14 16:37:55 -05:00
Ryan Pavlik 44fe0e7709 build: Handle Android NDK better. 2020-07-14 16:37:55 -05:00
Ryan Pavlik 60cf946dd7 ipc: Normalize parameter names 2020-07-14 16:37:12 -05:00
Ryan Pavlik abc580d2b1 ipc: Replace "out_fds" with more generic "out_handles"
Also, finish porting client code to use factored-out utils.
2020-07-14 16:37:12 -05:00
Ryan Pavlik 040c82cb24 ipc: Port server side to use new factored-out utils 2020-07-14 16:24:26 -05:00
Ryan Pavlik 166c041421 ipc: Start providing handle marshalling util functions 2020-07-14 16:24:26 -05:00
Ryan Pavlik 1a692f5de6 ipc: Use factored-out utils on client side. 2020-07-14 16:24:26 -05:00
Ryan Pavlik 36f66ea630 ipc: Add factored-out basic message send/receive 2020-07-14 16:24:26 -05:00
Ryan Pavlik a5bde51c81 ipc: Change return type of some server functions from int to xrt_result_t 2020-07-14 16:24:26 -05:00
Ryan Pavlik c2e922b0f5 ipc: Formatting cleanup 2020-07-14 16:24:26 -05:00
Ryan Pavlik 87dbad9865 ipc: Have server utils return xrt_result_t 2020-07-14 16:24:26 -05:00
Ryan Pavlik 687beddcca ipc: Replace ipc_connection_t usage with struct ipc_connection 2020-07-14 16:24:23 -05:00
Ryan Pavlik cf68e11b97 ipc: Be more strict in type parsing 2020-07-14 16:18:17 -05:00
Ryan Pavlik 1b88c7e089 ipc: Move data structure out of generation script 2020-07-14 16:18:17 -05:00
Christoph Haag b073e3dfb9 xrt: Add support for assigned device roles
Abandons the assumption that in oxr_system.xdevs[], index 0 is HMD,
1 is left controller, 2 is right controller.

Now to represent the dynamically assigned roles, oxr_system.role contains
the index for a device in oxr_system.xdevs[] for head, left and right.

This role assignment happens on the client side and currently can not be updated
from the server side.

Also adds an enum that device drivers set indicating allowed assignments
(many controllers are physically designed to be held in a specific hand).

This also adds support for configurations with only a HMD and a right controller.
2020-07-13 18:03:01 +02:00
Christoph Haag 5788fb90a2 drivers: Add rotation/position tracking bool to xdev
xrGetSystemProperties() will return these values to application in XrSystemTrackingProperties
using the xdev assigned to head.
2020-07-13 18:03:01 +02:00
Jakob Bornecrantz deedd10a50 xrt: Tidy xrt_instance_create argument order and add doc-comment 2020-07-08 14:41:12 +00:00
Ryan Pavlik 323d794df3 ipc: Add a json schema for the IPC description 2020-07-08 09:15:51 -05:00
Jakob Bornecrantz 8ee7086ea6 xrt: Introduce xrt_swapchain_create_info 2020-07-04 11:04:07 +00:00
Jakob Bornecrantz 5bad87690f ipc: Avoid deadlocks due to render timing helper not getting data in time 2020-07-01 13:22:03 +01:00
Pete Black bd5aa24463 xrt: Add multi client and overlay client support 2020-06-25 15:48:34 +01:00
Jakob Bornecrantz 513ebd9957 ipc: Remove no longer used semaphore code (NFC) 2020-06-24 22:57:00 +01:00