android – MediaPlayer认为aac *音频文件是一个视频文件?

android – MediaPlayer认为aac *音频文件是一个视频文件?,第1张

概述代码运行正常,但我正在设置这个Erro日志 Erro日志: 08-28 08:44:24.281: E/MediaPlayer(32454): mOnVideoSizeChangedListener is null. Failed to send MEDIA_SET_VIDEO_SIZE message. 我尝试将音频文件转换为不同格式的设置监听器等等…… 我真的需要这个帮助.她是整个MediaP 代码运行正常,但我正在设置这个Erro日志

Erro日志:

08-28 08:44:24.281: E/MediaPlayer(32454): mOnVIDeoSizeChangedListener is null. Failed to send MEDIA_SET_VIDEO_SIZE message.

我尝试将音频文件转换为不同格式的设置监听器等等……
我真的需要这个帮助.她是整个MediaPlayer日志:

日志:

08-28 08:44:24.121: V/MediaPlayer-JNI(32454): native_setup08-28 08:44:24.131: V/MediaPlayer(32454): constructor08-28 08:44:24.146: D/dalvikvm(32454): GC_CONCURRENT freed 193K,4% free 9397K/9735K,paused 2ms+2ms08-28 08:44:24.146: V/MediaPlayer-JNI(32454): native_finalize08-28 08:44:24.146: V/MediaPlayer-JNI(32454): release08-28 08:44:24.146: V/MediaPlayer-JNI(32454): native_finalize08-28 08:44:24.146: V/MediaPlayer-JNI(32454): release08-28 08:44:24.186: V/MediaPlayer(32454): setListener08-28 08:44:24.186: V/MediaPlayer-JNI(32454): setDataSourceFD: fd 4708-28 08:44:24.186: V/MediaPlayer(32454): setDataSource(47,740,14519)08-28 08:44:24.216: V/MediaPlayer(32454): setVIDeoSurfaceTexture08-28 08:44:24.216: V/MediaPlayer(32454): prepare08-28 08:44:24.246: V/MediaPlayer(32454): message received msg=5,ext1=0,ext2=008-28 08:44:24.246: V/MediaPlayer(32454): New vIDeo size 0 x 008-28 08:44:24.246: V/MediaPlayer(32454): callback application08-28 08:44:24.246: V/MediaPlayer(32454): back from callback08-28 08:44:24.246: V/MediaPlayer(32454): message received msg=1,ext2=008-28 08:44:24.246: V/MediaPlayer(32454): prepared08-28 08:44:24.246: V/MediaPlayer(32454): signal application thread08-28 08:44:24.246: V/MediaPlayer(32454): callback application08-28 08:44:24.246: V/MediaPlayer(32454): back from callback08-28 08:44:24.246: V/MediaPlayer(32454): prepare complete - status=008-28 08:44:24.246: V/MediaPlayer-JNI(32454): start08-28 08:44:24.246: V/MediaPlayer(32454): start08-28 08:44:24.281: E/MediaPlayer(32454): mOnVIDeoSizeChangedListener is null. Failed to send MEDIA_SET_VIDEO_SIZE message.08-28 08:44:24.281: I/MediaPlayer(32454): Don't send intent. msg.arg1 = 0,msg.arg2 = 008-28 08:44:24.281: E/MediaPlayer(32454): mOnPreparedListener is null. Failed to send MEDIA_PREPARED message.08-28 08:44:25.661: V/MediaPlayer(32454): message received msg=2,ext2=008-28 08:44:25.661: V/MediaPlayer(32454): playback complete08-28 08:44:25.661: V/MediaPlayer(32454): callback application08-28 08:44:25.661: V/MediaPlayer(32454): back from callback08-28 08:44:25.666: E/MediaPlayer(32454): mOnCompletionListener is null. Failed to send MEDIA_PLAYBACK_COMPLETE message.08-28 08:49:24.211: V/MediaPlayer-JNI(32454): release08-28 08:49:24.211: V/MediaPlayer(32454): setListener08-28 08:49:24.211: V/MediaPlayer(32454): disconnect08-28 08:49:24.226: V/MediaPlayer(32454): destructor08-28 08:49:24.226: V/MediaPlayer(32454): disconnect

和Java代码.

Java代码:

public class MainActivity extends Activity {    MediaPlayer TestingAudio;    @OverrIDe    public voID onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        Initialization();        DoStuff();    }    private voID Initialization() {        setContentVIEw(R.layout.activity_main);        TestingAudio = MediaPlayer.create(MainActivity.this,R.raw.samlagnin);    }    private voID DoStuff() {        TestingAudio.start();    }    @OverrIDe    protected voID onPause() {        super.onPause();        TestingAudio.release();        TestingAudio = null;    }
解决方法 我设法通过附加一些空的侦听器来摆脱错误.请参阅 http://developer.android.com/reference/android/media/MediaPlayer.html中的setonPreparedListener()和类似方法 @H_301_38@ 总结

以上是内存溢出为你收集整理的android – MediaPlayer认为aac *音频文件是一个视频文件?全部内容,希望文章能够帮你解决android – MediaPlayer认为aac *音频文件是一个视频文件?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1126679.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存