Results 1 to 11 of 11

Thread: Alternatives for Phonon ?

  1. #1
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    5

    Default Alternatives for Phonon ?

    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 ?

  2. #2

    Default Re: Alternatives for Phonon ?

    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?

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    5

    Default Re: Alternatives for Phonon ?

    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".

  4. #4
    Join Date
    Oct 2006
    Location
    Germany
    Posts
    84
    Thanks
    5
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Alternatives for Phonon ?

    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.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    5

    Default Re: Alternatives for Phonon ?

    Nope, i tried that, but the backend built with Visual Studio won't work when the rest of the application is built with mingw.

  6. #6
    Join Date
    Aug 2008
    Posts
    19
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Alternatives for Phonon ?

    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/

  7. #7
    Join Date
    Oct 2006
    Location
    Hawaii
    Posts
    130
    Thanks
    48
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Alternatives for Phonon ?

    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:
    Qt Code:
    1. long someFunction () {
    2. //get library names
    3. const char* libraryName = "library.dll";
    4. const char* methodName= "MethodInLibaray";
    5. //boolean result
    6. long result = 0;
    7.  
    8. //load library
    9. HINSTANCE library = LoadLibrary(libraryName);
    10. FARPROC methodPointer = loadMethod(env,library,libraryName,methodName);
    11.  
    12. if(methodPointer != NULL) {
    13. result = ((LONGPROC_CCHAR)methodPointer)(text);
    14. }
    15.  
    16. return result;
    17. }
    To copy to clipboard, switch view to plain text mode 

  8. #8
    Join Date
    May 2008
    Location
    Melbourne, Australia
    Posts
    136
    Thanks
    9
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Alternatives for Phonon ?

    I tried and gave up building phonon with mingw. Then I tried visual studio and (surprisingly) got it working. These were my steps:



    hope that helps

  9. #9
    Join Date
    Feb 2008
    Posts
    157
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Alternatives for Phonon ?

    Quote Originally Posted by tpf80 View Post
    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.

  10. #10
    Join Date
    Mar 2008
    Location
    Houston, Texas, USA
    Posts
    277
    Thanks
    9
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: Alternatives for Phonon ?

    Quote Originally Posted by rbp View Post
    I tried and gave up building phonon with mingw. Then I tried visual studio and (surprisingly) got it working. These were my steps:



    hope that helps
    Did you read the Howto in the QtCentre wiki? And btw it will be fixed with Qt-4.6
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Alternatives for Phonon ?

    Guys, you realize this thread is a year old?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. seek and pos function alternatives
    By uchennaanyanwu in forum Newbie
    Replies: 2
    Last Post: 5th August 2008, 09:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.