PDA

View Full Version : Alternatives for Phonon ?



dano
25th September 2008, 15:59
Howdy !

After two really frustrating days I have a question.

I'm trying to get phonon to work with an application that needs audio and video previewing capabilities. My main problem is that the MinGw version of Qt does not support building the phonon backend, which is needed to play back audio and video content.

Are there any usable alternatives to Phonon that can be smoothly integrated in a Qt application (and that work with MinGw) ?

If not, are there known workarounds to still get Phonon to work with an application compiled with MinGw ?

zavulon
25th September 2008, 16:32
What exactly error(s) do you get, when compiling a Phonon-based application with MinGW? Or is it in principle not possible to do that with MinGW?

dano
25th September 2008, 16:55
It seems that it is in principle not possible to do that with MinGW. In the Qt documentation it says: "Warning: The MinGW version of Qt does not support building the Qt backend. ". I

f you do try, the compiler generates a sh*tload of errormessages, most of which are related to "WINAPI".

durbrak
25th September 2008, 18:49
can't you build the backend with VC? after all it is free and it's not like you'll have to use it for the rest of your life.

dano
7th October 2008, 10:46
Nope, i tried that, but the backend built with Visual Studio won't work when the rest of the application is built with mingw.

netuno
7th October 2008, 16:13
Well the Dlib lib has a GStreamer frontend for Qt. And I believe there's a GStreamer version for Windows. Take a look at it: http://gitorious.org/projects/dlib/

tpf80
8th October 2008, 11:56
Im not sure if this applies to you, but I did once have a DLL built with Visual Studio which was closed source and that I needed to access with a Mingw compiled program. what I did was use the

"LoadLibrary" and "LoadMethod" which you can look up in more detail in MSDN, but heres kindof how it works:


long someFunction () {
//get library names
const char* libraryName = "library.dll";
const char* methodName= "MethodInLibaray";
//boolean result
long result = 0;

//load library
HINSTANCE library = LoadLibrary(libraryName);
FARPROC methodPointer = loadMethod(env,library,libraryName,methodName);

if(methodPointer != NULL) {
result = ((LONGPROC_CCHAR)methodPointer)(text);
}

return result;
}

rbp
10th October 2008, 07:49
I tried and gave up building phonon with mingw. Then I tried visual studio and (surprisingly) got it working. These were my steps:


Download the Windows and DirectX SDKs: http://www.matthiaspospiech.de/index.php?s=qt
Open visual studio command prompt (instead of MS DOS)
configure -phonon
nmake


hope that helps

pospiech
30th August 2009, 22:30
Im not sure if this applies to you, but I did once have a DLL built with Visual Studio which was closed source and that I needed to access with a Mingw compiled program. what I did was use the ...

That works in case your dll is independent of your other toolkit classes, which is not the case with phonon. You will very likely get an error because you mix two different compilers for the same toolkit libaries.

The answer to phonon with mingw is simple : blame mingw. They have stuck with gcc 3.x which is not compatible with the necessary windows libaries for directshow which phonon uses.

It might work with unofficial or beta builds of mingw which are gcc 4.x based. I know that latest kde could be successfully compile with the latest builds, so that might be worth trying.

However as long as there is no official gcc 4.x build of mingw, Qt has no option other than not support phonon with mingw.

ComaWhite
31st August 2009, 02:39
I tried and gave up building phonon with mingw. Then I tried visual studio and (surprisingly) got it working. These were my steps:


Download the Windows and DirectX SDKs: http://www.matthiaspospiech.de/index.php?s=qt
Open visual studio command prompt (instead of MS DOS)
configure -phonon
nmake


hope that helps

Did you read the Howto in the QtCentre wiki? And btw it will be fixed with Qt-4.6

wysota
31st August 2009, 12:19
Guys, you realize this thread is a year old?