This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[OMAP3530 android-rowboat-eclair] use glTexBindStreamIMG

 Hi,

I want to play a video and to display it on the graphics layer (with OpenGl).

Why don't I use the extension OpenGLES "GL_IMG_texture_stream2" on the os  android-rowboat-eclair (OMAP35x_Android_Graphics_SDK_3_01_00_03) ?

In fact, I try to execute this program and it retrun -3.

    if (!(glext = glGetString(GL_EXTENSIONS)))
        return -1;

    if (!strstr((char *)glext, "GL_IMG_texture_stream2"))
        return -2;

    glTexBindStreamIMG =
        (PFNGLTEXBINDSTREAMIMGPROC)eglGetProcAddress("glTexBindStreamIMG");
    glGetTexAttrIMG = (PFNGLGETTEXSTREAMDEVICEATTRIBUTEIVIMGPROC)
        eglGetProcAddress("glGetTexStreamDeviceAttributeivIMG");
    glGetTexDeviceIMG = (PFNGLGETTEXSTREAMDEVICENAMEIMGPROC)
        eglGetProcAddress("glGetTexStreamDeviceNameIMG");

    if (!glTexBindStreamIMG || !glGetTexAttrIMG || !glGetTexDeviceIMG){
        printf("GL_IMG_texture_stream unsupported\n");
        return -3;
    }

Why  eglGetProcAddress return NULL ?

  • GL_IMG_texture_stream2 relies on BufferClass kernel module, which is not installed by default in rowboat (I doubt bufferclass module has been tested on rowboat anyway)

  • I add bufferclass module in the sdk graphics. And I can open and send ioctl.

    But, the function eglGetProcAddress doesn't work.

  • The ti_android_sgx_sdk package shipped in rowboat does not have the bufferclass driver. Where did you get the source? what is '#define DEVICE_COUNT' in your bc_cat.c?

  • Try to change it to 1.

    Please note that the bufferclass driver has not be tested on android yet. If the change above still does not work. It is something we have to take a look, but it will be depending on the plan when the feature will be enabled.

  • I resolved the problem. I applied a patch in the framework-base package of rowboat-eclair-dsp.

  • Glad you fixed the issue. Would you mind to post the patch here so someone else can get help from it? Thanks.

  • I applied this patch http://code.google.com/p/android/issues/detail?id=7681 .

    And I patched this files :

    *** ./frameworks/base/opengl/libs/entries.in.old        2010-11-16 17:32:39.000000000 +0100
    --- ./frameworks/base/opengl/libs/entries.in    2010-11-16 17:34:19.000000000 +0100
    ***************
    *** 347,349 ****
    --- 347,352 ----
      GL_ENTRY(void, glVertexPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
      GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height)
      GL_ENTRY(void, glWeightPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
    + GL_ENTRY(void, glTexBindStreamIMG, GLint device, GLint deviceoffset)
    + GL_ENTRY(void, glGetTexStreamDeviceAttributeivIMG, GLint device, GLenum pname, GLint *params)
    + GL_ENTRY(void, glGetTexStreamDeviceNameIMG, GLint device)

    *** ./frameworks/base/opengl/libs/GLES2/gl2ext_api.in.old       2010-11-16 17:22:37.000000000 +0100
    --- ./frameworks/base/opengl/libs/GLES2/gl2ext_api.in   2010-11-16 17:24:37.000000000 +0100
    ***************
    *** 103,105 ****
    --- 103,114 ----
      void API_ENTRY(glDisableDriverControlQCOM)(GLuint driverControl) {
          CALL_GL_API(glDisableDriverControlQCOM, driverControl);
      }
    + void API_ENTRY(glTexBindStreamIMG)(GLint device, GLint deviceoffset) {
    +     CALL_GL_API(glTexBindStreamIMG, device, deviceoffset);
    + }
    + void API_ENTRY(glGetTexStreamDeviceAttributeivIMG)(GLint device, GLenum pname, GLint *params) {
    +     CALL_GL_API(glGetTexStreamDeviceAttributeivIMG, device, pname, params);
    + }
    + void API_ENTRY(glGetTexStreamDeviceNameIMG)(GLint device) {
    +     CALL_GL_API(glGetTexStreamDeviceNameIMG, device);
    + }

    But, the SGX is very slow to display all video buffers.

    In fact, I had already tested on a embbeded-linux os and the SDK graphics 3_01_00_06. And, on a android os, the SGX takes more 18ms/frame than on a embbeded-linux os.

    Are there differents initializations of SGX between SDK android 3_01_00_03 and SDK 3_01_00_06?