[Qt-interest] running phonon video from separate process?
Bart van Deenen
bvandeenen at infologic.nl
Mon Dec 22 15:53:26 CET 2008
On Mon, 2008-12-22 at 14:59 +0100, Oliver.Knoll at comit.ch wrote:
> Bart van Deenen wrote on Monday, December 22, 2008 2:38 PM:
>
> > ...
> > The hard thing to me seems to be redirecting the rendering of the
> > child process. I'm familiar with native window id's on Linux and
> > Windows, and have used those from AWT Java displays. How should I
> > proceed with this in Qt?
>
> Off course, if you don't mind using platform-specific code then you could also re-parent widgets:
>
> You get the native window IDs using the Qt API (http://doc.trolltech.com/4.4/qwidget.html#winId). On Windows you would then use the win32 call SetParent(). See how to embed the render window of Google Earth into a Qt app:
>
> http://groups.google.de/group/kml-support-com-api/browse_thread/thread/743601cce38d4a86/afbdc7a8a83441a3
>
> (note that there's a whole bunch of things not properly working with the above code and Google Earth 4.3, but that's related to how GE resizes the render window and has nothing to do with this topic - but it shows the general approach how you could embed another window into a Qt app).
>
> On X11 the class http://doc.trolltech.com/4.4/qx11embedwidget.html could be useful (for X11 applications which support the "X11 embedding" protocol).
>
> Cheers, Oliver
> --
Wow, what an excellent helpful reply! Thanks.
I think that since the child application that I'm going to write is just
a Qt application with a Phonon VideoWindow that the QWidget::winId()
function combined with setParent() will make a complete crossplatform
solution. Looks very good.
On the subject of inter process communication: is there anything awesome
crossplatform in the Qt libraries? I've seen QtDbus, but that works only
on Unix/Linux, and for now we still have many Windows customers.
Ofcourse I can always cook up something or use one of the many rpc
protocols?
Thanks
Bart van Deenen
Infologic.nl
More information about the Qt-interest-old
mailing list