PDA

View Full Version : Embed Mplayer in QML



mastablasta
29th April 2015, 14:11
Hello,
I want to play movies in my QML application (on the background layer), but MediaPlayer in QML is insufficient. I tried to use QMPwidget (from http://qmpwidget.sourceforge.net/) but this class is inherit from QWidget and I can't embed object of this class in QML. My new idea is run MPlayer directly in QML but I don't know how to handle seperate process and put it in background. Please help to solve this problem

wysota
29th April 2015, 14:22
Basically that's not a good idea. What is "insufficient" in default Qt media capabilities?

mastablasta
29th April 2015, 14:34
I want to play sequentially movie and sometimes I get lag when I try to jump from one part to another. Besides I'm afraid of this error: "virtual bool QSGVideoItemSurface::present(const QVideoFrame&) I'm getting bad frames here..." and I don't know what exactly it is but it show when is lag in movie. I try to other players because I think lags maybe go away :)

wysota
29th April 2015, 14:41
Qt uses GStreamer on Unix platforms which is of similar quality to libraries MPlayer is using, you will not get better performance by using MPlayer. Bad frames rather suggest corrupted stream.

mastablasta
29th April 2015, 14:44
Thank you for reply
I have question with this error in bad frames. Because sometimes I get this error and sometimes I don't. This bad frames error doesn't show sometimes at all but sometimes it show in every part. Do you have any idea?

wysota
29th April 2015, 16:32
There could be many reasons. I wouldn't be worried with it.

mastablasta
29th April 2015, 16:42
Thank you for reply but is there diffrence in use MediaPlayer in QML (Video Output) and QT VideoWidget in performance field?

wysota
29th April 2015, 17:18
Thank you for reply but is there diffrence in use MediaPlayer in QML (Video Output) and QT VideoWidget in performance field?

Both should be using the same backend.