-
Notifications
You must be signed in to change notification settings - Fork 46
Trax Image Formats: Shared Memory #31
Copy link
Copy link
Open
Description
Regarding to #29. I'm considering implement a shared memory solution based on POSIX <sys/shm.h>. The changes of code should be
-
Add a new type
TRAX_IMAGE_SHMwith protocol textshm -
In
libtrax, add a new shared memory containertrax_shm_region, it's struct should bestruct trax_shm_region { char* shm_id; void* ptr; } -
trax_shm_regionwill attach toImage.dataforTRAX_IMAGE_SHMtype. -
For Python binding, will add a new class ShmImage in image.py
The communication flow should be
- TraxClient requests a
shared_memory_regionidentified by shm_id throughshm_open()andmmap() - TraxClient fills the image into
shared_memory_region, and send trax textshm://trax-NNNN;width;height;format - TraxServer receives trax text and parses the shm_id
- TraxServer attaches to the
shared_memory_regionidentified by shm_id
Other notes
- Shared memory should works in POSIX system only, Linux and macOS should be supported.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels