Videoview behavior on differents smartphone (with different stagefright)

风流意气都作罢 提交于 2019-12-12 12:42:15

问题


I'm having compatibility problems using videoview (or MediaPlayer) for play rtsp streams in multiple videoviews in the same activity.

I have opened another question on this problem here but now I know that isn't my code the responsible, because I test same software on different phones and it work.

Viewing logcat Info messages for RTSP setup I see that each phone has different implementation of stagefright (android multimedia framework):

(A) I/RTSPEngine(147): User-Agent: Player/LG Player 1.0 for Android(stagefright alternative)
(B) I/ARTSPConnection(2252): User-Agent: stagefright/1.2 (Linux;Android 4.2.1)
(C) I/ARTSPConnection(10345): User-Agent: ALCATEL ONE TOUCH 997D-SVN/02001 (Linux;Android 4.1.1)
(D) W/ARTSPConnection(1948): User-Agent: User-Agent: Samsung GT-I9300 stagefright/Beyonce/1.1.9 (Linux;Android 4.3)


A is Lg l9 - android 4.1.2
B is Chinese jiayu g4 - Android 4.2.1
C is ALCATEL ONE TOUCH 997D - Android 4.1.1
D is Samsung galaxy S3 - Android 4.3

You can see that there are different android version and different stagefright here, but multiple rtsp fails only on Lg (see error here ). Another interesting thing is that only Lg use RtspEngine, others use ARTSPConnection

There is a way to force application to use native stagefright (if it exist on device) ?

How an application can manage this compatibility issue ? It is not reasonable to develop an app that will not be compatible with some brands of phones


回答1:


LG has full right to replace the AOSP implementation of RTSP with their engine. I don't have LG devices right now to test its performance and advantages (or disadvantages). Anyways, neither stagefright nor its alternatives were designed to support multiple concurrent active instances. I have never seen a device that would allow more than 4.

Luckily, with 1 GHz Dual-Core CPU (LG L9), you have enough generic computational power to decode four video streams of 270p, to fill the 960 x 540 screen, using ffmpeg, or gstreamer.




回答2:


You can check the device cpu compatibility .Suggest you transplant decoding library ,like vlc, ffmpeg,or gstreamer.



来源:https://stackoverflow.com/questions/21257305/videoview-behavior-on-differents-smartphone-with-different-stagefright

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