android - MediaPlayer unable to prepare? -
i wrote streaming radio app basic in functionality devices refuse "prepare" such optimus 1 running 2.2. app runs on other 2.2 devices brother's s2 running 2.3 , prime running 4.0.3.
any idea why specific devise not prepare audio?
edit: added code below
private void toggleplay() { try { if(!this.player.isplaying()) { this.player.setaudiostreamtype(audiomanager.stream_music); this.player.setdatasource(this.address); this.player.prepareasync(); } else { this.player.reset(); } } catch (illegalargumentexception e) { ; } catch (illegalstateexception e) { ; } catch (ioexception e) { ; } }
edit: added adb log
03-09 08:17:26.933: i/activitymanager(1352): starting activity: intent { cmp=com.landonmanning.mediaplayer.celestiaradio/.media } 03-09 08:17:27.003: v/pvplayer(1281): pvplayer constructor 03-09 08:17:27.003: v/pvplayer(1281): construct playerdriver 03-09 08:17:27.003: v/playerdriver(1281): constructor 03-09 08:17:27.013: v/playerdriver(1281): opencore hardware module loaded 03-09 08:17:27.013: v/playerdriver(1281): start player thread 03-09 08:17:27.023: v/playerdriver(1281): startplayerthread 03-09 08:17:27.023: v/playerdriver(1281): initializeforthread 03-09 08:17:27.023: v/playerdriver(1281): omx_masterinit 03-09 08:17:27.043: v/playerdriver(1281): osclscheduler::init 03-09 08:17:27.043: v/playerdriver(1281): createplayer 03-09 08:17:27.083: v/playerdriver(1281): addtoscheduler 03-09 08:17:27.083: v/playerdriver(1281): pendforexec 03-09 08:17:27.083: v/playerdriver(1281): osclactivescheduler::current 03-09 08:17:27.083: v/playerdriver(1281): startscheduler 03-09 08:17:27.093: v/pvplayer(1281): send player_setup 03-09 08:17:27.093: v/playerdriver(1281): send player code: 2 03-09 08:17:27.093: v/playerdriver(1281): commandcompleted 03-09 08:17:27.093: v/playerdriver(1281): completed command player_setup status=pvmfsuccess 03-09 08:17:27.093: v/pvplayer(1281): setdatasource(http://molestia.ponify.me:8062) 03-09 08:17:27.093: v/pvplayer(1281): prepareasync 03-09 08:17:27.093: v/pvplayer(1281): data source = http://molestia.ponify.me:8062 03-09 08:17:27.103: v/playerdriver(1281): send player code: 3 03-09 08:17:27.103: v/playerdriver(1281): handlesetdatasource 03-09 08:17:27.103: v/playerdriver(1281): handlesetdatasource- scanning extension 03-09 08:17:27.193: v/playerdriver(1281): commandcompleted 03-09 08:17:27.193: v/playerdriver(1281): completed command player_set_data_source status=pvmfsuccess 03-09 08:17:27.193: v/pvplayer(1281): run_init s=0, cancelled=0 03-09 08:17:27.193: v/playerdriver(1281): send player code: 6 03-09 08:17:27.193: v/playerdriver(1281): release string 2.2 len 3 03-09 08:17:27.453: d/statusbarpolicy(1352): [brighthy] 0. mdatanettype: 3 03-09 08:17:27.453: d/statusbarpolicy(1352): [brighthy] curnetwork=302220 curhplmn=302220 03-09 08:17:27.903: i/activitymanager(1352): displayed activity com.landonmanning.mediaplayer.celestiaradio/.media: 951 ms (total 4183 ms) 03-09 08:17:28.123: v/playerdriver(1281): handleinformationalevent: pvmfinfoerrorhandlingstart 03-09 08:17:28.123: v/playerdriver(1281): handleinformationalevent: type=26 unhandled 03-09 08:17:28.123: w/mediaplayer(20004): info/warning (1, 26) 03-09 08:17:28.123: i/mediaplayer(20004): info (1,26) 03-09 08:17:28.133: v/playerdriver(1281): commandcompleted 03-09 08:17:28.133: v/playerdriver(1281): completed command player_init status=pvmffailure 03-09 08:17:28.133: e/playerdriver(1281): command player_init completed error or info pvmffailure, -1 03-09 08:17:28.133: e/mediaplayer(20004): error (1, -1) 03-09 08:17:28.133: e/mediaplayer(20004): error (1,-1) 03-09 08:17:28.133: v/pvplayer(1281): run_set_video_surface s=-2147483648, cancelled=0 03-09 08:17:28.133: v/playerdriver(1281): handleinformationalevent: pvmfinfoerrorhandlingcomplete 03-09 08:17:28.133: w/playerdriver(1281): pvmfinfoerrorhandlingcomplete
you made need drop release() in there first. crashing due multiple mediaplayer instances.
Comments
Post a Comment