|
本人小白,版主的wifi android控制端程序中的,视频跟新帧率比较低,在网上找了相关资料,有用MJPEGView的方法,但方法一直没有设定对,
// 发起Http请求
private InputStream http(String url){
HttpResponse res;
// 创建Http客户端
DefaultHttpClient httpclient = new DefaultHttpClient();
httpclient.getParams().setParameter(
CoreConnectionPNames.CONNECTION_TIMEOUT, 300);
try {
HttpGet hg = new HttpGet(url);
res = httpclient.execute(hg);
return res.getEntity().getContent(); // 从响应中获取消息实体内容
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
与
private String urlstr;
HttpURLConnection conn; //Http实现网络通讯URLConnection
url = new URL(urlstr);
urlConn = (HttpURLConnection) url.openConnection(); // 使用HTTPURLConnetion打开连接
有什么区别? 求一个用MJPEGVIew的可运行的andorid wifi控制程序,zichenyukk@gmail.com
|
|