Log in or register to post comments

Show video instead teapot

May 14, 2011 - 5:04am #1

Hi, i need some help to show a video instead teapod in the example.
I read i need to hack the cpp, but i dont know what to do, someone can help me?

Re: Show video instead teapot

May 17, 2011 - 12:38pm #5

I found the mediametadataretriever, but i cannot import to my project

Re: Show video instead teapot

May 17, 2011 - 11:34am #4

It's possible, but it's a very tricky problem, and not one I can really help with. You'll need to find a video decoder that you can compile for Android. The goal is to get raw pixel data for each frame of the video. Then you can write these pixels to OpenGL texture memory each frame. That's an expensive operation, so you'll need to be careful to optimize as much as possible to get a reasonable framerate.

- Kim

Re: Show video instead teapot

May 17, 2011 - 10:10am #3

I wanted to play in the same space it shows the image, with rotation and transformation from 3d matrix. It is possible?

Re: Show video instead teapot

May 15, 2011 - 8:20am #2

I'm guessing you want to play a video using the Android API in response to tracking events. This is assuming you want to render full-screen, 2D video.

You only need to "hack" the ImageTargets.cpp file to communicate between the native code and Java. For this you use the JNI (Java Native Interface). You declare a method in Java that will play a video. Then, in the ImageTargets.cpp renderFrame() method you search for this Java method and call it when a trackable comes into view (or on whatever trigger you'd like). This thread has some code snippets that might be helpful:

http://ar.qualcomm.at/node/2000032

- Kim

Log in or register to post comments