Hi All,

I am new to Qt and I am using Qt4 to develop an application to display video from SONY iidc camera.

Currently, I managed to show the image frames on a label's pixmap attribute. But, the speed of display is slow. Well, should be very slow - like 2frames/s. What I've actually done is:

1. read the data from the camera to a unsignech char buffer.
2. create a QImage object using that data
3. create a QPixmap object using the above QImage
4. Put is on the Label to display.

Qt Code:
  1. //gray image 8-bit
  2. QImage *frameImage;
  3. QPixmap bPixmap;
  4. QBuffer buffer( &ba );
  5. // this is the data buffer from the firewire camera
  6. pImageBuff = (unsigned char *)iidc_lockdata(hCamera, -1);
  7. frameImage = new QImage(pImageBuff, iWidth, iHeight, QImage::Format_Indexed8);
  8. frameImage->setNumColors(256);
  9. for (int icol = 0; icol< 256; icol++){
  10. frameImage->setColor(icol, colorTableData[icol]);
  11. }
  12. buffer.open( IO_WriteOnly );
  13. frameImage->save( &buffer, "PNG" );
  14. bPixmap.loadFromData(ba);
  15. LabelCam1->setPixmap(bPixmap);
  16. LabelCam1->repaint();
To copy to clipboard, switch view to plain text mode 

Does anyone has any idea of speeding up this displaying thing? Or using other methods?