time = get_current_time_in_ms()
refresh = 100 ' in ms, 10 times a second
targetTime = time
' Pre-compute target time so image download and display doesn't cause unnecessary lag
targetTime = get_current_time_in_ms() + refresh
image = get_image_from_url()
sleepTime = targetTime - get_current_time_in_ms()
' Only sleep if we don't think another image is ready yet
if sleepTime>0 then sleep(sleepTime)
I have a Linksys WVC54GCA web cam I would love to be able to add as a Roku Channel. Someone mentioned maybe being able to do this with a camera that does HLS, I think my webcam does this. Though I am not sure.
How hard would it be to have a channel that pulled the JPG every few seconds from the snapshot URL. As much as I would like the streaming, being able to see a quick snap shot just to make sure no one has kicked in my front door would be nice.
Not hard at all.
You could have a pile of cameras and refresh the images as fast as your cameras can deliver them (which, in my experience, is not very fast!) With the new 3.0 features, you could probably do it without flicker too.
What I stalled on was coming up with an algorithm for automatically subdividing the screen into smaller and smaller squares as more cameras are added to the system. Seemed really simple, but never quite figured it out...
And your web browser wouldn't be able to do that? Sounds like a neat little project especially if your front door gets kicked in 3 or 4 times per week.