PDA

View Full Version : phonon on a "secondary" display (X11)



mnavarro
19th November 2008, 12:47
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

wysota
19th November 2008, 17:11
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?

mnavarro
19th November 2008, 18:07
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"?

wysota
19th November 2008, 18:18
Something that uses it, for instance Totem or kaffeine.

mnavarro
20th November 2008, 15:59
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...

wysota
20th November 2008, 17:36
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.

mnavarro
20th November 2008, 18:54
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.)

muellerp
20th November 2008, 19:02
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.

wysota
20th November 2008, 20:00
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.

mnavarro
21st November 2008, 14:38
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!

wysota
21st November 2008, 17:38
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.