[gst-devel] Patch for running gst-plugins-gl in beagleboard

TK, Pratheesh Gangadhar pratheesh at ti.com
Wed Sep 30 09:11:30 CEST 2009


Hi,

I am using gst-plugins-gl (commit id: 18f5c4875006606b28aa9aa366abbc5dd1e16b60) in beagleboard (OMAP3). While running this I saw this error GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS and abort during init. After some digging I think the failure is due to this

As per http://www.khronos.org/opengles/sdk/docs/man/glRenderbufferStorage.xml 

glRenderbufferStorage takes only one of these as internalformat (GL_RGBA4,GL_RGB565,GL_RGB5_A1,GL_DEPTH_COMPONENT16, GL_STENCIL_INDEX8) so IMG driver implementation for SGX530 is complying to this whereas gst-plugins-gl uses GL_DEPTH_COMPONENT for GLES now.

With below patch I can run filtercube plugin in beagleboard.

--- /tmp/gstgldisplay.c	2009-09-28 00:49:48.000000000 +0530
+++ git/gst-libs/gst/gl/gstgldisplay.c	2009-09-30 12:32:53.000000000 +0530
@@ -1172,9 +1172,13 @@ gst_gl_display_thread_init_download (Gst
         glGenRenderbuffersEXT (1, &display->download_depth_buffer);
         glBindRenderbufferEXT (GL_RENDERBUFFER_EXT,
             display->download_depth_buffer);
+#ifndef OPENGL_ES2
         glRenderbufferStorageEXT (GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT,
             display->download_width, display->download_height);
-
+#else
+        glRenderbufferStorageEXT (GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT16,
+            display->download_width, display->download_height);
+#endif
         //setup a first texture to render to
         glGenTextures (1, &display->download_texture);
         glBindTexture (GL_TEXTURE_RECTANGLE_ARB, display->download_texture);
@@ -1536,8 +1540,13 @@ gst_gl_display_thread_gen_fbo (GstGLDisp
   //setup the render buffer for depth
   glGenRenderbuffersEXT (1, &display->generated_depth_buffer);
   glBindRenderbufferEXT (GL_RENDERBUFFER_EXT, display->generated_depth_buffer);
+#ifndef OPENGL_ES2
   glRenderbufferStorageEXT (GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT,
-      display->gen_fbo_width, display->gen_fbo_height);
+      display->download_width, display->download_height);
+#else
+  glRenderbufferStorageEXT (GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT16,
+      display->download_width, display->download_height);
+#endif
 
   //setup a texture to render to
   glGenTextures (1, &fake_texture);
@@ -2422,8 +2431,13 @@ gst_gl_display_thread_init_upload_fbo (G
     //setup the render buffer for depth
     glGenRenderbuffersEXT (1, &display->upload_depth_buffer);
     glBindRenderbufferEXT (GL_RENDERBUFFER_EXT, display->upload_depth_buffer);
+#ifndef OPENGL_ES2
     glRenderbufferStorageEXT (GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT,
-        display->upload_width, display->upload_height);
+        display->download_width, display->download_height);
+#else
+    glRenderbufferStorageEXT (GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT16,
+        display->download_width, display->download_height);
+#endif
 
     //a fake texture is attached to the upload FBO (cannot init without it)
     glGenTextures (1, &fake_texture);

Regards,
Pratheesh





More information about the gstreamer-devel mailing list