请问如何声明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;
声明:
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;
解决方案 »
- (很难啊)如何实时获取DBGrid 中当前单元格输入的内容?
- dxDBGrid 如何录入数据
- 串口MSComm分析读取的数据问题,没人能解决么
- 结婚进行时--是快乐,是烦躁;是幸福,是焦虑。我,告别单身。
- ???????DBLookupComboBox怎么实现智能匹配功能????????
- text数据字段显示问题?
- dbcheckbox变成灰色
- 报表问题
- 您好,请问 excel 表 怎样转换为sql server2000 中的表?
- 为什么我的SavePictureDialog无效
- 如何实现程序自动定时运行,反复提交url到服务器,并定时自动关闭程序?
- 求TreeView和Timer的全部属性与方法
BUF_SIZE = 65535;var
ptrBuf: array[0..7] of Pointer;
nTmp : Integer;
begin
for nTmp:= 0 to 7 do begin
GetMem(@ptrBuf[0], SizeOf(BYTE) * BUF_SIZE); //...
end;指针可以当作数组,只要你明白数组是怎么实现的。 StreamBuffer:array[0..65535] of byte; 我不知道这样能不能运行。我估计系统的栈没有那么大(一般是2K)。除非你是全局的。