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

Reply via email to