Cannot get reference to Pipeline for already started device

I am unable to get a reference to a pipeline for a device in my application. When my software loads it queries the Context for all cameras connected to the system. This causes the SDK to automatically create a Pipeline for the first connected Orbbec device.

Since a Pipeline has already been created for the first device, if I try and later use the camera I am unable to start the Pipeline again and it shows an error (“Trying to create a device that you’ve already created!”).

I am trying to find anywhere that I can get a reference to this already created Pipeline using the Context.QueryDeviceList or any Device or DeviceInfo derived from this list, but I have had little luck so far.

Can anyone help?

-Curt

You can create a global/private pipeline which will keep your program remain one pipeline instance.
You can initialize your pipeline as following.
std::shared_ptr ob::Pipeline pipeline = std::make_sharedob::Pipeline();