Phonon::VideoWidget embedded inside a QGraphicsProxyWidget

Alessandro Diaferia alediaferia at gmail.com
Fri Mar 26 19:03:57 CET 2010


As you currently may be aware of, embedding a Phonon::VideoWidget inside a
QGraphicsProxyWidget causes the video appealing awfully while playing. I've
been bouncing here and there on IRC talking with Lucas Murray from KWin and
Mark Kretschmann from Phonon.

Lucas says putting the VideoWidget behind the Plasma Desktop is not the way
to go as he says this is like using a Window Manger to put a widget inside a
fake Window Manager (Plasma) and hence a loop. As he makes us notice that
the flag KeepBelow would put our widget below other widgets but not below
Plasma which is registered as Desktop. (Correct me if I'm wrong).

So, temporarily abandoned that idea i was trying to find a way to redirect
VideoWidget painting directly onto a QGraphicsWidget. This seems to be
impossible to achive through a QPixmap::grabWidget, probably due to
VideoWidget's internals. QPixmap::grabWindow, instead, works pretty well and
fast. But this forces us to have a QWidget always visible that is not what
we want.
Given this, then, i was trying to find a way to extract VideoWidget frames
rather than hacking through QPainter redirects but even this seems to be not
possible. Mark pointed me to the Amarok VideoClip applet which displays
videos from YouTube. But having a look at its code you can understand that
Phonon::VideoWidget is simply put in place of the Applet when displaying a
video. That is just fine for Amarok because there is no risk for other
applets to cover the VideoClip one.

So, finally, keeping all this in mind i had a *rather nasty and probably
impossible idea*. But it still worths a try: what about using a similar
approach? We could use a plain Phonon::VideoWidget without embedding it
anywhere. We can put it on top of the applet and make it follow its
movements. When other applets cover our VideoApplet (we can call it this way
from now on) we can simulate a faking covering using a mask directly on the
Phonon::VideoWidget. Is this anyhow possible?

I hope my thoughts are clear and not so ridiculous. Please insult me if this
mail just made you waste your time. It wasn't in my intentions.

Regards.

-- 
Alessandro Diaferia
KDE Developer
KDE e.V. member
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20100326/cf4481f6/attachment.htm 


More information about the Plasma-devel mailing list