I have 4 camera objects. Each camera Object refreshes frames independently. I would like to visualize these frames on my videowall class. Basicly, my videowall is just a gridlayout child with draw Widget methods.
Each camera object has imageHolder widget. ImageHolder widget is a child of qOpenglWidget with
void OpenGLImageHolder::display(const QImage* img)
{
m_image = img;
this->update();
}
void OpenGLImageHolder::paintEvent(QPaintEvent*)
{
QPainter painter(this);
painter.drawImage(this->rect(), *m_image);
}
Each Image Holder has a QTimer and QTimer::timeOut() is connected to OpenGLImageHolder::display().
Unfortunatelly, with this setup, I can visualize only 3 cameras simultaniously. If I add 4th camera, one of three (or two) freezes. I know that display was called, because when I resizeWidget, I get a correct Image update.
What is the right way to make videoWall? Shall I make one openglWidget with its own window, and then draw images directly on this openglWidget? Which tools can I use to profile the behaviour (it seems that standart msvs profiler is not enough).