![]() ![]() RE: Edanmo Stream read function query tedsmith (Programmer) But I don't seriously expect you to listen either. You'll thank me every time you have to do maintenance on the code. Probably gain a lot of performance back too. Then use WIA 2.0 and you can simply discard 90% to 100% of your GDI code (or is this GDI+ code?) as well as the convoluted stream code. Pretty simple to add methods to extract off things like Long length values from the buffered data or even search for values using InStrB() calls. It is basically the same logic as common "string builder" classes but using a Byte array as the buffer and CopyMemory to move data around instead of Mid$() or MidB$() statements. Is there some reason you don't just ashcan these streams and simply relay data as it arrives? All you are doing is adding more delay by buffering up the whole JPEG before re-sending it.Īs for accumulating the whole JPEG for local use, since GDI won't accept an IStream anyway you can create a faster and probably more effective "stream" class in VB6. The old read stream was simply MStream.Read (No of Bytes) but what do you use with Edanmo's stream and is this in the same form as the original byte data written to the stream? I cant find any info on how to set up the read statement. ![]() If I could read the whole stream once it was received I think this would do the trick. I could accumulate the pic byte data from the winsock and just resend it but this is too slow. So I want to relay only the small data from the server containing the jpg and not the full reconstituted larger picture at the server therefore I need to get a copy of the stream as it is received at the server and resend to the remote controllers. The network connection to the original pic source is only 100mhz while the link between the server and new remote controls is 1ghz and both are high speed i7's so I don't want to have the original sources sending each pic three times. My new challenge is to create 2 new remote control workstations to receive a copy of each picture when it changes directly from the server. I use a stream to accumulate the 8k chunks of picture bytes received by the server winsocks and use GDI to send this to an image box. With barely visible degradation of the picture. The original web picture is 1 meg but I cut it down to a below 30k JPG to greatly reduce the network traffic. ![]() I have a network setup working that successfully sends frames from a web camera at each of 16 workstations to a master server and displays 16 small pictures on the server.Ī frame is sent whenever there is movement in front of the web camera. How do I read a stream (using Edanmo's OLE) and send the contents to a winsock?Įg something like Winsock1.Sendata MyStream.read (pv,cb) Is this correct but what do I put in the pv & cbs ?īackground: (thanks to a lot of help from strongm) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |