Android Mediaplayer在尝试播放由LIVE555 QuickPlayerFilesink录制的mp4文件时出错

时间:2016-07-29 12:20:20

标签: android-mediaplayer live555 openrtsp

当我尝试播放由LIVE555录制的录制视频时,我在Android Kitkat上遇到以下错误。

以下是我在App上播放视频的源代码:

        player = new MediaPlayer();
        player.setDataSource(filePath); <------ getting error here
        player.setDisplay(holder);
        player.setOnCompletionListener(this);
        player.setOnPreparedListener(this);
        player.setOnErrorListener(this);
        player.setScreenOnWhilePlaying(true);
        log.debug("prepare async called");
        player.prepareAsync();

错误日志如下:

07-28 04:59:17.942 E/MediaPlayerService( 2242): error: -2147483648
07-28 04:59:17.942 E/MediaPlayer( 4072): Unable to create media player
07-28 04:59:17.942 W/RecordingActivity*( 4072): Failed to set file: setDataSourceFD failed.: status=0x80000000

请注意:相同的Android和Live555源代码适用于Android Gingerbread。

0 个答案:

没有答案