Hey all,
I’m wanting to take an MJPEG stream from an HTML connection and paint it to a Canvas. Wait, you ask, why not just use an HTMLViewer? Well, I could but for what I am doing, a canvas is much more efficient. I have instances where I would be displaying multiple streams at once along with other content and there’s just stuff you can do in canvases that you can’t with an HTMLViewer. Plus, I have other instances where I want to use the same windows/controls but not with an MJPEG stream over an HTML connection.
Wait - can’t you use the “DrawInto” method to draw the contents of the HTMLViewer into a Canvas? Nope. The Docs say, “Although the DesktopHTMLViewer has this method, it’s not supported.” And additionally, even if I could, an HTMLViewer is a subclass of Control and so I can’t instantiate it in code without having it on the window. This makes it a real pain. So two reasons not to…
I would really like to simply use a URLConnection to get the stream - I can but it’s processing the data that is giving me problems. I can get it to work a little bit but not smoothly and then things lock up.
Anyone know of a good way to do this?
3 posts - 2 participants