将快照图像保存到avi文件时,图像控件无法刷新流-ASP.net,C#,AForge.net [英] image control not refresh the stream when saving snapshot images to avi file - ASP.net, C#, AForge.net

查看:100
本文介绍了将快照图像保存到avi文件时,图像控件无法刷新流-ASP.net,C#,AForge.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从Panasonic IP摄像机的MJPEG流中获取快照,并将所有jpeg snaphot图像作为视频文件保存到avi文件中,而实时视频流正在使用aforge加载到asp.net的图像控件中.网络,现在我面临以下问题:

-使用Webresponse获取快照时,实时视频流停止加载.

以下是代码:

I am trying to get a snapshot from MJPEG stream of a Panasonic IP Camera and save all the jpeg snaphot image to avi file as a video file while the live video stream is loading to an image control of asp.net using aforge.net, and now I am facing a problem as the following:

- the live video stream stops loading while getting the snapshot using webresponse.

Below is the codes:

try
{
    WebRequest request = WebRequest.Create(SnapShotURL);
    request.Credentials = new NetworkCredential(txtUserName.Text.Trim(), txtPassword.Text.Trim());
    response = request.GetResponse();
    Stream responseStream = response.GetResponseStream();
    bmpSnapshot = new Bitmap(responseStream);
}
catch (Exception ex)
{
}
finally
{
    imgStream.ImageUrl = "";
    response.Close();
}


推荐答案

我想这很正常,您是否有理由期望它不会这样做?您的位图是它自己的请求,它不是从您查看的流中获取的.
I would imagine that is normal, do you have any reason to expect it WOULDN''T do that ? Your bitmap is coming in it''s own request, it''s not being grabbed from the stream you view.


这篇关于将快照图像保存到avi文件时,图像控件无法刷新流-ASP.net,C#,AForge.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆