Exception when calling setDataSource(FileDescriptor) method (failed.: status=0x80000000)

前端 未结 10 1055
野性不改
野性不改 2020-12-09 01:57

I\'m developing a video streaming application and I\'m getting stuck when calling set setDataSource with a FileDescriptor. I want my application to play the video as it is b

相关标签:
10条回答
  • 2020-12-09 02:40

    From what I have read, certain video file formats have their "header" information on the END of the file. Thus your FD must be support seek function to get the "header" from the end of the file. I suspect your input file to media player fails when it seeks to the "end" of the file.

    We are working on the same issues have you gotten further?

    Sean

    0 讨论(0)
  • 2020-12-09 02:40

    In my case switching from wav file to mp3 solved this exception with status=0x80000000

    0 讨论(0)
  • 2020-12-09 02:43

    I was facing the same issue while loading video from obb extension file. i fixed it by replacing:

    mPlayer.setDataSource(fd); 
    

    with:

    mPlayer.setDataSource(fis.getFileDescriptor(),fis.getStartOffset(),fis.getLength());
    

    where fis is AssetFileDescriptor

    0 讨论(0)
  • 2020-12-09 02:46

    Don't forgot permission

    <uses-permission android:name="android.permission.INTERNET" /> 
    
    0 讨论(0)
提交回复
热议问题