Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL error in OGVideoProcDroid example (Android 4.4) #1

Open
ruslo opened this issue Oct 1, 2015 · 5 comments
Open

OpenGL error in OGVideoProcDroid example (Android 4.4) #1

ruslo opened this issue Oct 1, 2015 · 5 comments

Comments

@ruslo
Copy link

ruslo commented Oct 1, 2015

Hi,

I'm trying to run OGVideoProcDroid example on my Android device and got runtime error. Here are the steps to reproduce:

  • Available targets
[ogles_gpgpu/examples/android/OGVideoProcDroid]> ./android list targets
Available Android targets:
----------
id: 1 or "android-19"
     Name: Android 4.4.2
     Type: Platform
     API level: 19
     Revision: 4
  • android update
[ogles_gpgpu/examples/android/OGVideoProcDroid]> android update project --target android-19 --path . --name OGVideoProcDroid
Updated project.properties
Updated local.properties
Updated file ./build.xml
Updated file ./proguard-project.txt
  • build
[ogles_gpgpu/examples/android/OGVideoProcDroid]> ndk-build
...
[...] Compile++      : og_jni_wrapper <= memtransfer_android.cpp
[...] SharedLibrary  : libog_jni_wrapper.so
[...] Install        : libog_jni_wrapper.so => libs/mips/libog_jni_wrapper.so
  • create APK
[ogles_gpgpu/examples/android/OGVideoProcDroid]> ant debug
...
-do-debug:
 [zipalign] Running zip align on final apk...
     [echo] Debug Package: /.../bin/OGVideoProcDroid-debug.apk
...
-post-build:

debug:

BUILD SUCCESSFUL
  • install
[ogles_gpgpu/examples/android/OGVideoProcDroid]> adb -d install -r bin/OGVideoProcDroid-debug.apk
4304 KB/s (1983478 bytes in 0.449s)
  pkg: /data/local/tmp/OGVideoProcDroid-debug.apk
Success

I've put some extra log messages (see my branch), look like it's crashing in camTexture.updateTexImage() method:

I/CamActivity(18175): Entering onFrameAvailable
I/CamActivity(18175): Try updateTexImage
W/Adreno-ES20(18175): <core_glBindTexture:572>: GL_INVALID_OPERATION
E/GLConsumer(18175): [unnamed-18175-0] bindTextureImage: error binding external texture image 0x5: 0x502
D/AndroidRuntime(18175): Shutting down VM

Thanks, Ruslo

@headupinclouds +cc

@headupinclouds
Copy link

        windowSurface.makeCurrent();  // <=== this works

       // update camera frame texture
       GLES20.glActiveTexture(GLES20.GL_TEXTURE1);

@ruslo
Copy link
Author

ruslo commented Oct 1, 2015

windowSurface.makeCurrent();

works for me

@ruslo
Copy link
Author

ruslo commented Oct 1, 2015

@internaut
Copy link
Owner

Hi, I didn't have the time to look into this for now, but if this fixes the error for you, please create a patch and submit a pull request.

@ruslo
Copy link
Author

ruslo commented Oct 2, 2015

but if this fixes the error for you, please create a patch and submit a pull request

Yes it fixes the error but as you can see from the SO answer (answer by author of grafika) it may lead to problems with UI in future. Probably since UI/example is quite simple we don't see any glitches. I will take a look at possibility to move work with camera to a separate thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants