Skip to content

Concept

Norihiro Kamae edited this page Feb 22, 2022 · 1 revision

Overview

This plugin will create a thread and a process to capture REAC packets.

The process captures the packet by accessing the ethernet device. Then, audio for the necessary channels will be sent using a pipe.

The thread is created for each device and manages the process; start/stop the process, send channel requests, and receive data.

The REAC source is associated with a device. If two or more REAC sources have the same device name, the instance of the device will be created once and the same device instance will associate with the REAC sources.

Capture Process

Packet capture is split into a separate process named obs-h8819-proc from the obs process. This is because Linux requires capability settings to the process that accesses raw packets. For macOS, it is unnecessary to have the process.

The process obs-h8819-proc is implemented as simple as possible. It is started with an ethernet device name as an argument. Then, start to capture the ethernet device. Channels will be requested through stdin and audio data for the selected channel will be returned through stdout.

Note: If you want to migrate to Windows, I recommend to remove the capture process and implement it into the thread. Rewriting the inter-process communication is not necessary since the process is prepared for Linux.

Device Thread

An instance is allocated for each device and a thread will be started for each device. The thread manipurate which channels its sources want to hear and send the audio data to the source once the audio data is received.

REAC Source

This is the frontend of the plugin.

Clone this wiki locally