Buffer Interprocess Sharing: Examples - C++ to Python

From RidgeRun Developer Wiki
Revision as of 16:50, 23 December 2022 by Lleon (talk | contribs)



  Index  





Introduction

BIPS was conceived with the idea of communicating C++-based video capture applications communicating with AI algorithms in Python. For instance, using GStreamer to capture video from a sensor in a Jetson platform and consuming the video feed in a PyTorch application.

Considering the examples provided in C++ and Python, the use case will be

  • One-to-one communication

The example binaries are compiled after building. If the build directory is build:

├── python
|   └── examples
|       └── one-to-one
|           ├── consumer.py
|           └── producer.py
└── src
    └── examples
        └── one-to-one
            ├── consumer
            └── producer

Executable options

Consider the examples provided before:

Running the examples

One-to-one example

1. Open two different terminals: one for producer and another for consumer.

2. In terminal 1, execute the producer:

./producer

3. In terminal 2, execute the consumer:

python3 consumer.py



  Index