matthiasbock / gstreamer

Raspberry Pi gstreamer with UVC H.264 and OpenMAX plugins
26 stars 7 forks source link

libEGL warning: DRI2: xcb_connect failed #7

Open matthiasbock opened 11 years ago

matthiasbock commented 11 years ago
$ gst-launch-1.0 -v udpsrc port=9078 ! 'application/x-rtp,payload=96,encoding-name=H264' ! rtph264depay ! h264parse ! omxh264dec ! autovideosink
Setting pipeline to PAUSED ...
libEGL warning: DRI2: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
libEGL warning: GLX: failed to load GLX
0:00:00.364303586 17678  0x1fea8e0 ERROR            egladaption gstegladaptation_egl.c:183:gst_egl_adaptation_init_egl_display: Could not init EGL display connection
0:00:00.366003500 17678  0x1fea8e0 ERROR            egladaption gstegladaptation_egl.c:206:gst_egl_adaptation_init_egl_display: EGL call returned error 3000
0:00:00.367471425 17678  0x1fea8e0 ERROR            egladaption gstegladaptation_egl.c:208:gst_egl_adaptation_init_egl_display: Couldn't setup window/surface from handle
0:00:00.368794358 17678  0x1fea8e0 ERROR            eglglessink gsteglglessink.c:462:egl_init: Couldn't init EGL display
0:00:00.369875304 17678  0x1fea8e0 ERROR            eglglessink gsteglglessink.c:484:egl_init: Failed to perform EGL init
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstXvImageSink:autovideosink0-actual-sink-xvimage: Could not initialise Xv output
Additional debug info:
xvimagesink.c(1762): gst_xvimagesink_open (): /GstXvImageSink:autovideosink0-actual-sink-xvimage:
Could not open display (null)
Setting pipeline to NULL ...
Freeing pipeline ...
matthiasbock commented 11 years ago

Surprisingly, this helps:

sudo ln -fs /opt/vc/lib/libEGL.so /usr/lib/libEGL.so
sudo ln -fs /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so
sudo ln -fs /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1
sudo ln -fs /opt/vc/lib/libEGL_static.a /usr/lib/libEGL_static.a
sudo ln -fs /opt/vc/lib/libEGL_static.a /usr/lib/arm-linux-gnueabihf/libEGL_static.a
sudo ln -fs /opt/vc/lib/libGLESv2.so /usr/lib/libGLESv2.so
sudo ln -fs /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so
sudo ln -fs /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2
sudo ln -fs /opt/vc/lib/libGLESv2_static.a /usr/lib/libGLESv2_static.a
sudo ln -fs /opt/vc/lib/libGLESv2_static.a /usr/lib/arm-linux-gnueabihf/libGLESv2_static.a
sudo ln -fs /opt/vc/lib/libbcm_host.so /usr/lib/libbcm_host.so
sudo ln -fs /opt/vc/lib/libbcm_host.so /usr/lib/arm-linux-gnueabihf/libbcm_host.so
sudo ln -fs /opt/vc/lib/libvchiq_arm.a /usr/lib/libvchiq_arm.a
sudo ln -fs /opt/vc/lib/libvchiq_arm.a /usr/lib/arm-linux-gnueabihf/libvchiq_arm.a
sudo ln -fs /opt/vc/lib/libvchiq_arm.so /usr/lib/libvchiq_arm.so
sudo ln -fs /opt/vc/lib/libvchiq_arm.so /usr/lib/arm-linux-gnueabihf/libvchiq_arm.so
sudo ln -fs /opt/vc/lib/libvcos.a /usr/lib/libvcos.a
sudo ln -fs /opt/vc/lib/libvcos.a /usr/lib/arm-linux-gnueabihf/libvcos.a
sudo ln -fs /opt/vc/lib/libvcos.so /usr/lib/libvcos.so
sudo ln -fs /opt/vc/lib/libvcos.so /usr/lib/arm-linux-gnueabihf/libvcos.so

At least, it changes the error to:

$ gst-launch-1.0 -v udpsrc port=9078 ! 'application/x-rtp,payload=96,encoding-name=H264' ! rtph264depay ! h264parse ! omxh264dec ! autovideosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = application/x-rtp, payload=(int)96, encoding-name=(string)H264, media=(string)video, clock-rate=(int)90000
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = application/x-rtp, payload=(int)96, encoding-name=(string)H264, media=(string)video, clock-rate=(int)90000
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)0164001effe100236764001eac7680a03dff014480000003008000001e302000dbb8036edef7c2f08846a001000468ee38b0
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)0164001effe100236764001eac7680a03dff014480000003008000001e302000dbb8036edef7c2f08846a001000468ee38b0
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)640, height=(int)480, parsed=(boolean)true, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)640, height=(int)480, parsed=(boolean)true, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1
0:00:11.387969498  2654   0x371f80 ERROR   eglglessink-platform video_platform_wrapper.c:107:platform_create_native_window: Can't open X11 display
0:00:11.389579416  2654   0x371f80 ERROR            eglglessink gsteglglessink.c:721:gst_eglglessink_create_window: Could not create window
0:00:11.391182334  2654   0x371f80 ERROR            eglglessink gsteglglessink.c:2085:gst_eglglessink_configure_caps: Internal window creation failed!
0:00:11.392750254  2654   0x371f80 ERROR            eglglessink gsteglglessink.c:2114:gst_eglglessink_configure_caps: Configuring caps failed
0:00:11.394787150  2654   0x38a520 ERROR            eglglessink gsteglglessink.c:2135:gst_eglglessink_setcaps: Failed to configure caps
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1
0:00:11.400841841  2654   0x38a520 ERROR            eglglessink gsteglglessink.c:2135:gst_eglglessink_setcaps: Failed to configure caps
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1
0:00:11.424018657  2654   0x38a520 ERROR            eglglessink gsteglglessink.c:2135:gst_eglglessink_setcaps: Failed to configure caps
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1
0:00:11.428713418  2654   0x38a520 ERROR            eglglessink gsteglglessink.c:2135:gst_eglglessink_setcaps: Failed to configure caps
0:00:11.434942100  2654   0x38a520 ERROR            eglglessink gsteglglessink.c:2135:gst_eglglessink_setcaps: Failed to configure caps
0:00:11.437179986  2654   0x38a520 ERROR            eglglessink gsteglglessink.c:2135:gst_eglglessink_setcaps: Failed to configure caps
ERROR: from element /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0: Internal data stream error.
Additional debug info:
gstomxvideodec.c(1665): gst_omx_video_dec_loop (): /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0:
stream stopped, reason not-negotiated
Execution ended after 0:00:11.089833722
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
0:00:11.452087224  2654   0x38a520 ERROR            eglglessink gsteglglessink.c:2135:gst_eglglessink_setcaps: Failed to configure caps
matthiasbock commented 11 years ago

Even more surprisingly running ldconfig re-establishes the problem.

matthiasbock commented 11 years ago

This also helps:

cp /opt/vc/lib/* /usr/lib/arm-linux-gnueabihf/
ldconfig
peutipoix commented 11 years ago

Hi Matthias, IMHO you should better prefix the build environment CPLUS_INCLUDE_PATH=/opt/vc/include:/opt/vc/include/interface/vcos/pthreads:/opt/vc/include/interface/vmcs_host/linux C_INCLUDE_PATH=/opt/vc/include:/opt/vc/include/interface/vcos/pthreads:/opt/vc/include/interface/vmcs_host/linux LDFLAGS="-L/opt/vc/lib"

then unless you need X, you could try ./configure \ --with-egl-window-system=rpi \ --without-x \ --enable-eglgles \

on my side I can decode and render some h264 video gst-launch-1.0 uridecodebin uri=http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_640x360.m4v name=d d. ! alsasink device=hw:0,0 sync=false d. ! eglglessink

matthiasbock commented 11 years ago

Thank you, peutipoix! I'll try that ...