简体   繁体   English

RTSP实时流是否仅在Android 1.5 / 1.6上不起作用?

[英]Does RTSP live streaming just not work on Android 1.5/1.6?

My main dev phone is a Nexus 1 running 2.2. 我的主要开发人员手机是运行2.2的Nexus 1。 I have successfully been streaming live video to this device from a Wowza server for several weeks now. 我已经成功地将Wowza服务器中的实时视频流传输到该设备已有几周了。

I have now taken my application (without modifications) and put it on a Sony Ericsson Xperia running 1.6. 现在,我已将我的应用程序(未进行任何修改)放入运行1.6的索尼爱立信Xperia上。 The video will not play. 该视频将无法播放。 I get the following errors: 我收到以下错误:

MediaPlayer: Couldn't open file on client side, trying server side
...
MediaPlayer: info/warning (1/26)
PlayerDriver: Command PLAYER_INIT completed with an error or info PVMFFailure
MediaPlayer: Error:(1,-1)
VideoView: Error: 1,-1

I've been googling around, but just can't seem to get a clear answer. 我一直在四处搜寻,但似乎无法获得明确的答案。 Does anyone know if live streaming just doesn't work on some versions of Android? 有人知道实时流式传输是否在某些版本的Android上不起作用吗?

video stream for android: Android的视频流:

package com.test.videodemo;

import android.app.Activity;

import android.graphics.PixelFormat;
import android.net.Uri;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView; 

public class videodemo extends Activity {

VideoView v1;
String path;
Uri url;


/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().setFormat(PixelFormat.TRANSLUCENT); 
    setContentView(R.layout.main);
    VideoView videoHolder = new VideoView(this);
    videoHolder.setMediaController(new MediaController(this));
    setContentView(videoHolder);

    videoHolder.setVideoURI(Uri.parse("http://bitcast-in.bitgravity.com/web18/web18/3gp/indo_china_suhasini.3gp"));
    videoHolder.requestFocus();
    videoHolder.start(); 

}

} }

We have used RTSP Live streaming on 1.5, 1.6, and 2.1; 我们在1.5、1.6和2.1上使用过RTSP Live流; so you should be able to get this to work; 因此您应该能够使它起作用; but you may have an encoding that only works on 2.2. 但您的编码可能仅适用于2.2。 What type of stream are you streaming? 您正在流式传输什么类型的流?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM