我目前有一個媒體播放器被賦予流式數據源。我有兩個測試設備:HTC Thunderbolt和三星Galaxy SII Skyrocket。Android-媒體播放器流媒體問題與測試設備
HTC設備能夠完美地傳輸文件;然而,銀河sII根本不能,並給我一堆媒體播放器的錯誤代碼。
我正在實施與媒體播放器相關的所有事情......但是,我無法解決這個問題......它如何在一個電話上工作,而不是在另一個電話上工作?它的相同鏈接。
任何想法?記錄下面的設備。如果需要,也可以發佈我的代碼。
謝謝!從HTC設備
日誌:從SGSII
06-25 18:19:23.192: D/MainAudioService(23564): next song is: http://soundcloud.com/stopdroprave/chromeo-night-by-night/download/s-bpPu1
06-25 18:19:26.675: W/MediaPlayer(23564): info/warning (1, 902)
06-25 18:19:28.497: D/dalvikvm(23564): GC_EXTERNAL_ALLOC freed 515K, 50% free 3544K/7047K, external 477K/989K, paused 22ms
06-25 18:19:31.250: D/MainAudioService(23564): Song length in minutes is: -6:5
06-25 18:19:31.250: D/MediaPlayer(23564): start() in
06-25 18:19:31.250: D/MediaPlayer(23564): start() out
06-25 18:19:31.310: I/MediaPlayer(23564): Info (1,902)
06-25 18:19:31.310: D/MainAudioService(23564): On Info in MP: 1and 902
06-25 18:19:50.909: D/MediaPlayer(23564): stop() in
06-25 18:19:50.919: D/MediaPlayer(23564): stop() out
06-25 18:19:50.919: D/MediaPlayer(23564): reset() in
06-25 18:19:50.929: D/MediaPlayer(23564): reset() out
06-25 18:19:50.939: D/MainAudioService(23564): next song is: http://soundcloud.com/stopdroprave/subvibe-mizukis-last-chance/download/s-Jaezp
06-25 18:19:55.433: W/MediaPlayer(23564): info/warning (1, 902)
06-25 18:19:58.656: D/dalvikvm(23564): GC_EXTERNAL_ALLOC freed 503K, 57% free 3099K/7047K, external 1102K/1614K, paused 45ms
06-25 18:20:00.338: D/MainAudioService(23564): Song length in minutes is: -6:39
06-25 18:20:00.338: D/MediaPlayer(23564): start() in
06-25 18:20:00.338: D/MediaPlayer(23564): start() out
06-25 18:20:00.408: I/MediaPlayer(23564): Info (1,902)
日誌:
06-25 18:27:32.797: E/MediaPlayer(24277): stop called in state 0
06-25 18:27:32.797: E/MediaPlayer(24277): error (-38, 0)
06-25 18:27:32.807: D/MainAudioService(24277): next song is: http://soundcloud.com/stopdroprave/doctor-p-watch-out-crazes-locd/download/s-qQhJP
06-25 18:27:32.807: E/MediaPlayer-JNI(24277): setDataSource: outside path in JNI is �[email protected]
06-25 18:27:33.498: E/MediaPlayer(24277): error (1, -2147483648)
06-25 18:27:33.498: E/MediaPlayer(24277): Error (1,-2147483648)
06-25 18:27:33.498: D/MainAudioService(24277): Error in MP: 1 and -2147483648
06-25 18:27:33.498: E/MediaPlayer(24277): stop called in state 0
06-25 18:27:33.498: E/MediaPlayer(24277): error (-38, 0)
06-25 18:27:33.508: D/MainAudioService(24277): next song is: http://soundcloud.com/stopdroprave/digitalism-circle-eric-prydz/download/s-XlYFv
06-25 18:27:33.508: E/MediaPlayer-JNI(24277): setDataSource: outside path in JNI is �[email protected]
06-25 18:27:34.149: E/MediaPlayer(24277): error (1, -2147483648)
06-25 18:27:34.149: E/MediaPlayer(24277): Error (1,-2147483648)
06-25 18:27:34.149: D/MainAudioService(24277): Error in MP: 1 and -2147483648
編輯:
這裏是其中i設置DataSource ....
SdrPlaylist p = mPlaylist.get(currentNum);
String path = p.songUrl;
artistInfo = p.songName;
nextSong = Toast.makeText(getApplicationContext(),
"Buffering Next Song...", Toast.LENGTH_LONG);
nextSong.setGravity(Gravity.TOP, 0, 110);
nextSong.show();
try {
Log.d(TAG, "next song is: " + path);
mediaPlayer.setDataSource(path);
mediaPlayer.prepareAsync();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalStateException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
嘗試添加代碼,在其中設置您的媒體播放器的數據源 – Raykud
只是添加了數據源代碼部分 – Splitusa
我嘗試了與您在SGS2上相同的鏈接,但都沒有工作。例如,這個鏈接; http://soundcloud.com/fanu/d-b-show-with-fanu-docius-on/download工作正常。不能說出你正在使用的下載鏈接有什麼問題。 – harism