Page 1 of 1

LibVLC + SDL2 on raspberry pi

Posted: 04 May 2015 12:15
by maigre
Hi!
I successfully compiled VLC-git and SDL2 on Raspberry Pi B2 (it took approx. 1h).
I use ArchLinux but i also compiled on Raspbian before and it worked as well.
I havn't installed any X environnement.

SDL2 seems to work properly: i can make a Texture example to display.
LibVLC seems to work properly too: i can compile and execute a simple player
like this one: https://wiki.videolan.org/LibVLC_Tutorial/

Now i try to make the SDL2+LibVLC example to work !
https://wiki.videolan.org/LibVLC_SampleCode_SDL/

The links are ok, SDL2 and LibVLC are found and compilation works properly,
but when i try to execute the program i end up with something like this:

[70a16448] chain filter error: Too high level of recursion (2)
[70a15d48] core filter error: Failed to create video filter2
[70a16448] chain filter error: Too high level of recursion (2)
[70a15d48] core filter error: Failed to create video filter2
[70a16448] chain filter error: Too high level of recursion (2)
[70a15d48] core filter error: Failed to create video filter2
...

multiple times,
then the LOCK function is called and return properly
and i finally have a Segmentation fault (core dumped)
before DISPLAY or UNLOCK are even called.. :(

If i execute the same code while commenting the libvlc_video_set_callbacks function,
everything works fine, but of course SDL is not used (only instantiated).

I also use --aout alsa / --vout mmal_vout
and --yuv-chroma h264 (i tried different settings here, without success..)

Any clue ?
Did i missed something ?

Thanks for your help !

Best,

Re: LibVLC + SDL2 on raspberry pi

Posted: 04 May 2015 12:20
by Rémi Denis-Courmont
It seems you are requesting a picture format that is not supported. It should not crash though; that is most probably a bug in either your LOCK callback implementation or in the VLC Raspberry code.

Re: LibVLC + SDL2 on raspberry pi

Posted: 04 May 2015 12:42
by maigre
Hi,
could you point me in the right direction to choose the correct picture format ? (on which params does it relies ?)

my LOCK callback:

Code: Select all

static void *lock(void *data, void **p_pixels) { printf("LOCK called\n"); struct context *c = (context *) data; int pitch; SDL_LockMutex(c->mutex); SDL_LockTexture(c->texture, NULL, p_pixels, &pitch); printf("LOCK done\n"); return NULL; // Picture identifier, not needed here. }
the last few message i get are:
[70a04028] core filter error: Failed to create video filter2
[70a047a0] chain filter error: Too high level of recursion (2)
[70a04028] core filter error: Failed to create video filter2
[70a03a28] core filter error: Failed to create video filter2
[70a01450] core filter error: Failed to create video filter2
[70a00c60] core vout display error: Failed to create video filter2
[70a00c60] core vout display error: Failed to adapt decoder format to display
LOCK called
LOCK done
[70a00c60] core vout display error: Failed to change zoom
[70a00c60] core vout display error: Failed to change source AR
Segmentation fault (core dumped)
so both printf in my LOCK function are executed properly.
the core vout display error: Failed to change zoom
is not a deadlock (i receive it even in the basic example which works, it's related to mmal i guess)

i also have a printf("DISPLAY called\n"); at the beggining of the display function but it doesn't fire..
same for the UNLOCK function.

Thanks!

Re: LibVLC + SDL2 on raspberry pi

Posted: 04 May 2015 13:00
by Rémi Denis-Courmont
Looks like a MMAL-specific issue. I personally can't help you with that.

Re: LibVLC + SDL2 on raspberry pi

Posted: 04 May 2015 13:01
by maigre
mmh ok, thanks anyway :)
any idea on how i could find some help with that ?
Best Regards,
Thomas

Re: LibVLC + SDL2 on raspberry pi

Posted: 04 May 2015 14:19
by Jean-Baptiste Kempf
Ask Julian on IRC or by mail.

Re: LibVLC + SDL2 on raspberry pi

Posted: 04 May 2015 14:33
by maigre
Thanks !