Android MusicPlayer uses Stagefright or opencore -
i read if media.stagefright.enable-player
set true
device uses stagefright
. in device's build.prop
see
media.stagefright.enable-player = false
when tired below
mediaplayer mp = new mediaplayer(); mp.setdatasource(string.format("http://127.0.0.1:%d/", socketport)); mp.prepare(); mp.start();
i hosted server socket mediaplayer connects
serversocket serversocket = null; try { serversocket = new serversocket(0); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } socketport = serversocket.getlocalport(); socket socket = null; try { socket = serversocket.accept(); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } inputstream = null; try { = socket.getinputstream(); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } byte [] temp = new byte [1024]; int bsize = -1; while(bsize <= 0) { try { bsize = is.read(temp); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } } final string readdata = new string(temp); log.e("readdta",readdata);
the log is
11-22 15:06:56.656: e/readdta(8737): / http/1.111-22 15:06:56.656: e/readdta(8737): host: 127.0.0.111-22 15:06:56.656: e/readdta(8737): user-agent: stagefright/1.1 (linux;android 2.3.6)
now doubt is,, how shows me user-agent: stagefright/1.1
though it's set media.stagefright.enable-player = false
in build.prop
?
if it's not way determine used, how can detect whether opencore or stagefright ?
from logs, feel version of android
froyo 2.2.3
1 of last versions before stagefright
became default. choice of player dependent on multiple conditions whether file
source or http
source or rtsp
source.
in froyo 2.2.3
, there 2 keys enabling stagefright
player , build flag. enable use of stagefright
player normal playback, need build framework code build_with_full_stagefright
observed here: http://androidxref.com/2.2.3/xref/frameworks/base/media/libmediaplayerservice/mediaplayerservice.cpp#670
getdefaultplayer
called multiple conditions , in cases aforementioned macro defined, try check value of system property "media.stagefright.enable-player"
(ref: http://androidxref.com/2.2.3/xref/frameworks/base/media/libmediaplayerservice/mediaplayerservice.cpp#750)
in case http
source, there different system property checked viz., "media.stagefright.enable-http"
. in case, feel enabled/set true , hence, stagefright
player being employed. please set false
enable pv_player
only.
Comments
Post a Comment