Page 4 of 4 FirstFirst ... 234
Results 61 to 70 of 70

Thread: Phonon module question -- help needed

  1. #61
    Join Date
    Jul 2008
    Posts
    69
    Thanks
    9
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phonon module question -- help needed

    Quote Originally Posted by FS Lover View Post
    now I have phonon backend compiled with mingw.
    two files are created in plugins\phonon_backend directory: libphonon_ds94.a and phonon_ds94.dll

    musicplayer and capabilities examples compiled and work perfectly.
    but I have problem with video. it has not colors and 4 pictures are repeated in width (screenshot is attached).
    can anybody help me? I have no idea about the reason.

    my code was this:
    Qt Code:
    1. Phonon::VideoPlayer *player = new Phonon::VideoPlayer(Phonon::VideoCategory, 0);
    2. player->show();
    3. player->play(Phonon::MediaSource("s.wmv"));
    To copy to clipboard, switch view to plain text mode 

    I am using qt 4.5.2 and phonon compiled with MinGW and MS DX SDK 2008.
    my configure command line was:
    configure -release -fast -no-exceptions -no-qt3support -no-3dnow -phonon -phonon-backend -no-webkit -no-scripttools -no-direct3d
    Thanks FS Lover
    Do you have a step by step how to compile the phonon?
    I am downloading the SDK libs of MS and I also going to compile the phonon libs.

    Did you run the "dx_setenv.cmd" and "setenv.cmd" before the compile like memtion in QT4.5 phonon install ?

    I also wouldn't like to install the platform of MS if possible.

    Thanks

  2. #62
    Join Date
    May 2009
    Posts
    147
    Thanks
    11
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phonon module question -- help needed

    Quote Originally Posted by SunnySan View Post
    Thanks FS Lover
    Do you have a step by step how to compile the phonon?
    if I succeed I will try to write a step by step guide.
    I have several other combinations/compilations to test ahead.
    video is corrupt and must be fixed; you know it is essential.
    other tests are (order is not meaningful):
    - building phonon with DX SDK 2005 (that kdewin uses)
    - adding -no-opengl to the configure command line.
    - probably tring other backends like mplayer (as in QuarkPlayer)
    although QuarkPlayer doesn't show video on my system! I don't know the reason; in the past it worked well.
    - compiling with MS VC++
    - ?

    I am downloading the SDK libs of MS and I also going to compile the phonon libs.
    please report your work here (configure commands, problems, results, etc.). gathering information can help us recognize common cases and guess causes of problems.

    Did you run the "dx_setenv.cmd" and "setenv.cmd" before the compile like memtion in QT4.5 phonon install ?
    yes; it seems to be essential anyway (qt's phonon backend uses MS DirectShow). you can see early outputs of the configure command; if there is not such env set, phonon support will be set to 'no' regardless of the command line options.
    but I have only dx_setenv.cmd on my system!
    maybe I should download the whole MS SDK (its huge!!), since setenv.cmd isn't in the MS DX SDK.
    probably it will be other test case I have to try.

    qt is being compiled now on my system. this time I used both the mingw patch and direct x headers from the kdewin and somewhat changed the configure command line.
    I am waiting. it takes many hours evey time

  3. #63
    Join Date
    May 2009
    Posts
    147
    Thanks
    11
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phonon module question -- help needed

    The DS9 backend contains 2 renderers, VMR9 and softrenderer. In my Windows XP installation the VMR9 one doesn't work (can be seen by a warning "the video widget could not be initialized correctly" when the video widget is created) The softrenderer didn't work at all until I edited the file src/3rdparty/phonon/ds9/videowidget.cpp and commented out the following function from VideoWindow:
    how can we switch between these two renderers?

  4. #64
    Join Date
    May 2009
    Posts
    147
    Thanks
    11
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phonon module question -- help needed

    my last compile was successful too.
    I used both the mingw headers' patch and what qtcentre's wiki article says.
    last configure command line that I used is:
    Qt Code:
    1. configure -release -no-qt3support -phonon -phonon-backend -no-webkit -no-scripttools -no-direct3d -nomake demo -nomake examples
    To copy to clipboard, switch view to plain text mode 
    I have now two DirectShow phonon backend dlls (their size is different). they both work.
    additionally, that phonon video problem is gone when I test my compiled video test programs at another system (at my work).
    but I should know the cause. and I should know which method and dll is more correct.
    maybe I should test several other times and on another system too.
    but I want video on my own system too. non-phonon media players work without problems. and this can be a common problem at least for some others.
    eventually I will try to write a step by step guide.
    I have something like `introduction and learning basics of qt' topic in other forums (in my native language) that I should complete with phonon compiling article.
    without mingw phonon, it has a harsh deficit.

  5. #65
    Join Date
    May 2009
    Posts
    147
    Thanks
    11
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phonon module question -- help needed

    apparently, configure command line must be like this:
    configure -release -no-qt3support -phonon -phonon-backend -no-webkit -no-scripttools -no-direct3d -nomake demos -nomake examples

    notice the change: `demos' not `demo'.

    I tried to compile with webkit support but it failed.
    I saved a backup of previous dll files (pre-compiled ones in the qt sdk) to see if I can replace some new compiled dlls with old ones to have webkit support concurrently with phonon.

    my test programs work on two other systems perfectly, but video is corrupted on my own system. I don't know the reason yet. this is one of the concerns to think of. I hope that it is a rare case or casual.

    notice that there is a patch (indeed, packaged with some extra headers too) for mingw header files that is a far more easier way than the way that is introduced in the wiki article.
    you need a patch program to apply the patch. I downloaded the patch program from GNUWin32. it is only about 500KB.

    but additionally, we need Microsoft DirectX SDK to compile phonon backend.
    it has a download size of several hundred megabytes.
    but it seems that we need just some files from the sdk installation that are only a fraction of the whole sdk installation.
    so we can help others by preparing a separate package containing only needed files; probably it will be something like 25MB insteed of 500MB of the whole MS DX SDK.
    but we have to compile and test with it and prepare it and also provide a step by step guide before.

    any idea about all of these? please tell your experiences and suggestions here.

  6. #66
    Join Date
    Jul 2009
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: Phonon module question -- help needed

    Hi ,

    I am using an alternative approach to build phonon for mingw , it can build and run musicplayer and capabilities example successfully. However, like FS Lover , it have problem in playing video. But my problem is different. The video player widget can not draw anything on it, and output the below error message:

    the video widget could not be initialized correctly
    the video widget could not be initialized correctly
    QPainter::begin: Paint device returned engine == 0, type: 1
    QPainter::setBrush: Painter not active
    QPainter::setPen: Painter not active
    QPainter::drawRects: Painter not active
    QPainter::drawRects: Painter not active
    QPainter::setRenderHint: Painter must be active to set rendering hints
    QPainter::setWorldTransform: Painter not active
    QPainter::drawRects: Painter not active
    QPainter::begin: Paint device returned engine == 0, type: 1
    QPainter::setBrush: Painter not active
    QPainter::setPen: Painter not active
    QPainter::drawRects: Painter not active
    QPainter::drawRects: Painter not active
    QPainter::setRenderHint: Painter must be active to set rendering hints
    QPainter::setWorldTransform: Painter not active
    QPainter::drawRects: Painter not active
    QPainter::begin: Paint device returned engine == 0, type: 1
    My steps:

    1. Download qt-win-opensource-4.5.2 and installed QT 2009 03 SDK

    2. Run QT Command Prompt

    3. cd c:\build\qt-win-opensource-4.5.2

    4. configure -phonon -phonon-backend # dont' need to build the whole QT4

    5. cd src\phonon; mingw32-make

    It will create phonon4.dll and phonon4d.dll (not phonon.dll) in build\qt-win-opensource-4.5.2\lib.

    5.1 Copy phonon4.dll and phonon4d.dll to c:\qt\2009.03\qt\bin ,

    5.2 Copy phonon4.dll and phonon4d.dll to c:\qt\2009.03\qt\lib , and rename to phonon.dll and phonond.dll respectively.

    6. Follow the instruction in the wiki : http://wiki.qtcentre.org/index.php?t...ws_using_MinGW

    Download kdewin32 , modify the ds9.pro , then:

    cd src\plugins\phonon\ds9
    mingw32-make
    mingw32-make install

  7. #67
    Join Date
    May 2009
    Posts
    147
    Thanks
    11
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phonon module question -- help needed

    I think you forgot something essential.
    do you have DirectX SDK installed on your system?
    then you must run dx_setenv.cmd in the console before running configure.
    I don't know why isn't it mentioned in the wiki.

    probably you now want to download the MS DX SDK.
    but you can wait a little; because probably I will give you a surprise!
    I have made a package containing all pieces that are needed for building a phonon support qt with mingw.
    probably it will be very small in the zip format (less than 10 MB)

    its benefits:
    - you don't need to download the whole MS DX SDK which is about 500 MB.
    - you don't need to search and download several pieces/tools separately.
    - and, finally, you don't even need any special configurations and low level knowledge and you don't need to enter any complicated and vague command lines that are forgot and mistaken easily (*), since it builds qt for you fully automatically!
    it restores webkit support after compilation by restoring the necessary prior dll files.
    It can shutdown your system automatically after compilation if you want.
    it generates a time report too.
    and some other tiny features.
    almost all of these are implemented via the windows command files (very similar to batch files).

    *: but it's better to be experienced with such low level things anyway;
    if I wasn't, I couldn't make such magical package.
    now it helps me add phonon support to every qt sdk very quickly, easily, and more reliably;
    and I can modify it if e.g. some future version of the qt changes structurally.

    I named it `phonon4qtmingw'.
    I am now re-building my own qt with it.
    when the build process is finished, I will test it for phonon, and probably I will build and test with it a qt on another system too;
    then I will upload it for you.

    but, it's not so flexible or intelligent.
    it can work only on a completely installed (recent) qt sdk which has its own mingw in a predetermined directory.
    I had not the resources needed to test and extend it further reliably but I think it's sufficient at least for many guys like me at the moment.
    it can be further extended, flexible and configurable in the near future if needed.
    but it can be modified easily even now if one has the required knowledge.

    -----------------------

    PS: can someone inform me in advance about a good and free public file hosting to upload my package?

    thanks.
    Last edited by FS Lover; 19th July 2009 at 22:53.

  8. The following user says thank you to FS Lover for this useful post:

    benlau (20th July 2009)

  9. #68
    Join Date
    Jul 2009
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: Phonon module question -- help needed

    Quote Originally Posted by FS Lover View Post
    I think you forgot something essential.
    do you have DirectX SDK installed on your system?
    then you must run dx_setenv.cmd in the console before running configure.
    I don't know why isn't it mentioned in the wiki.
    I am also wonder why the qtcentre's wiki didn't mention about it. I only have the Windows SDK suggested by Trolltech's manual. May be the kdewin did the job for it, as it have header for directx.

    In fact, I just found that my method is working even without the DirectX SDK! The reason of why the video do not work in simple... I am running the application in VirtualBox 2.x.

    I have copied the DLL built in VM to a real machine, it can play video now!

  10. #69
    Join Date
    Jul 2008
    Posts
    69
    Thanks
    9
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phonon module question -- help needed

    Quote Originally Posted by FS Lover View Post
    yes; it seems to be essential anyway (qt's phonon backend uses MS DirectShow). you can see early outputs of the configure command; if there is not such env set, phonon support will be set to 'no' regardless of the command line options.
    but I have only dx_setenv.cmd on my system!
    maybe I should download the whole MS SDK (its huge!!), since setenv.cmd isn't in the MS DX SDK.
    probably it will be other test case I have to try.

    qt is being compiled now on my system. this time I used both the mingw patch and direct x headers from the kdewin and somewhat changed the configure command line.
    I am waiting. it takes many hours evey time
    On my side I had only setenv.cmd at this location
    C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\setenv.cmd
    This was using Xp or earlier version MS download the link quoted in installing-phonon

    If you use older version there is 2 links to get. one for the setenv and one for the dx_setenv

  11. #70
    Join Date
    May 2009
    Posts
    147
    Thanks
    11
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phonon module question -- help needed

    see this: http://www.qtcentre.org/forum/f-inst...age-22652.html
    it's very beta.
    test it if you can.

Similar Threads

  1. Replies: 2
    Last Post: 24th April 2009, 13:13
  2. Playing a stream using phonon module
    By ram136682 in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 28th August 2008, 15:42
  3. Replies: 0
    Last Post: 5th August 2008, 11:54
  4. no phonon module :(
    By losiem in forum Installation and Deployment
    Replies: 2
    Last Post: 8th July 2008, 13:31

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.