It looks that you have to call Node's output setStreamName() before you create a Device. Otherwise you won't get events from device's getQueueEvent().

For example, in the examples device_queue_event.cpp, if you move the line
dai::Device device(pipeline);
before

    xoutRgb->setStreamName("rgb");
    xoutMono->setStreamName("mono");

device.getQueueEvent() will block, not return anything.

It seems strange me to the API behaves this way. And sometime you need the device before you connect the pipeline, for example, you need the device to get the calibration info.

Thanks,

Dong

dai : : Device becomes a smily 🙂

Yes, you are right. The reason behind this is that when you call dai::Device device(pipeline);, library serializes the pipeline and sends it to the device (along with the firmware), so afterwards you can't change the pipeline. To get that, you can start the device first and then upload the pipeline, eg. in this example.
Thanks, Erik

Is there any way to get the camera calibration info before setup the pipeline?

  • erik replied to this.