0

By the way, I'm sorry for my bad english. I want to create a streaming video system between client and server using Indy with this scenario, Webcam with stepper motors connected directly to the server via the usb port. Then server do recording and images that have been captured send to client using socket, in this case i using Indy TCPSocket. This system is similar to the CCTV system. In other words, this system is one way communication. what i have done on coding is i convert the video into bitmap using this code :

procedure TFormHome.Timer1Timer(Sender: TObject);
begin
  VideoGrabber.GetBitmap(FormStream.Image1.Picture.Bitmap);
end;

but I am still confused how to transmit the images continuously to client so that the images that received by the client into a moving picture.because I know images can not be sent directly and must be converted to a byte array.

Maybe you can show me sample script to send a bitmap image to the client using Indy TCPServer / Client.

Thank you.

4

1 回答 1

3

您在TBitmap对象中有位图。最简单的解决方案是将其保存到TStreamusing TBitmap.SaveToStream(),然后使用 Indy 的TIdIOHandler.Write(TStream)TIdIOHandler.ReadStream()方法传输它。

于 2013-04-29T15:46:19.187 回答