How can I get ARRAY OF BYTES (frame) from QCamera or QVideoWidget? I successfull capture video from camera and audio from microphone and now I want send they to socket tcp channel for creating a simple video audio call software.
CodePudding user response:
You are probably looking for a QVideoSink: https://doc-snapshots.qt.io/qt6-dev/qvideosink.html.
The QVideoSink class can be used to retrieve video data on a frame by frame basis from Qt Multimedia.
It is supposed to be set on the QMediaCaptureSession: https://doc-snapshots.qt.io/qt6-dev/qmediacapturesession.html#setVideoSink.
For Qt5 you have QAbstractVideoSurface https://doc.qt.io/qt-5/qabstractvideosurface.html or QVideoProbe https://doc.qt.io/qt-5/qvideoprobe.html.