缓冲区的创建
请问如何声明8个StreamBuffer类型的数组啊?因为我要开辟8个缓冲区,如果一个个创建比较麻烦,况且不利于代码的编写,请指教!下面是其中的一个缓冲区的代码,但是我要创建8个,如何实现呢?请指教!
声明:
StreamBuffer:array[0..65535] of byte; //64K字节,UDP发送的最大包长度(缓冲区)
Bufflength:integer;
sendvideo: TIdUDPClient;
status: integer;
函数:ReadStreamData(通道句柄,缓冲区,缓冲大小,帧类型)
status:=ReadStreamData(channelHwnd[0],@StreamBuffer,@Bufflength,@FrameType);
case FrameType of
$00001: //PktIFrames I帧包
begin
//I帧网络发送
if (sendvideo.Active) then
begin
if sendvideo.Active then sendvideo.SendBuffer(StreamBuffer,Bufflength);
end;
memo1.Lines.Add('I帧长度:'+inttostr(Bufflength));
end;
$00004: //PktBBPFrames B帧包
begin
//B帧网络发送
if ((sendvideo.Active) then
begin
if sendvideo.Active then sendvideo.SendBuffer(StreamBuffer,Bufflength);
end;
memo1.Lines.Add('B帧长度:'+inttostr(Bufflength));
end;