CopperSpice API
1.9.2
|
CsMultimedia offers both high and low level C++ classes for playing and manipulating video data. Some of these classes also overlap with both camera and audio classes, which can be useful.
You can use the QMediaPlayer class to decode a video file, and display it using QVideoWidget, QGraphicsVideoItem, or a custom class.
The following is an example of how to use QVideoWidget.
The following is an example of how to use QGraphicsVideoItem.
CsMultimedia offers a number of low level classes to make handling video frames a bit easier. These classes are primarily used when writing code that processes video or camera frames. For example, detecting barcodes, or applying a fancy vignette effect, or displaying video in a special way that is otherwise unsupported.
The QVideoFrame class encapsulates a video frame and allows the contents to be mapped into system memory for manipulation or processing, while deriving a class from QAbstractVideoSurface allows you to receive these frames from QMediaPlayer and QCamera.
In order to use myVideoSurface, create an instance of this class and then pass the object to QMediaPlayer::setVideoOutput().