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,myQImageFrameFormat
);
const QImage frame(bufferInfo.data,width,height,myQImageFrameFormat);
To copy to clipboard, switch view to plain text mode
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();.
I did a few tries but it seems that the function map:
myVideoFrame->map(QAbstractVideoBuffer::ReadWrite);
myVideoFrame->map(QAbstractVideoBuffer::ReadWrite);
To copy to clipboard, switch view to plain text mode
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 !
Bookmarks