← Back

ofxPipewire

github.com/ElectronFlowVJ/ofxPipewire · @ElectronFlowVJ
OF 0.12 Video/Camera Linux

Pipewire for openFrameworks

0 0 Last commit 8mo ago Created 8mo ago

README

ofxPipeWire



PipeWire video (and future audio) streaming addon for openFrameworks on Linux.

Status

Requirements

Examples

Quick start

1. Add the addon to your project. 2. Initialize it and enable both publish + capture.

ofxPipeWire pipewire;

void ofApp::setup(){
    ofxPipeWire::VideoConfig cfg;
    cfg.width = 1280;
    cfg.height = 720;
    cfg.fps = 30;

    pipewire.setAppName("ofApp");
    pipewire.setNodeName("ofxPipeWire Stream");

    pipewire.setPreferredVideoFormats({
        ofxPipeWire::VideoFormatPreference::RGBA,
        ofxPipeWire::VideoFormatPreference::BGRA
    });

    // Optional: choose a specific capture target by name or serial
    // pipewire.setCaptureTargetNodeName("OBS Studio");

    pipewire.setup(true, true, cfg);
}

void ofApp::update(){
    pipewire.update();

    // Publish a frame
    ofPixels pixels;
    // fill pixels ...
    pipewire.submitFrame(pixels);

    // Capture a frame
    ofPixels captured;
    if(pipewire.getLatestFrame(captured)){
        // use captured pixels
    }
}

void ofApp::exit(){
    pipewire.shutdown();
}


Notes

Discovery

Roadmap

Get this addon

HTTPS
SSH