Send Webcam Images Over Winsock
Hi,
Is it possible to send webcam images over winsock?
I know how to use winsock very well, I'm just not sure how I would send data like images over winsock. How fast would it be too? I need it to send the data in less than a second, maybe even less than half a second. Like viewing a webcam on the internet direct from their server.
Any help would be greatly appreciated,
Alex
Re: Send Webcam Images Over Winsock
I always hesitate to say that something can't be done, but I suspect that Winsock is not the right tool for the job. Unfortunately I'm no multimedia expert but I suspect there are things in DirectX that are better suited.
Theoretically you could compose a buffer of a frame or two of video, and use Winsock to send it via UDP, wait for the SendComplete event to trigger and send the next buffer. That's about the fastest you'll get without risking buffer starvation in the sender. Whether that would result in a jerky picture at the other end and meet your timing requirements I couldn't say. It may be one of those "suck it and see" types of thing or maybe a Multimedia guru might drop in and educate us both.
Re: Send Webcam Images Over Winsock
Re: Send Webcam Images Over Winsock
Quote:
Originally Posted by djwk
Hi,
Is it possible to send webcam images over winsock?
I know how to use winsock very well, I'm just not sure how I would send data like images over winsock. How fast would it be too? I need it to send the data in less than a second, maybe even less than half a second. Like viewing a webcam on the internet direct from their server.
Any help would be greatly appreciated,
Alex
Don't count on it. There are too many factors involved that influence the time. Your computer speed, Your Internet connection speed, what kind of a connection do you have, How big is the image, Is it compressed or not, How much traffic is already going on, how good is your ISP, etc, etc, etc.
There is no real guaranteed way to insure that you can send images at any amount of time.
As far as sending images; you send them just like you would send any data. Image data is no different than text data; it's all binary when it is sent.