It is likely that your video data is send into several data packets. So you have many OnDataAvailable events. You must reassemble data into a buffer before giving it to your video routine, unless your video routine is able to receive streaming data. -- [EMAIL PROTECTED] http://www.overbyte.be
----- Original Message ----- From: "Magno Lima" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Friday, May 13, 2005 3:45 PM Subject: [twsocket] Video transmission > Hi All, > > I would like to thank you all who are helping here. I am using the very > excelent Mitov components (www.mitov.com) to process the video. Even I can send the bytes, I cannot reprocess the video. Here 2 simple functions that works with this: > > Sending the video to client: > > procedure TForm1.SLGenericFilter1ProcessData(Sender: TObject; > InBuffer: ISLBlockBuffer; var OutBuffer: ISLBlockBuffer; > var SendOutputData: Boolean); > var > ADataAccess : ISLBlockDataAccess; > begin > ADataAccess := InBuffer.Data(); > ServerTCP.Client[0].Send(ADataAccess.BeginRead(), > ADataAccess.GetSize()) > end; > > and there where I receive: > > procedure TForm1.ClientTCPDataAvailable(Sender: TObject; Error: Word); > var > Buffer : array [0..9128] of byte; > Len : Integer; > Src : TSockAddrIn; > SrcLen : Integer; > InBuffer : ISLBlockBuffer; > begin > SrcLen := SizeOf(Src); > Len := ClientTCP.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen); > if Len >= 0 then > begin > // create video from received data > InBuffer := TSLBlockBuffer.CreateData( @Buffer[0], Len ); > SLGenericFilter2.SendData( InBuffer ); > end; > end; > > Simple, but its not working :( ... any clue? I have set the buffer size as > 9128 just because the bigger size I saw being sent by the server was about 8K per time. > > Thank you > > Magno > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be