Multiple Video Files Simultaneously Playing in Android

非 Y 不嫁゛ 提交于 2019-12-21 14:38:49

问题


I had asked the same question for iOS on iPad but now I am trying to see if it's possible within Android. The response I received so far is no within iOS. If it's possible in Android please explain what API is used.

Here's my original question referenced:

Original Posting on iOS for Multiple Videos Playing Simultaneously on an iPad


回答1:


I tried to do so(2 VideoViews), but only one video played. It is because of linux decoder, which may be used as single instance only(from stack trace info). For now, to achieve multiple videos playback I try to use FFmpeg as video decoder and OpenGL for render surface. I haven't done it yet, but I think that it will be too heavy operation(play multiple videos). However, I hope this is right direction for you.

I've checked decoder issue and it seems it is linux kernel depended: I've tested on Nexus One with 2.3.4 and 2.6.35.7-... kernel - it fails. On second rooted Nexus One with 2.3.4 and 2.6.37.6 linux kernel - it works. Also check this link: http://code.google.com/p/android/issues/detail?id=17802 So, play multiple videos via VideoView possible, but not on all devices(linux kernel depended, I guess).




回答2:


It is indeed possible and it's done through using a VideoView. I saw it working on a Motorola Droid with 2 videos playing simultaneously.

Creating multiple VideoViews will do the trick. Details are below in the API. http://developer.android.com/reference/android/widget/VideoView.html



来源:https://stackoverflow.com/questions/6261576/multiple-video-files-simultaneously-playing-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!