Unsolved Displaying a video from webcam/file in a particular part of frame.
-
Hello Everyone! This is my first thread on this forum. I'm fairly new to QT so kindly forgive any foolish behavior :-) I have already done research on my part about my problem but couldn't get any proper answer to this.
I am trying to display a video in a particular part of my frame. This video can be loaded either by camera or via file on my hard disk. There are two such widgets required.
What is the most efficient and cleanest way to do this? Should I use QPainter or something?
Thanks! -
In my opinion you can use
QMediaPlayer
combined withQVideoFrame
to get access to single frames usingQVideoFrame::bits()
function (remember to callQVideoFrame::map()
- but all the nuances are in the docs) . Then I would try to create aQPixmap
orQImage
from the data and do the cropping.QLabel
as displaying widget.