MIT-SHM and X_ShmGetImage

*nix specific usage questions
harisson
Blank Cone
Blank Cone
Posts: 23
Joined: 17 Jan 2006 13:07

MIT-SHM and X_ShmGetImage

Postby harisson » 13 Jun 2007 21:45

hello,

My co-devs I and made a java wrapper around libvlc. I (and some of our linux users) encountered some crashs with the xvideo/x11 video output :

On Debian sid i get :

Code: Select all

X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 145 (MIT-SHM) Minor opcode of failed request: 4 (X_ShmGetImage)
On Ubuntu Feisty :

Code: Select all

X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 146 (MIT-SHM) Minor opcode of failed request: 4 (X_ShmGetImage)
other :

Code: Select all

X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 148 (MIT-SHM) Minor opcode of failed request: 4 (X_ShmGetImage)
Is it possible to apply this patch ?

Code: Select all

*** modules/video_output/x11/xcommon.orig 2007-06-09 18:43:36.000000000 +0200 --- modules/video_output/x11/xcommon.c 2007-06-09 17:43:23.000000000 +0200 *************** *** 2331,2338 **** return 0; case 150: /* MIT-SHM */ case 146: /* MIT-SHM too, what gives? */ ! if( event->minor_code == X_ShmAttach ) { b_shm = VLC_FALSE; return 0; --- 2331,2340 ---- return 0; case 150: /* MIT-SHM */ + case 148: /* MIT-SHM */ + case 145: /* MIT-SHM */ case 146: /* MIT-SHM too, what gives? */ ! if( event->minor_code == X_ShmAttach || event->minor_code == X_ShmGetImage) { b_shm = VLC_FALSE; return 0;

Rémi Denis-Courmont
Developer
Developer
Posts: 15183
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Postby Rémi Denis-Courmont » 15 Jun 2007 18:37

Please use unified diff format and post to vlc-devel where relevant person may be able to review the fix.

Thanks in advance,
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

harisson
Blank Cone
Blank Cone
Posts: 23
Joined: 17 Jan 2006 13:07

Postby harisson » 16 Jun 2007 14:00

ok it's done ;-)

by the way, i need some advices about the official vlc packages from Debian and Ubuntu, these vlc packages don't encode sound into mpeg audio (from the beginning of vlc 0.8.6 releases) :

Code: Select all

[00000281] main interface: creating httpd play mrl %2Froot%2F.homeplayer%2Ffreeplayer.m3u [00000366] ffmpeg encoder error: cannot find encoder MPEG Audio layer 1/2/3 [00000321] stream_out_transcode private error: cannot find encoder ((null)) [00000321] stream_out_transcode private error: cannot create audio chain [00000364] main packetizer error: cannot create packetizer output (mpga)
so what will be the most efficient way, in your opinion, to avoid this problem in official packages ?

Rémi Denis-Courmont
Developer
Developer
Posts: 15183
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Postby Rémi Denis-Courmont » 16 Jun 2007 16:54

Debian does not include any MP3 encoder; I think due to some licensing policy.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

harisson
Blank Cone
Blank Cone
Posts: 23
Joined: 17 Jan 2006 13:07

Postby harisson » 18 Jun 2007 13:11

Thanks for your answer Rémi but i've found another problem, i reinstall an ubuntu feisty distro and it tells me that the MIT-SHM major opcode is 143 :

Code: Select all

$ xdpyinfo -ext MIT-SHM|grep MIT-SHM MIT-SHM MIT-SHM version 1.1 opcode: 143, base event: 94, base error: 166
an other friend on ubuntu edgy told me he got 144 o_O

Do you know on what this number depends ? xorg version ? graphic card ? other ? should i put a range between 140 to 150 ?


P.S : if I put twolame on audio transcode encoder option, it works on my Debian SID (so i will recommend this partial solution and pray for open formats decoding with the freebox :roll: )

P.S.2 : the official vlc ubuntu packages are crap with our application, there is a bug with it that doesn't exist in vlc regular version, i think, you should make a QA system (or something like that) for packages, especially for vlc server parts which make, imho, the huge difference against other free & proprietary media players (these parts are often neglicted in official packages like in OpenSuse, Fedora or Ubuntu) .

Rémi Denis-Courmont
Developer
Developer
Posts: 15183
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Postby Rémi Denis-Courmont » 18 Jun 2007 16:39

I would assume XQueryExtension(display, "MIT-SHM", ...) can find out the right opcode.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 2 guests