Récupérer une vidéo d'une caméra IP

Résolu
AymenEurotech Messages postés 7 Date d'inscription mercredi 2 mai 2007 Statut Membre Dernière intervention 4 mars 2010 - 24 avril 2008 à 12:06
AymenEurotech Messages postés 7 Date d'inscription mercredi 2 mai 2007 Statut Membre Dernière intervention 4 mars 2010 - 15 mai 2009 à 11:49
Bonjour à tous;

bon! je veux afficher une vidéo à partir d'une caméra IP dans un PictureBox ou dans un Pannel.
SVP si vous avez une idé common le faire, veyez m'aider

Merci;
 

2 réponses

fdouieb Messages postés 264 Date d'inscription vendredi 12 décembre 2003 Statut Membre Dernière intervention 12 juin 2013 3
15 mai 2009 à 11:15
HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://hostname");
req.Credentials = new NetworkCredential("userName", "Password");

byte[] buffer = new byte[100000];
int read, total = 0;

WebResponse resp = req.GetResponse();
Stream stream = resp.GetResponseStream();

while ((read = stream.Read(buffer, total, 1000)) != 0)
total += read;

if (total > 0)
{
Bitmap bmp = (Bitmap)Bitmap.FromStream(new MemoryStream(buffer, 0, total));
pictureBox1.Size = bmp.Size;
pictureBox1.BackgroundImage = bmp;
}
2
AymenEurotech Messages postés 7 Date d'inscription mercredi 2 mai 2007 Statut Membre Dernière intervention 4 mars 2010 1
15 mai 2009 à 11:49
merci beaucoup.
Aymen
1
Rejoignez-nous