External software process integration
Viinex provides a mechanism of event-driven integration for low-level interaction with any external system, including in particular video analytics systems from third-party vendors.
Events-based integration with external systems can be quite simple and done in any programming language; we mean a simple interface for exchanging events. This mechanism is published on GitHub under MIT license and is used for integration of external video analytics systems by both third-party manufacturers and Viinex team.
Data exchange via standard stdin/stdout mechanism
Viinex can start an external process, manage its life cycle and connect to it via named pipe (Windows) or UNIX domain socket (Linux). A simple mechanism of standard input/output is used for that. All events that the external process is subscribed to, are serialized in JSON format and Viinex sends them to this process standard input. The reverse is also true – everything that the external process sends to its standard output has to have JSON syntax, which Viinex recognizes as an event from this process. Thus it all comes down to a simple exchange of JSON commands via stdin/stdout.
This way Viinex can send and receive events – data structures containing some predefined fields (as well as some random data), serialized and deserialized from JSON format.
In this interaction the external process does not require any additional API or external libraries and etc. Which means that the external process can be released using any programming language, all that is needed is access to standard input and output and possibility to parse and form data in JSON format. There’s no other limitations that Viinex puts on the external process, so it can perform any actions and interact with any external software system.
Providing raw video for third-party video analytics systems
Along with data exchange Viinex provides an API for receiving uncompressed video. Using this API the external process can receive video to perform user video analytics.
IPC methods used in API realization for receiving raw video stream in Viinex are a combination of shared memory and named pipes which can help process raw video stream between processes on a local machine without copying.