zhaojiahai / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

JPEGStream improvement #96

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Create a video source as an instance of the JPEGStream class specifying
local jpeg file as image source:
 IVideoSource videoSource = new JPEGStream("D:\Samples\sampleimage.jpg");
2. Start the video source.
3. Execution fails at WorkerThread with the following exception caught in
empty catch block: Unable to cast object of type
'System.Net.FileWebRequest' to type 'System.Net.HttpWebRequest'.

With just few lines of code you can extend the JPEGStream to support
"file://" requests:
1. Make the "request" variable of type WebRequest (instead of HttpWebRrequest)
2. Use requests with cache prevention just for HTTP requests (get the
actual type of request by using the "as" operator).

Original issue reported on code.google.com by NNi...@gmail.com on 21 Apr 2009 at 8:43

GoogleCodeExporter commented 8 years ago
What is the point of this improvement? It is not hard to make this improvement, 
but 
point is a bit unclear. Just loop single image making constant video?

Original comment by andrew.k...@gmail.com on 19 Sep 2009 at 11:58

GoogleCodeExporter commented 8 years ago
Hi Andrew,

It was just my need to have an ability to put certain images somewhere to test 
custom
image recognition logic. I thought that someone else might need such feature 
too.
Anyway it's up to you.

Original comment by NNi...@gmail.com on 19 Sep 2009 at 8:31

GoogleCodeExporter commented 8 years ago
I just wanted to check what could be the idea ... We'll see what can be done.

Original comment by andrew.k...@gmail.com on 19 Sep 2009 at 8:47