Results 1 to 11 of 11

Thread: phonon on a "secondary" display (X11)

  1. #1
    Join Date
    Nov 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Unhappy phonon on a "secondary" display (X11)

    I am trying to run a phonon application in a Debian 4.0 with two screens. The application I am using is the mediaplayer demo that comes with phonon. I am using Qt-4.4.1.

    If I launch the mediaplayer it opens in the primary display and I can reproduce MPEG files without problems. But if I launch mediaplayer in the secondary display (with -display :0.1), when I open an MPEG file the video is not shown (although the slider advances indicating it is reproducing it) and in the console I see a lot of messages like:

    X Error: BadMatch (invalid parameter attributes) 8
    Extension: 143 (Uknown extension)
    Minor opcode: 3 (Unknown request)
    Resource id: 0x180000b

    The primary card is an ATI and I use a "vesa" driver in the xorg.conf file, and the secondary card is an NVIDIA and I use a "nv" driver.

    But I think the problems is not related with drivers because if I change the xorg.conf file and set the screens in the other order (NVIDIA as the primary and ATI as the secondary) then the video runs well in the primary but I get the same error when trying to play it in the secondary.
    It always work in the primary screen (it does not matter if it is the NVIDIA or ATI) and does not work in the secondary (it does not matter the card).

    Has somebody tried to run the mediaplayer demo with a -display :0.1 switch? Are you getting the same problems?

    Thanks,
    Marc

  2. #2
    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: phonon on a "secondary" display (X11)

    What happens if you run gstreamer (xine, depending on the backend you are using) directly as a separate application and start the video on the secondary screen?

  3. #3
    Join Date
    Nov 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: phonon on a "secondary" display (X11)

    I am using gstreamer backend.

    I don't have any program installed called "gstreamer". The packages related to gstreamer I have installed are:

    gstreamer-tools 0.10.10-3
    gstreamer0.10-alsa 0.10.10-4
    gstreamer0.10-esd 0.10.4-4
    gstreamer0.10-gnomevfs 0.10.10-4
    gstreamer0.10-plugins-base 0.10.10-4
    gstreamer0.10-plugins-good 0.10.4-4
    gstreamer0.10-plugins-ugly 0.10.4-5
    gstreamer0.10-tools 0.10.10-3
    gstreamer0.10-x 0.10.10-4
    libgstreamer-plugins-base0.10-0 0.10.10-4
    libgstreamer-plugins-base0.10-dev 0.10.10-4
    libgstreamer0.10-0 0.10.10-3
    libgstreamer0.10-dev 0.10.10-3

    Which package should I install to be able to run "gstreamer"?

  4. #4
    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: phonon on a "secondary" display (X11)

    Something that uses it, for instance Totem or kaffeine.

  5. #5
    Join Date
    Nov 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: phonon on a "secondary" display (X11)

    kaffeine works fine in the secondary display (using -display :0.1)

    I have found another thing: mediaplayer doesn't work if I run it with -display :0.1, but if instead of that I run konsole -display :0.1 (or xterm -display :0.1), and from the terminal window that appears in the secondary display I run mediaplayer (without specifying any display), the mediaplayer demo opens in the secondary display and then it works fine!

    It looks like phonon does not handle properly this -display switch...

  6. #6
    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: phonon on a "secondary" display (X11)

    Quote Originally Posted by mnavarro View Post
    kaffeine works fine in the secondary display (using -display :0.1)
    Kaffeine by default uses the xine engine. Did you change it to gstreamer?

    I have found another thing: mediaplayer doesn't work if I run it with -display :0.1, but if instead of that I run konsole -display :0.1 (or xterm -display :0.1), and from the terminal window that appears in the secondary display I run mediaplayer (without specifying any display), the mediaplayer demo opens in the secondary display and then it works fine!

    It looks like phonon does not handle properly this -display switch...
    I don't think the issue is phonon. It practically doesn't do anything Most work is done by the backend.

  7. #7
    Join Date
    Nov 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: phonon on a "secondary" display (X11)

    I have no idea how to change the engine of kaffeine to gstreamer.

    But I installed totem-gstreamer, and I run it with "totem --display :0.1". It complained about unknown switch --display, but it opened on the secondary display. And when trying to play the MPEG file it crashed and printed the message:

    The program 'totem' received an X Window System error.
    This probably reflects a bug in the program.
    The error was 'BadMatch (invalid parameter attributes)'.
    (Details: serial 32 error_code 8 request_code 143 minor_code 3)
    (Note to programmers: normally, X errors are reported asynchronously;
    that is, you will receive the error a while after causing it.
    To debug your program, run it with the --sync command line
    option to change this behavior. You can then get a meaningful
    backtrace from your debugger if you break on the gdk_x_error() function.)

  8. #8
    Join Date
    Jul 2008
    Posts
    47
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: phonon on a "secondary" display (X11)

    Quote Originally Posted by mnavarro View Post
    I have no idea how to change the engine of kaffeine to gstreamer.
    In KDE 4.x Control Centre you can change in the "Sound" configuration in the second tab the backend used.

  9. #9
    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: phonon on a "secondary" display (X11)

    Quote Originally Posted by mnavarro View Post
    I have no idea how to change the engine of kaffeine to gstreamer
    If you have appropriate packages installed (like kaffeine-gstreamer or something like this) there is a "Player Engine" submenu in the "Settings" menu in Kaffeine.

  10. #10
    Join Date
    Nov 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: phonon on a "secondary" display (X11)

    It seems the kaffeine-gstreamer package does not exist anymore.

    Anyway, I have found that the mediaplayer works fine in the secondary display if I issue an "export DISPLAY=:0.1" before launching the application.

    But, why

    > export DISPLAY=:0.1
    > mediaplayer

    works, and

    > mediaplayer -display :0.1

    does not work?

    Maybe phonon starts another process to render the video, and the -display switch is not propagated to it (whether the DISPLAY environment variable does)?

    Anyway, my problem is solved.
    Thanks!

  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: phonon on a "secondary" display (X11)

    Quote Originally Posted by mnavarro View Post
    It seems the kaffeine-gstreamer package does not exist anymore.
    I didn't say that was its exact name. In Mandriva it is called kaffeine-engine-gstreamer. Other distros may call it differently.

    But, why

    > export DISPLAY=:0.1
    > mediaplayer

    works, and

    > mediaplayer -display :0.1

    does not work?
    -display is set by Qt, DISPLAY is used by XLib, so if -display doesn't work, it's probably Qt's fault. This might not exactly be true actually - if gstreamer is embedded somehow separately, the display might not be passed to it, hence the problems. I'd contact Qt Software support about it.

Similar Threads

  1. I cannot run the phonon demos in the PXA270!Can someone help me?
    By Justin_W in forum Qt for Embedded and Mobile
    Replies: 8
    Last Post: 19th February 2010, 10:14
  2. Display only PNG image on desktop
    By durbrak in forum Qt Programming
    Replies: 32
    Last Post: 15th March 2008, 21:55

Tags for this Thread

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.