本文介绍了无法从我的ipcamera得到回应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hellos i could not get response from my ipcamera ,it build with no error but i guess the
ip address is wrong.How can i get the correct address of my ip camera. Both the ipcamera
and PC are connected to same network named Almajilis.i get the address from my mobile
that is connected to the same network .i am new to ipcamera i need help many thanks.
我尝试过:
What I have tried:
using System.Web;
using System.Net;
using System.IO;
..
..
..
private void ButStartClick(object sender, EventArgs e)
{
GetFrame();
}
private void GetFrame()
{
//string sourceURL = "http://192.168.0.102";
string sourceURL = "http://192.168.0.102/jpg/image.jpg";
//"http://192.168.0.102:4747";
byte[] buffer = new byte[1280 * 800];
int read, total = 0;
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(sourceURL);
WebResponse resp = req.GetResponse();
Stream stream = resp.GetResponseStream();
while ((read = stream.Read(buffer, total, 1000)) != 0)
{ total += read; }
Bitmap bmp = (Bitmap)Bitmap.FromStream(new MemoryStream(buffer, 0, total));
pictureBox1.Image = bmp;
}
推荐答案
这篇关于无法从我的ipcamera得到回应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!