How to save a frame using QMediaPlayer?

后端 未结 2 1682
闹比i
闹比i 2020-12-21 09:36

I want to save an image of a frame from a QMediaPlayer. After reading the documentation, I understood that I should use QVideoProbe. I am using the following co

2条回答
  •  鱼传尺愫
    2020-12-21 10:13

    After Qt QVideoProbe documentation:

    bool QVideoProbe::setSource(QMediaObject *mediaObject)
    

    Starts monitoring the given mediaObject.

    If there is no media object associated with mediaObject, or if it is zero, this probe will be deactivated and this function wil return true.

    If the media object instance does not support monitoring video, this function will return false.

    Any previously monitored objects will no longer be monitored. Passing in the same object will be ignored, but monitoring will continue.

    So it seems your "media object instance does not support monitoring video"

提交回复
热议问题