search

Home  >  Q&A  >  body text

canvas - Android video拉伸使得dimensions过大,app crash

Android上使用cocos2dx的videoplayer进行scale,由原来的1920x1080,拉伸到5760x1080导致SurfaceFlinger报错,app crash。

log如下:
10-18 14:51:59.186: I/Cocos2dxVideoView(858): 5760:1080
10-18 14:51:59.216: E/SurfaceFlinger(118): dimensions too large 5760 x 1080
10-18 14:51:59.216: E/SurfaceFlinger(118): createNormalLayer() failed (Invalid argument)
10-18 14:51:59.216: E/SurfaceComposerClient(384): SurfaceComposerClient::createSurface error Invalid argument

现在换了个思路,想将surfaceview的size保持在1920x1080,只对video内容(mediaplayer)拉伸,在surfaceview上只处理显示的video内容,以保证内存和dimensions都不会过大,这可以做到么?尝试了半天无果。

迷茫迷茫2773 days ago684

reply all(0)I'll reply

No reply
  • Cancelreply