Log in or register to post comments

Vuforia Android VideoPlayback Sample code

May 23, 2013 - 9:12pm #1

I have used VideoPlayback sample code provide by vuforia for android. There are two videos in this sample. 1st one played well, but 2nd one is not played. It will give me "Error while Opening file. Unloading the media player ". I have tested sample code in HTC Desired V, which has 4.0.3 .

I have search a lot. One place i found that if i load  video when target found and unload it if not found then problem will be solved. but i am not getting where to change in given code.

 

Please give me soultion.

 

Vuforia Android VideoPlayback Sample code

December 10, 2013 - 6:34am #9

Hello AL,

I am getting some error when running the video playback demo. My device is Sony Xperia Go running on Android 4.1.2

The log is attached below.

Thanks,

BP

---

12-10 19:56:56.500: E/Trace(11905): error opening trace file: No such file or directory (2)
12-10 19:56:56.580: D/dalvikvm(11905): Trying to load lib /data/data/com.qualcomm.QCARSamples.VideoPlayback/lib/libQCAR.so 0x4207edf0
12-10 19:56:56.590: D/dalvikvm(11905): Added shared lib /data/data/com.qualcomm.QCARSamples.VideoPlayback/lib/libQCAR.so 0x4207edf0
12-10 19:56:56.620: I/QCAR(11905): Native library libQCAR.so loaded
12-10 19:56:56.620: D/dalvikvm(11905): Trying to load lib /data/data/com.qualcomm.QCARSamples.VideoPlayback/lib/libVideoPlayback.so 0x4207edf0
12-10 19:56:56.620: D/dalvikvm(11905): Added shared lib /data/data/com.qualcomm.QCARSamples.VideoPlayback/lib/libVideoPlayback.so 0x4207edf0
12-10 19:56:56.620: D/dalvikvm(11905): No JNI_OnLoad found in /data/data/com.qualcomm.QCARSamples.VideoPlayback/lib/libVideoPlayback.so 0x4207edf0, skipping init
12-10 19:56:56.620: I/QCAR(11905): Native library libVideoPlayback.so loaded
12-10 19:56:56.650: D/QCAR(11905): VideoPlayback::onCreate
12-10 19:56:57.050: D/dalvikvm(11905): GC_FOR_ALLOC freed 1918K, 23% free 8686K/11203K, paused 31ms, total 33ms
12-10 19:56:57.340: D/dalvikvm(11905): GC_CONCURRENT freed 2345K, 29% free 8057K/11203K, paused 2ms+1ms, total 19ms
12-10 19:56:57.340: D/dalvikvm(11905): WAIT_FOR_CONCURRENT_GC blocked 16ms
12-10 19:56:57.941: D/dalvikvm(11905): GC_FOR_ALLOC freed 1073K, 24% free 8547K/11203K, paused 33ms, total 33ms
12-10 19:56:57.951: I/dalvikvm-heap(11905): Grow heap (frag case) to 17.171MB for 1536016-byte allocation
12-10 19:56:58.101: I/AR(11905): QCAR has been initialized successfully
12-10 19:56:58.101: I/AR(11905): QCAR SDK version 2.6.10
12-10 19:56:58.111: D/QCAR(11905): VideoPlayback::onResume
12-10 19:56:58.151: D/QCAR(11905): VideoPlayback::onConfigurationChanged
12-10 19:56:58.311: D/libEGL(11905): loaded /system/lib/egl/libEGL_mali.so
12-10 19:56:58.401: D/libEGL(11905): loaded /system/lib/egl/libGLESv1_CM_mali.so
12-10 19:56:58.431: D/libEGL(11905): loaded /system/lib/egl/libGLESv2_mali.so
12-10 19:56:59.012: D/OpenGLRenderer(11905): Enabling debug mode 0
12-10 19:57:00.083: D/dalvikvm(11905): GC_CONCURRENT freed 23K, 19% free 10374K/12743K, paused 14ms+12ms, total 47ms
12-10 19:57:00.233: D/QCAR(11905): InitQCARTask::onPostExecute: QCAR initialization successful
12-10 19:57:00.243: I/QCAR(11905): Java_com_qualcomm_QCARSamples_VideoPlayback_VideoPlayback_initTracker
12-10 19:57:00.303: I/QCAR(11905): Successfully initialized ImageTracker.
12-10 19:57:00.303: I/QCAR(11905): Java_com_qualcomm_QCARSamples_VideoPlayback_VideoPlayback_initApplicationNative
12-10 19:57:00.333: I/QCAR(11905): Java_com_qualcomm_QCARSamples_VideoPlayback_VideoPlayback_initApplicationNative finished
12-10 19:57:00.383: I/QCAR(11905): Using OpenGL ES 2.0
12-10 19:57:00.383: I/QCAR(11905): Using opaque GLView, depth buffer size: 16, stencil size: 0
12-10 19:57:00.393: I/QCAR(11905): Java_com_qualcomm_QCARSamples_VideoPlayback_VideoPlayback_loadTrackerData
12-10 19:57:00.393: I/AR(11905): ImageTracker: Successfully created dataset
12-10 19:57:00.854: D/dalvikvm(11905): GC_CONCURRENT freed 2038K, 21% free 10175K/12743K, paused 12ms+2ms, total 30ms
12-10 19:57:00.854: D/dalvikvm(11905): WAIT_FOR_CONCURRENT_GC blocked 12ms
12-10 19:57:01.384: D/dalvikvm(11905): GC_CONCURRENT freed 1782K, 21% free 10111K/12743K, paused 12ms+12ms, total 37ms
12-10 19:57:01.444: I/QCAR(11905): Successfully loaded and activated data set.
12-10 19:57:01.444: D/QCAR(11905): LoadTrackerTask::onPostExecute: execution successful
12-10 19:57:01.444: D/dalvikvm(11905): WAIT_FOR_CONCURRENT_GC blocked 0ms
12-10 19:57:01.484: D/dalvikvm(11905): GC_EXPLICIT freed 174K, 21% free 10089K/12743K, paused 3ms+3ms, total 33ms
12-10 19:57:01.504: I/QCAR(11905): Java_com_qualcomm_QCARSamples_VideoPlayback_VideoPlayback_startCamera
12-10 19:57:01.905: I/libblt_hw(11905): Library opened (handle = 0, fd = 42)
12-10 19:57:01.935: I/QCAR(11905): Configure Video Background : Video (480,320), Screen (480,320), mSize (480,320)
12-10 19:57:01.935: I/libblt_hw(11905): Library opened (handle = 1, fd = 47)
12-10 19:57:01.965: D/dalvikvm(11905): WAIT_FOR_CONCURRENT_GC blocked 0ms
12-10 19:57:01.995: D/dalvikvm(11905): GC_EXPLICIT freed 285K, 17% free 10586K/12743K, paused 2ms+3ms, total 29ms
12-10 19:57:01.995: I/libblt_hw(11905): Library closed (handle = 0, fd = 42)
12-10 19:57:02.005: I/QCAR(11905): Java_com_qualcomm_QCARSamples_VideoPlayback_VideoPlayback_setProjectionMatrix
12-10 19:57:02.025: I/Choreographer(11905): Skipped 34 frames!  The application may be doing too much work on its main thread.
12-10 19:57:03.887: I/QCAR(11905): Creating OpenGL ES 2.0 context
12-10 19:57:03.917: I/QCAR(11905): Java_com_qualcomm_QCARSamples_VideoPlayback_VideoPlaybackRenderer_initRendering
12-10 19:57:03.997: I/libblt_hw(11905): Library opened (handle = 0, fd = 42)
12-10 19:57:04.087: I/libblt_hw(11905): Library opened (handle = 2, fd = 57)
12-10 19:57:04.147: E/BufferQueue(11905): [unnamed-11905-2] dequeueBuffer: SurfaceComposer::createGraphicBuffer failed
12-10 19:57:04.157: E/MediaPlayer(11905): error (1, -12)
12-10 19:57:04.157: E/MediaPlayer(11905): Error (1,-12)
12-10 19:57:04.157: E/QCAR(11905): Error while opening the file. Unloading the media player (Unspecified media player error, -12)
12-10 19:57:04.157: E/MediaPlayer(11905): stop called in state 0
12-10 19:57:04.157: E/MediaPlayer(11905): error (-38, 0)
12-10 19:57:04.167: I/QCAR(11905): Java_com_qualcomm_QCARSamples_VideoPlayback_VideoPlaybackRenderer_updateRendering
12-10 19:57:04.167: E/MediaPlayer(11905): error (1, -2147483648)
12-10 19:57:04.167: I/QCAR(11905): Configure Video Background : Video (480,320), Screen (480,320), mSize (480,320)
12-10 19:57:04.167: W/MediaPlayer(11905): mediaplayer went away with unhandled events
12-10 19:57:04.167: E/MediaPlayer(11905): Error (1,-2147483648)
12-10 19:57:04.167: E/QCAR(11905): Error while opening the file. Unloading the media player (Unspecified media player error, -2147483648)
12-10 19:57:04.167: E/MediaPlayer(11905): stop called in state 0
12-10 19:57:04.167: E/MediaPlayer(11905): error (-38, 0)
12-10 19:57:04.167: W/MediaPlayer(11905): mediaplayer went away with unhandled events
---

Vuforia Android VideoPlayback Sample code

May 28, 2013 - 9:32am #8

Thank for the information...

Vuforia Android VideoPlayback Sample code

May 28, 2013 - 9:02am #7

Hi, I'm not aware of other solutions.

The reason why it is only supported on 4.0 and above, is because the sample relies on the Android Media Player and some advanced OpenGL extensions that allow transferring efficiently the video content to an OpenGL texture.

Without such feature of 4.0, it would be hard to have the real-time update of the texture based on the video content...

Technically you could try implement your own solution by somehow retrieving the content of each video frame and sending it to the OpenGL texture, but I don't think that would be an easy path... I would not recommend it.

 

Vuforia Android VideoPlayback Sample code

May 27, 2013 - 11:24am #6

By modifying the sample code can we resolve this problem...?

If there is other solution please suggest me

Thank you

Vuforia Android VideoPlayback Sample code

May 27, 2013 - 10:45am #5

Hi, the video on texture (i.e. rendered on the target) is only supported on Android 4.0 and above,

so it is normal and expected that on 2.3 it only runs in fullscreen mode.

Please check this FAQ:

https://developer.vuforia.com/forum/faq/videoplayback-what-videos-can-i-play-what-platform

 

Vuforia Android VideoPlayback Sample code

May 27, 2013 - 10:40am #4

I'm testing the VedioPlayBack sample code with Samsung galaxy ACE device. The android version of the galaxy ace is 2.3.6. When i play the video, it's coming to full screen mode. When I moving the target image the the video is not moving with the image and remaining full screen. But I tested it with Samsung galaxy note 2. The problem is not occurring with galaxy note 2. The android version of the galaxy note 2 is 4.1.2

Please give me a solution for galaxy ace.

Vuforia Android VideoPlayback Sample code

May 27, 2013 - 12:42am #3

I have solve the problem while load video on target found and unload it when not found. But after playing some video application gives me "freeAllBuffersLocked called but mQueue is not empty" and "Surface.finalize() has work. You should have called release() (34880872, 0)" error message, and app stop working.

please give me solution.

Vuforia Android VideoPlayback Sample code

May 24, 2013 - 12:17am #2

Hi, it sounds very much like a limitation of the device, a similar issue is discussed here:

https://developer.vuforia.com/forum/android/videoplayback-demo-error-when-adding-more-video

 

Log in or register to post comments