Click here to Skip to main content
15,914,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,
I am new to socket programming,I wrote program for both client and server and I am able to view the camera connected at the server through my client program.But when I access the same camera in web browser using the ip address and port number assigned to it I am able to view only image/snapshot of that camera if I refresh/reload then I able to view next image.So to stream it as a continous video what I need to add in my server.Can anyone help me out from this problem.Thanks in Advance to all.


Regards,
RamyaRaj.
Posted

1 solution

you need to save the images in a stream and send them to the client on by one.

(the client must be constantly listening for data)

what transport layer protocol are u using to send the data? (UDP, TCP??)
 
Share this answer
 
Comments
RamyaRaj from NewDelhi 10-May-11 3:45am    
Hi Kurt Degiorgio,
I am using TCP protocol for sending data.
In my client program I am able to stream like a video in my client program I am receiving 1 image and displaying it on my main CWnd so I am repeating it in a thread.But in browser I am getting only image/Snapshot if i refresh i am able to see the next image.How can i stream it like a video in WebBrowser.Thanks in advance.

Regards,
RamyaRaj.
Kurt Degiorgio 10-May-11 6:21am    
that clarifies things a bit you need to use JavaScript, html5 or flash to display the image one after the other i.e simulate animation.
I also think there are open source projects that do this. try google
RamyaRaj from NewDelhi 10-May-11 6:43am    
i can use JavaScript, html5 or flash in VC++ I donot know how to do that did you have any idea about that.Can you please help me out.

Regards,
RamyaRaj.
RamyaRaj from NewDelhi 10-May-11 9:22am    
is there any way of finding from where request came.Means i am using accept function which gives the handle of the socket from where i got the request,so from that i can access my image continuosly if i got request from any web browser.Can you please help me out from this problem.

Regards,
RamyaRaj.
Kurt Degiorgio 11-May-11 3:48am    
first of all are you attempting to stream the images on a web browser or in your applications GUI? if the latter case then you need to create an animation with the video, the easy way would be 2 just change the images in order to simulate animation. (i.e not the must efficient but should work on paper) what do you mean by "finding from where request came" do you mean which host?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900