[Qt-interest] running phonon video from separate process?

Bart van Deenen bvandeenen at infologic.nl
Tue Dec 23 08:44:00 CET 2008


On Mon, 2008-12-22 at 16:39 +0100, Oliver.Knoll at comit.ch wrote:
> Bart van Deenen wrote on Monday, December 22, 2008 3:53 PM:
> ...
> >> 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().
> 
> Pay attention! Don't confuse the Qt setParent() method (http://doc.trolltech.com/4.4/qwidget.html#setParent - which is indeed cross-platform) 
> with the win32 API call SetParent (note the capital 'S'), which is off
> course platform-dependent ;)
Oh, I didn't see that yet. That's okay, i'll use the one with the
capitalist 'S' :-)

> > On the subject of inter process communication: is there anything
> > awesome crossplatform in the Qt libraries?
> 
> What about the previous approach which I suggested previously (http://doc.trolltech.com/4.4/qsharedmemory.html - which also falls into the category IPC)? Assuming that both processes run on the same machine this should the fastest way, it does not use any sockets etc. (even though when using RPC-like communication (QtBus?) on the same machine the packets don't stumble down the whole TCP/IP stack either - clever "RPC" implementations might use shared memory under the hood as well when run on the same machine).
> 
> And the example (http://doc.trolltech.com/4.4/ipc-sharedmemory.html) 
> I gave you does exactly what you need (more or less ;): 
> it displays a QImage, loaded in a different process.
I'll go study that and see how it goes today

> 
> Another approach could be using the ActiveQt Framework (http://doc.trolltech.com/4.4/activeqt.html - 
> Windows only), 
> if you happen to have a commercial Qt license. But then the COM object (e.g. Windows Media Player?) 
> wouldn't run in a separate process anymore... but I have never used that framework myself and am not a COM expert...
We're looking for a cross-platform (Linux/Windows) solution. 
> 
> Cheers, Oliver
Thanks for all your insightful replies!

Bart




More information about the Qt-interest-old mailing list