maxilase
16th July 2015, 14:28
Hello Qt experts !
I am having some trouble using an external program (GStreamer1.0) running along with Qt (on windows 7).
I manage to get some frames out of a pipeline using the QImage type like this :
const QImage frame(bufferInfo.data,width,height,myQImageFrameFo rmat);
Now since Qt 5.5 is release, I would like to do the same but by mapping received frame into a QVideoFrame (since it seems to be the class dedicated to it).
However I'm having some trouble. The documentation says that normally I should be albe to map the "frame buffer" into memory in order to write into it using bits(); (http://doc.qt.io/qt-5/qvideoframe.html#map).
I did a few tries but it seems that the function map:
myVideoFrame->map(QAbstractVideoBuffer::ReadWrite); always give a "false" meaning (I guess) that the mapping into memory has failed.
I really dont know why I have this since the only actions I did on this video frame is
creating the frame
Adding metadata
setting the field type
I don't know if I am too early using this class since Qt5.5 just came out but I did not read anything about being cautious using QVideoFrame and I'm not finding any example on the web.
Thanks in advance for your help !
I am having some trouble using an external program (GStreamer1.0) running along with Qt (on windows 7).
I manage to get some frames out of a pipeline using the QImage type like this :
const QImage frame(bufferInfo.data,width,height,myQImageFrameFo rmat);
Now since Qt 5.5 is release, I would like to do the same but by mapping received frame into a QVideoFrame (since it seems to be the class dedicated to it).
However I'm having some trouble. The documentation says that normally I should be albe to map the "frame buffer" into memory in order to write into it using bits(); (http://doc.qt.io/qt-5/qvideoframe.html#map).
I did a few tries but it seems that the function map:
myVideoFrame->map(QAbstractVideoBuffer::ReadWrite); always give a "false" meaning (I guess) that the mapping into memory has failed.
I really dont know why I have this since the only actions I did on this video frame is
creating the frame
Adding metadata
setting the field type
I don't know if I am too early using this class since Qt5.5 just came out but I did not read anything about being cautious using QVideoFrame and I'm not finding any example on the web.
Thanks in advance for your help !