1.0 This file describes the internal format of the shared memory system and the inner workings of the buffer state machine. It also provides the interface to a shared memory image server.
When creating a shared memory transport server, the shared_memory_image_client.h interface is used to create/destroy a stream, albeit with unique option flags. The server does not use the SharedMemoryImageStream_lock() / SharedMemoryImageStream_unlock() functions. Instead, it calls SharedMemoryImageStream_putframe() whenever it has new imagery it wants to push to the client. Server operations are as follows:
- The client creates/sizes the shared memory file that is to be used and passes the filename to the server.
- The server creates/initializes the shared memory stream by calling SharedMemoryImageStream_create() with the IMAGESTREAM_OPTIONS_SERVER option.
- Periodically, the server may push a new image:
- When the communication is finished, the server should call:
Includes
- <stdio.h>
- <stdlib.h>
- <string.h>
- shared_memory_image_client.h
- <sys/types.h>
- <sys/stat.h>
- <fcntl.h>
- <sys/mman.h>
- <pthread.h>
- <unistd.h>
Included by
Macros
Macro IMAGESTREAM_OPTIONS_INITBUFFERHEADERS
Macro IMAGESTREAM_OPTIONS_NOTHREADS
Macro IMAGESTREAM_OPTIONS_SERVER
Functions
Function SharedMemoryImageStream_putframe
- stream: - the stream to push the image into
- frame: - the image to push into the stream
- SharedMemoryImageStream stream
- SharedMemoryFrame frame