目前一个开发板安装了spydroid进行视频采集,另一块开发板本人用videoview想去播放rtsp流,开发板都是支持H264硬压缩/解码的,但是问题是,本人用videoview播放rtsp时,系统提示无法播放。本人用vlc for android 试了试是可以播放的。两个板子用网线连接组成局域网。下面是eclipse的debug日志。
02-25 07:13:41.082: D/MediaPlayer(2858): Couldn””t open file on client side, trying server side
02-25 07:13:41.082: E/MediaPlayer(2858): Unable to to create media player
02-25 07:13:41.097: W/VideoView(2858): Unable to open content: rtsp://192.168.0.3:8086
02-25 07:13:41.097: W/VideoView(2858): java.io.IOException: setDataSource failed.: status=0x80000000
02-25 07:13:41.097: W/VideoView(2858): at android.media.MediaPlayer._setDataSource(Native Method)
02-25 07:13:41.097: W/VideoView(2858): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:844)
02-25 07:13:41.097: W/VideoView(2858): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:806)
02-25 07:13:41.097: W/VideoView(2858): at android.widget.VideoView.openVideo(VideoView.java:221)
02-25 07:13:41.097: W/VideoView(2858): at android.widget.VideoView.setVideoURI(VideoView.java:183)
02-25 07:13:41.097: W/VideoView(2858): at android.widget.VideoView.setVideoURI(VideoView.java:173)
02-25 07:13:41.097: W/VideoView(2858): at com.example.rtsp.MainActivity.PlayRtspStream(MainActivity.java:38)
02-25 07:13:41.097: W/VideoView(2858): at com.example.rtsp.MainActivity.access$0(MainActivity.java:37)
02-25 07:13:41.097: W/VideoView(2858): at com.example.rtsp.MainActivity$1.onClick(MainActivity.java:28)
02-25 07:13:41.097: W/VideoView(2858): at android.view.View.performClick(View.java:3511)
02-25 07:13:41.097: W/VideoView(2858): at android.view.View$PerformClick.run(View.java:14105)
02-25 07:13:41.097: W/VideoView(2858): at android.os.Handler.handleCallback(Handler.java:605)
02-25 07:13:41.097: W/VideoView(2858): at android.os.Handler.dispatchMessage(Handler.java:92)
02-25 07:13:41.097: W/VideoView(2858): at android.os.Looper.loop(Looper.java:137)
02-25 07:13:41.097: W/VideoView(2858): at android.app.ActivityThread.main(ActivityThread.java:4424)
02-25 07:13:41.097: W/VideoView(2858): at java.lang.reflect.Method.invokeNative(Native Method)
02-25 07:13:41.097: W/VideoView(2858): at java.lang.reflect.Method.invoke(Method.java:511)
02-25 07:13:41.097: W/VideoView(2858): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-25 07:13:41.097: W/VideoView(2858): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-25 07:13:41.097: W/VideoView(2858): at dalvik.system.NativeStart.main(Native Method)
02-25 07:13:41.097: D/VideoView(2858): Error: 1,0