RTSP 流式传输不起作用
我创建了一个可以在 RTSP 上播放的应用程序:
MediaPlayer mediaPlayer = new MediaPlayer();
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
try
{
mediaPlayer.setDataSource(
"rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov");
mediaPlayer.prepare();
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
//e.printStackTrace();
Toast.makeText(MyYouTubeActivity.this,
"Eror Play", Toast.LENGTH_SHORT).show();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
mediaPlayer.start();
但它不起作用,在 Logcat 中我看到了这一点:
09-12 12:57:20.899: ERROR/PlayerDriver(95): Command PLAYER_PREPARE completed with an error or info PVMFFailure
I've created an app which will play from on RTSP:
MediaPlayer mediaPlayer = new MediaPlayer();
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
try
{
mediaPlayer.setDataSource(
"rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov");
mediaPlayer.prepare();
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
//e.printStackTrace();
Toast.makeText(MyYouTubeActivity.this,
"Eror Play", Toast.LENGTH_SHORT).show();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
mediaPlayer.start();
But it's not working, in Logcat I see this:
09-12 12:57:20.899: ERROR/PlayerDriver(95): Command PLAYER_PREPARE completed with an error or info PVMFFailure
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首次插入权限::
代码::
并引用::这个
First inset permission ::
code ::
and also refer :: This