2

I am trying to learn how to use ffmpeg for android, and am trying setup this project to start with: https://github.com/appunite/AndroidFFmpeg

It worked great with a few URLs I tried. I then compiled ffmpeg with mms protocol and wma support, and tried to open one media. The player returns cannot open media with error code -1. I can see it read the headers of the media in the logcat. I tried to debug and see why it gives me error, so I put a breakpoint @ jni_player_set_data_source function in player.c file. I followed these instructions to start ndk debugging in eclipse. After a few tries, it reached the breakpoint and I could continue or stop at the breakpoints in native code. But I cannot step in through the code, and cannot see the values of the variables. I put three breakpoints in that functions, I can step from one breakpoint to another, but thats about all I can do. How can I step through the code and more see the values of the variables?

  • I have FFMpegLibrary project setup as "is library" in eclipse.
  • The FFMpegExample uses FFMpegLibrary
  • I am debugging FFMpegExample as "Android application"
  • I am then letting the jni libs to load and then run ndk-gdb-eclipse
  • Then I go back to eclipse and start debugging the FFMpegLibrary native debug configuration. Then I can hit F8 on the java debug, and the execution stops at the native code. I can press F8 again to go to next native code's breakpoint but I cannot do F5, F6 or F7 (any code stepping) there. The icons for those are diabled in the toolbar.

Please let me know if you need more information to understand my setup.

4

1 回答 1

0

我放弃了尝试进一步调试该代码并使用 Vitamio 库。如果您只是在寻找一些支持比默认媒体播放器库更多格式和协议的 android 媒体播放器库,请使用Vitamio 捆绑包。我不知道许可证是如何工作的。我只是需要测试一些东西,所以,我没有费心去找出它。如果您设法使调试工作,请分享您的经验。

于 2013-02-15T20:17:56.813 回答