Hi,
I have recently worked on a small console example where I could use the CVB MultiStreamHandler as I acquired images from four synchronized cameras. The MultiStreamHandler can not be used with non synchronized cameras.
As I think this example might be helpfull the forum seems to be good place to share it.
The example is written with the CVB++ wrapper and is ment for CoaxPress cameras. It also has included the nodemap handling necessary to setup the cameras.
Code snipped (complete example attached)
class MyMultiStreamHandler
:public Cvb::MultiStreamHandler
{
public:
MyMultiStreamHandler(const std::vector<Cvb::StreamPtr> & streamVector)
:MultiStreamHandler(streamVector)
{
}
private:
void HandleAsyncStream(const std::vector<Cvb::StreamPtr> &streamVector) override
{
auto readData = 0;
for (auto & stream : streamVector)
{
auto result = stream->WaitFor<Cvb::RingBufferImage>(std::chrono::milliseconds(500));
// Do something.
}
}
};
Thanks @Andreas for all the help.
Theo
CppMultiStreamHandler.zip (2.2 KB)