C
cxlin
Unregistered / Unconfirmed
GUEST, unregistred user!
avphone2.6 视频数据传输
如何通过serversocket 和clientsocket发送和接收数据?
服务器端,图象捕捉和压缩图象的格式发送
procedure TForm1.Button1Click(Sender: TObject);
var vt2:OleVariant;
begin
Form1.VidCap1.Connect(0);
Form1.VidCap1.Compressor:='h263';
Form1.VidCap1.StartCapture;
vt2:= VidCap1.BitmapFormat;//压缩图象的格式,是OleVariant类型
if ok1=1 then
//如果通信成功
begin
ServerSocket1.socket.Connections[0].sendbuf(vt2,sizeof(vt2));
end;
end;
客户端接收压缩图象的格式
procedure TForm1.ClientSocket1Read(Sender: TObject;
Socket: TCustomWinSocket);
var vt:OleVariant;
begin
ClientSocket1.socket.ReceiveBuf(vt,sizeof(vt));
end;
这样有什么错误吗,我每次运行时,当客户端收到数据时总时出现错误提示;说是
什么'oleaut32.dll'出错, 请各位高手帮助解决 ,所有分相送
如何通过serversocket 和clientsocket发送和接收数据?
服务器端,图象捕捉和压缩图象的格式发送
procedure TForm1.Button1Click(Sender: TObject);
var vt2:OleVariant;
begin
Form1.VidCap1.Connect(0);
Form1.VidCap1.Compressor:='h263';
Form1.VidCap1.StartCapture;
vt2:= VidCap1.BitmapFormat;//压缩图象的格式,是OleVariant类型
if ok1=1 then
//如果通信成功
begin
ServerSocket1.socket.Connections[0].sendbuf(vt2,sizeof(vt2));
end;
end;
客户端接收压缩图象的格式
procedure TForm1.ClientSocket1Read(Sender: TObject;
Socket: TCustomWinSocket);
var vt:OleVariant;
begin
ClientSocket1.socket.ReceiveBuf(vt,sizeof(vt));
end;
这样有什么错误吗,我每次运行时,当客户端收到数据时总时出现错误提示;说是
什么'oleaut32.dll'出错, 请各位高手帮助解决 ,所有分相送