shared_memory_image_client_python.c
Last update: 17.04.2023
Go to the documentation of this file.
145 SharedMemoryImageError stream_putframe(stream_id id, int width, int height, int framenumber, bytes pixeldata);
238 static const char *kwlist[] = { "stream_id", "width", "height", "framenumber", "pixeldata", NULL };
329 pmodule = Py_InitModule3("ensight_grpc_shmem", py_methods, "EnSight gRPC shared memory image stream");
337 PyModule_AddIntConstant(pmodule, "OPTIONS_FLIPVERTICAL", (int)IMAGESTREAM_OPTIONS_FLIPVERTICAL);
340 PyModule_AddIntConstant(pmodule, "ERROR_NO_BUFFERAVAILABLE", (int)IMAGESTREAM_NO_BUFFERAVAILABLE);
341 PyModule_AddIntConstant(pmodule, "ERROR_NO_FRAMEAVAILABLE", (int)IMAGESTREAM_NO_FRAMEAVAILABLE);
SharedMemoryImageError SharedMemoryImageStream_create(const char *filename, uint32_t options, SharedMemoryImageStream *stream)
SharedMemoryImageStream_create create a stream client instance.
int SharedMemoryImageError
common error codes see the non-hex, non-string IMAGESTREAM macros
Definition: shared_memory_image_client.h:109
SharedMemoryImageError SharedMemoryImageStream_destroy(SharedMemoryImageStream stream)
SharedMemoryImageStream_destroy destroy a stream interface, releasing its resources.
#define IMAGESTREAM_OPTIONS_FLIPVERTICAL
Definition: shared_memory_image_client.h:105
#define IMAGESTREAM_NO_BUFFERAVAILABLE
Definition: shared_memory_image_client.h:87
#define IMAGESTREAM_NO_FRAMEAVAILABLE
Definition: shared_memory_image_client.h:86
#define IMAGESTREAM_OPTIONS_NONE
Definition: shared_memory_image_client.h:103
SharedMemoryImageError SharedMemoryImageStream_unlock(SharedMemoryImageStream stream)
SharedMemoryImageStream_unlock release a frame obtained by SharedMemoryImageStream_lock.
const char * SharedMemoryImageStream_errorstring(SharedMemoryImageError err)
SharedMemoryImageStream_errorstring convert an error code into a human string.
struct _SharedMemoryImageStream * SharedMemoryImageStream
image transport stream pointer
Definition: shared_memory_image_client.h:111
SharedMemoryImageError SharedMemoryImageStream_lock(SharedMemoryImageStream stream, SharedMemoryFrame *frame)
SharedMemoryImageStream_lock get a frame of pixels from the server.
C API the shared memory image transport API server interface.
#define IMAGESTREAM_OPTIONS_SERVER
Definition: shared_memory_image_client_priv.h:135
DEV SharedMemoryImageError SharedMemoryImageStream_putframe(SharedMemoryImageStream stream, SharedMemoryFrame frame)
SharedMemoryImageStream_putframe push a new image into a server image stream channel.
SharedMemoryImageError stream_unlock(stream_id id)
Unlock the frame allocated by stream_lock().
SharedMemoryImageError stream_putframe(stream_id id, int width, int height, int framenumber, bytes pixeldata)
Push an image into the shared memory transport buffer.
stream_id stream_create(str filename, int options=IMAGESTREAM_OPTIONS_NONE)
Create a shared memory image stream.
SharedMemoryImageError stream_destroy(stream_id id)
Close down and destroy a shared memory transport interface.
uint8_t * buffer
pointer to a packed RGBRGBRGB... (iWidth*iHeight*3) bytes array of pixels
Definition: shared_memory_image_client.h:119