Advertisement
vliaskov

glimagesink error `!xcb_xlib_threads_sequence_lost' failed.

Aug 26th, 2015
380
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. For each video item in a list, the app:
  2. 1) creates a new pipeline "playbin video-sink=glimagesink"
  3. 2) at end of video item cleans pipeline
  4.  
  5. The main() function calls XInitThread() right at its beginning.
  6. The app renders in its own GLX window using libglfw (receiving samples/textures from glimagesink's client-draw callback). The application context is shared with each pipeline through bus sync-message (GST_MESSAGE_NEED_CONTEXT)
  7.  
  8. Often the app aborts with X11 assertion:
  9.  
  10. [xcb] Unknown sequence number while processing queue
  11. [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
  12. [xcb] Aborting, sorry about that.
  13. info-beamer: ../../src/xcb_io.c:274: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
  14.  
  15. The error can happen from :
  16. - gst_gl_context_create_thread / gst_gl_context_glx_create_context / glXCreateContextAttribsARB
  17. - libglfw.so.3 / XPending
  18.  
  19. Application's X11 display/context is used to create a GstGLcontext/GstGLDisplay for every item/pipeline. (Or should this be done only once in the beginning of main?)
  20.  
  21.  
  22. x11_display = glXGetCurrentDisplay();
  23. x11_window = (Window) glXGetCurrentDrawable();
  24.  
  25. glx_context = glXGetCurrentContext ();
  26. platform = "glx";
  27.  
  28. gl_display =
  29. (GstGLDisplay *) gst_gl_display_x11_new_with_display (x11_display);
  30. gl_context =
  31. gst_gl_context_new_wrapped (gl_display, (guintptr) glx_context,
  32. gst_gl_platform_from_string (platform),
  33. GST_GL_API_OPENGL);
  34.  
  35. gl_display, gl_context are used in sync-message bus callback to share display and context with pipeline.
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement