[Interest] Grabbing frames from the camera
Tr3wory
tr3w at freemail.hu
Fri Jan 31 20:11:11 CET 2014
Hi,
I started a new application which will do image processing on the
frames captured from the camera.
For grabbing the frame data, I followed what the documentation says:
I derived a class from QAbstractVideoSurface and set it with
QCamera::setViewFinder.
So far so good, the camera calls my VideoSurface::present function,
and I get the data as a const QVideoFrame&, but before I can do
anything, I need to call the QVideoFrame::map function, which is sadly
not const...
So now I can make a swallow copy of the QVideoFrame and work with it,
or I can do a const_cast... Probably with the same results and
caveats.
So my question is:
Why is the type of the frame is const reference, and is it safe to ignore it?
Tr3w
More information about the Interest
mailing list