cu-gstreamer

Crates.iocu-gstreamer
lib.rscu-gstreamer
version0.9.1
created_at2025-02-06 21:23:40.308643+00
updated_at2025-09-12 20:25:50.13013+00
descriptionThis is a Copper GStreamer sink.
homepagehttps://github.com/copper-project
repositoryhttps://github.com/copper-project/copper-rs
max_upload_size
id1546102
size70,530
Guillaume Binet (gbin)

documentation

README

GStreamer Appsink Source for Copper

Compatibility

It should be broad, any buffer you can send to a gstreamer Sink should be able to be handled on the Copper Side.

Usage

Add the driver like any other source in Copper:

    tasks: [
        (
            id: "src",
            type: "cu_gstreamer::CuDefaultGStreamer", // the default is a pool of 8 images, you can define your own type to change this pool size.
            config: {   // a gstreamer pipeline example that takes a mjpeg webcam and converts it to NV12. IMPORTANT: the appsink has to be named "copper"
                "pipeline": "v4l2src device=/dev/video0 ! image/jpeg, width=1920, height=1080 ! jpegdec ! videoconvert ! video/x-raw, format=NV12 ! appsink name=copper",
                "caps": "video/x-raw, format=NV12, width=1920, height=1080",  // this is what the Copper source will accept, here we just match the pipeline we define.
            },
        ),
     ],

When you connect this driver to the rest of the system you need to use the cu_gstreamer::CuGstBuffer message type.

    cnx: [
        (src: "src",  dst: "dst",   msg: "cu_gstreamer::CuGstBuffer"),
    ],

You can see a small test application in the tests/ folder on github.

Commit count: 741

cargo fmt