(2013-02-23, 09:00)fun_ Wrote: is it impossible to use local native window which has MOD32 surface instead of the native window returned from g_xbmcapp.GetAndroidVideoWindow()?
I think metadata of input stream is correct and no need to *fix* it. only MOD32 surface is required to output frames from hardware.
We don't use a "real" surface, but a SurfaceTexture, which wraps a GL texture.
Behind the scenes, GraphicBuffers are used, which are HW buffers that the HW decoder fills with a decoded frame. On top of those, one EGLImageKHR is mapped to each native window buffer.
"SurfaceTexture::updateTexImage" just maps the latest EGLImageKHR to the GL texture.
Fact is, on the other platforms, if there is a MODxx tweak, the frame size metadata reflects this and all is well.
On rk3066, the returned frame size is not MODxx and I assume this (wrong) frame size is used to build the EGLImage -> crashes.
So, really, for this to work on rk3066, the HW buffers size should be MODxx.
Note that using SW renderer, i.e. libstagefright thumbnail mode, just crashes the mediaserver/vpu:
Code:
F/libc ( 90): Fatal signal 11 (SIGSEGV) at 0x40112000 (code=2), thread 1960 (mediaserver)
I/DEBUG ( 85): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 85): Build fingerprint: 'rk30sdk/rk30sdk/rk30sdk:4.1.1/JRO03H/eng.root.20130116.110927:eng/test-keys'
I/DEBUG ( 85): pid: 90, tid: 1960, name: mediaserver >>> /system/bin/mediaserver <<<
I/DEBUG ( 85): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 40112000
I/DEBUG ( 85): r0 40112000 r1 42a75020 r2 001fcfe0 r3 40c37000
I/DEBUG ( 85): r4 41b89a48 r5 41b9b420 r6 00000440 r7 00000780
I/DEBUG ( 85): r8 42678000 r9 41b900e0 sl 41b9b690 fp 41b8d428
I/DEBUG ( 85): ip 40111000 sp 42877ca8 lr 40f600d7 pc 4013f798 cpsr 20000030
I/DEBUG ( 85): d0 1010101010101010 d1 1010101010101010
I/DEBUG ( 85): d2 1010101010101010 d3 1010101010101010
I/DEBUG ( 85): d4 0000000000000000 d5 0000002800000000
I/DEBUG ( 85): d6 4220000041300000 d7 3f8000003debc8c1
I/DEBUG ( 85): d8 0000000000000000 d9 0000000000000000
I/DEBUG ( 85): d10 0000000000000000 d11 0000000000000000
I/DEBUG ( 85): d12 0000000000000000 d13 0000000000000000
I/DEBUG ( 85): d14 0000000000000000 d15 0000000000000000
I/DEBUG ( 85): d16 00000000000099cf d17 7e37e43c8800759c
I/DEBUG ( 85): d18 4000000000000000 d19 bf66c16be38d5283
I/DEBUG ( 85): d20 3fc5555533bce6df d21 3e66376972bea4d0
I/DEBUG ( 85): d22 3ff0000000000000 d23 bf6376c7f8038f6c
I/DEBUG ( 85): d24 3ff009bb63fc01c8 d25 0000000000000000
I/DEBUG ( 85): d26 0000000000000000 d27 0000000000000000
I/DEBUG ( 85): d28 0000000000000000 d29 0000000000000000
I/DEBUG ( 85): d30 0000000000000000 d31 0000000000000000
I/DEBUG ( 85): scr 60000010
I/DEBUG ( 85):
I/DEBUG ( 85): backtrace:
I/DEBUG ( 85): #00 pc 0000c798 /system/lib/libc.so
I/DEBUG ( 85): #01 pc 000fece4 <unknown>
I/DEBUG ( 85):
I/DEBUG ( 85): stack:
I/DEBUG ( 85): 42877c68 ec7a2d80
I/DEBUG ( 85): 42877c6c 42a74000 anon_inode:ion_share_fd
I/DEBUG ( 85): 42877c70 40c37000 /system/lib/libvpu.so
I/DEBUG ( 85): 42877c74 00000000
I/DEBUG ( 85): 42877c78 00000000
I/DEBUG ( 85): 42877c7c 40c37000 /system/lib/libvpu.so
I/DEBUG ( 85): 42877c80 00000000
I/DEBUG ( 85): 42877c84 40c2f514 /system/lib/libvpu.so (VPUMemInvalidate+200)
I/DEBUG ( 85): 42877c88 42877cdc
I/DEBUG ( 85): 42877c8c 42877c90
I/DEBUG ( 85): 42877c90 00000000
I/DEBUG ( 85): 42877c94 41b89a48 [heap]
I/DEBUG ( 85): 42877c98 41b9b420 [heap]
I/DEBUG ( 85): 42877c9c 00000440
I/DEBUG ( 85): 42877ca0 df0027ad
I/DEBUG ( 85): 42877ca4 00000000
I/DEBUG ( 85): #00 42877ca8 42877cdc
I/DEBUG ( 85): 42877cac 42877ce8
I/DEBUG ( 85): #01 42877cb0 00000000
I/DEBUG ( 85): 42877cb4 00000000
I/DEBUG ( 85): 42877cb8 00000000
I/DEBUG ( 85): 42877cbc 00000000
I/DEBUG ( 85): 42877cc0 41b9b6a0 [heap]
I/DEBUG ( 85): 42877cc4 00000000