我正在开发一个简单的应用程序,它将通过 rtsp 流从 vlc 流媒体服务器播放视频......但是当我运行应用程序时,它向我显示了一个类似这样的错误“Mediaplayer Error(1,-21474648),Videoview Error:1,-21474648 ","ARTSPConnectio Status:RTSP/1.0 461 Unsupported transport" and MyHandler SETUP(1) completed with result 0" 在 logCat 中并在模拟器中显示“无法播放此视频”..
我在上面做了很多谷歌..但没有找到解决方案,下面是我的代码
public class VideoDemo extends Activity
{
private VideoView video;
private MediaController ctlr;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
getWindow().setFormat(PixelFormat.TRANSLUCENT);
setContentView(R.layout.main);
video=(VideoView)findViewById(R.id.video);
ctlr=new MediaController(this);
video.setMediaController(ctlr);
video.setVideoURI(Uri.parse("rtsp://192.168.1.2:5544/sample"));
video.requestFocus();
video.start();
}
}
提前致谢