[Android] vpu-lib error while playing two videos

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[Android] vpu-lib error while playing two videos

Jump to solution
4,565 Views
charleshuang
Senior Contributor II

Target O/S: Android

Target Software Package: android_jb4.2.2_1.0.0


We have an issue about vpu error while playing two videos in the long time

log message as below


03-01 12:05:50.580 E/vpu-lib ( 2168): VPU mutex couldn't be locked,ret = 16

03-01 12:05:50.580 I/OMXPlayer( 2168): LEVEL: 1 FUNCTION: OpenVpu LINE: 1331

03-01 12:05:50.580 I/OMXPlayer( 2168): OpenVpu: vpu open failure: ret=0x1

03-01 12:05:50.580 I/OMXPlayer( 2168): LEVEL: 1 FUNCTION: FilterOneBuffer LINE: 2874

03-01 12:05:50.580 I/OMXPlayer( 2168): FilterOneBuffer: open vpu failure

03-01 12:05:50.580 I/OMXPlayer( 2168): LEVEL: 1 FUNCTION: Load LINE: 753

03-01 12:05:50.580 I/OMXPlayer( 2168): StartPipeline faint

03-01 12:05:50.580 I/OMXPlayer( 2168): LEVEL: 1 FUNCTION: Load LINE: 764

03-01 12:05:50.580 I/OMXPlayer( 2168): Load faint and stop

03-01 12:05:50.580 I/OMXPlayer( 2168): Stop Player.

03-01 12:05:50.580 I/OMXPlayer( 2168): LEVEL: 1 FUNCTION: StateTransDownWard LINE: 336

03-01 12:05:50.580 I/OMXPlayer( 2168): OMX.Freescale.std.video_render.surface.sw-based Invalid state transitioin: 1 -> 4.

03-01 12:05:50.580 I/OMXPlayer( 2168): LEVEL: 1 FUNCTION: SysEventHandler LINE: 1535

03-01 12:05:50.580 I/OMXPlayer( 2168): OMX.Freescale.std.video_decoder.avc.v3.hw-based report Error 8000100b.

03-01 12:05:50.580 E/MediaPlayer( 3001): error (1, 0)

03-01 12:05:50.580 W/System.err( 3001): java.io.IOException: Prepare failed.: status=0x1

03-01 12:05:50.580 W/System.err( 3001): at android.media.MediaPlayer.prepare(Native Method)

03-01 12:05:50.580 W/System.err( 3001): at com.uptmate.twov.Player.playUrl(Player.java:64)

03-01 12:05:50.580 W/System.err( 3001): at com.uptmate.twov.Player.onCompletion(Player.java:172)

03-01 12:05:50.580 W/System.err( 3001): at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:1996)

03-01 12:05:50.580 W/System.err( 3001): at android.os.Handler.dispatchMessage(Handler.java:99)

03-01 12:05:50.580 W/System.err( 3001): at android.os.Looper.loop(Looper.java:137)

03-01 12:05:50.580 I/vpu-lib ( 2168): <gpu> alloc handle: 0xd30e7a20, paddr: 0x3e22b000, vaddr: 0x49e5b000

03-01 12:05:50.580 W/System.err( 3001): at android.app.ActivityThread.main(ActivityThread.java:5041)

03-01 12:05:50.580 W/System.err( 3001): at java.lang.reflect.Method.invokeNative(Native Method)

03-01 12:05:50.580 W/System.err( 3001): at java.lang.reflect.Method.invoke(Method.java:511)

03-01 12:05:50.580 W/System.err( 3001): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)

03-01 12:05:50.580 W/System.err( 3001): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)

03-01 12:05:50.580 W/System.err( 3001): at dalvik.system.NativeStart.main(Native Method)

03-01 12:05:50.580 I/vpu-lib ( 2168): <gpu> alloc handle: 0xd2d5c1a0, paddr: 0x361c5000, vaddr: 0x41df5000


Labels (3)
Tags (2)
0 Kudos
1 Solution
1,586 Views
eaglezhou
NXP Employee
NXP Employee

Hi,

   We fixed some mulit-instance issues in vpu lib 5.4.15

   Please try the the vpu lib 5.4.15 package plus related kernel patch(mxc_vpu.c).

   Thanks.

Eagle

View solution in original post

0 Kudos
16 Replies
1,586 Views
mghasan
Contributor I

Hi,

I am also having similar issue when two incoming video calls comes.

Here is the log:

E/vpu-lib ( 4259): VPU mutex couldn't be locked,ret = 16

E/vpu-lib ( 4259): Error: Unable to get mutex

E/vpu-lib ( 4259): IOSystemInit() failure.

I/OMXPlayer( 4259): LEVEL: 1 FUNCTION: InitFilterComponent LINE: 1939

I/OMXPlayer( 4259): InitFilterComponent: vpu load failure: ret=0x1

I/OMXPlayer( 4259): LEVEL: 1 FUNCTION: DeInitFilterComponent LINE: 1970

I/OMXPlayer( 4259): DeInitFilterComponent: failure: error state transition, current state=0

I/OMXPlayer( 4259): LEVEL: 1 FUNCTION: VpuEncoderInit LINE: 3007

I/OMXPlayer( 4259): VpuEncoderInit: vpu encoder construct failure: ret=0x80001009

I/OMXPlayer( 4259): LEVEL: 1 FUNCTION: ConstructComponent LINE: 569

I/OMXPlayer( 4259): Can't initialize component.

I/OMXPlayer( 4259): LEVEL: 1 FUNCTION: OMX_GetHandle LINE: 493

I/OMXPlayer( 4259): Load and call entry function fail.

E/OMX H263( 4259): Load component OMX.Freescale.std.video_encoder.h263.hw-based failed.

I/OMXPlayer( 4259): LEVEL: 1 FUNCTION: OMX_FreeHandle LINE: 587

I/OMXPlayer( 4259): NULL point.

E/OMX H263( 4259): Error opening encoder, ret code -2147479543

Setup:

Android JB 4.2.2.1.1.0 build

Custom board based on FSL IMX6 Sabresd

Codec used: H263.

Multiple calls works well with H264 codec with multiple VPU instances for each stream (tried with 4 streams).

Please let us know the solution to fix this issue.

Best regards,

Hasan

0 Kudos
1,586 Views
danielhung
Contributor III

Hi Hasan,

This issue is not fixed yet. We are still waiting for Freescale's update.

Best regards,

Daniel

0 Kudos
1,586 Views
karina_valencia
NXP Apps Support
NXP Apps Support
Re: [Android] vpu-lib error while playing two videos

Jian LiEmployee

please provide us how to reproduce it.

VPU has the capability to run two video simultaneously.

0 Kudos
1,586 Views
danielhung
Contributor III

Hi Karina,

Here is our reproduce steps.

1. Install the attached APK. (SignageUptmateTwoVideo.apk)

2. Prepare two H.264 BP 1080p@ 30fps video files, and change the names to "video1.mp4" & "video2.mp4" respectively.

3. Put the video files into /data/ folder.

    You also need to add the READ permission for these two video files.

4. Executes the APK, you should be able to see two video playback on screen at the same time.

5. Continue the test for a long while. In our experience, the issue may happen after one day.

    When the issue occurs, display screen will be blocked. No video playback is going.

    You can double check the logs to see if it's the same problem as ours.

        03-01 12:05:50.580 E/vpu-lib ( 2168): VPU mutex couldn't be locked,ret = 16

Best regards,

Daniel

0 Kudos
1,586 Views
karina_valencia
NXP Apps Support
NXP Apps Support

Jian Li can you continue with the follow up?

0 Kudos
1,585 Views
JianLi
NXP Employee
NXP Employee

eaglezhou, can you help check this issue?

0 Kudos
1,586 Views
karina_valencia
NXP Apps Support
NXP Apps Support

eaglezhou do you have an update?

0 Kudos
1,587 Views
eaglezhou
NXP Employee
NXP Employee

Hi,

   We fixed some mulit-instance issues in vpu lib 5.4.15

   Please try the the vpu lib 5.4.15 package plus related kernel patch(mxc_vpu.c).

   Thanks.

Eagle

0 Kudos
1,586 Views
charleshuang
Senior Contributor II

Hi,

I try the vpu lib 5.4.15 package and kernel patch ,but it will compile error

drivers/mxc/vpu/mxc_vpu.c: In function 'vpu_ioctl':

drivers/mxc/vpu/mxc_vpu.c:584:7: error: 'VPU_IOC_LOCK_DEV' undeclared (first use in this function)

drivers/mxc/vpu/mxc_vpu.c:584:7: note: each undeclared identifier is reported only once for each function it appears in

make[4]: *** [drivers/mxc/vpu/mxc_vpu.o] Error 1

make[3]: *** [drivers/mxc/vpu] Error 2

make[2]: *** [drivers/mxc] Error 2

make[1]: *** [drivers] Error 2

make[1]: *** Waiting for unfinished jobs....

.

Install: out/target/product/rom_7420/system/lib/lib_omx_udps_pipe_arm11_elinux.so

target thumb C: libvpu <= external/linux-lib/vpu/vpu_io.c

external/linux-lib/vpu/vpu_io.c:43:17: fatal error: g2d.h: No such file or directory

compilation terminated.

make: *** [out/target/product/rom_7420/obj/SHARED_LIBRARIES/libvpu_intermediates/vpu_io.o] Error 1

make: *** Waiting for unfinished jobs....

0 Kudos
1,586 Views
eaglezhou
NXP Employee
NXP Employee

Hi, charles

     Please add below definition in arch/arm/plat-mxc/include/mach/mxc_vpu.h

     #define VPU_IOC_LOCK_DEV       _IO(VPU_IOC_MAGIC, 16)

Eagle

0 Kudos
1,586 Views
charleshuang
Senior Contributor II

Hi

I found "LOCAL_MODULE_TAGS := eng" in Android.mk

which means that if we build user version ,then we don't have vpu-lib?

Is that correct?

0 Kudos
1,586 Views
eaglezhou
NXP Employee
NXP Employee


Hi, Charles

     I am not sure if vpu-lib can be build in user version.

     If not, you can try to modify it to 'optional'

Eagle

0 Kudos
1,586 Views
chetkaufman
NXP Employee
NXP Employee

Peng,

     I have a customer that is trying to use this patch to fix the same issue with playing multiple video files.   They are using JellyBean 4.2.2.  Their Linux kernel is 3.0.35.   They say they need a libg2d.so that contains the v0.6 interface (or later) that incorporates whatever fixes are in the v0.2 library that were posted in this community thread.  The other parts of the VPU fix are supplied in source form so they can patch those ourselves, but the libg2d.so part of the fix is  closed source.

Can you update the patch with a newer version of the Libg2d.so file?


0 Kudos
1,586 Views
charleshuang
Senior Contributor II

Hi,

It still compile error, there is no  "g2d.h" file

.

Install: out/target/product/rom_7420/system/lib/lib_omx_udps_pipe_arm11_elinux.so

target thumb C: libvpu <= external/linux-lib/vpu/vpu_io.c

external/linux-lib/vpu/vpu_io.c:43:17: fatal error: g2d.h: No such file or directory

compilation terminated.

make: *** [out/target/product/rom_7420/obj/SHARED_LIBRARIES/libvpu_intermediates/vpu_io.o] Error 1

make: *** Waiting for unfinished jobs....

0 Kudos
1,586 Views
eaglezhou
NXP Employee
NXP Employee

Hi, charles

     Sorry for convience, the g2d library is involved between 5.4.12(jb4.2.2_1.0.0) and 5.4.15
     (1) Please put g2d.h into device/fsl-proprietary/include

          put libg2d.so into device/fsl-proprietary/gpu-viv/lib

     (2) modify vpu_io.c:

          g2d_alloc(bytes, 0)  ==>  g2d_alloc(bytes)

      Please try and let me know the result.

      If it can't work, we have to remove g2d dependency from 5.4.15 patch separately.

Eagle

0 Kudos
1,586 Views
charleshuang
Senior Contributor II

Hi

Thanks for your help, it can build correctly.

But I just have another question  about "LOCAL_MODULE_TAGS := eng" in external/linux-lib/vpu/Android.mk

Thanks.

0 Kudos