P
peng123456
Unregistered / Unconfirmed
GUEST, unregistred user!
// Dvr_Main.Dvr_ServerBtn.Click;
if (initdsps() <= 0) then
showmessage('初始化DSP失败!');
dspchannl := gettotaldsps();
// for i := 0 to dspchannldo
begin
// hChannelHandle := channelopen(i);
end;
hChannelHandle[0] := channelopen(0);
SetOverlayColorKey(RGB(10, 10, 10));
registerdrawfun(0,@Drawfun,frmWeight.panVideo1.Handle );
lpRect[0] := frmWeight.panVideo1.clientrect;
startvideopreview(hChannelHandle[0],frmWeight. panVideo1.Handle, @lpRect[0], false, 128, 25);
hChannelHandle[1] := channelopen(1) ;
SetOverlayColorKey(RGB(10, 10, 10));
registerdrawfun(1,@Drawfun,frmWeight.panVideo2.Handle );
lpRect[1] :=frmWeight. panVideo2.clientrect;
startvideopreview(hChannelHandle[1],frmWeight. panVideo2.Handle, @lpRect[1], TRUE, 128, 25);
hChannelHandle[2] := channelopen(2) ;
SetOverlayColorKey(RGB(10, 10, 10));
registerdrawfun(2,@Drawfun,frmWeight. panVideo3.Handle );
lpRect[2] :=frmWeight. panVideo3.clientrect;
startvideopreview(hChannelHandle[2],frmWeight. panVideo3.Handle, @lpRect[2], TRUE, 128, 25);
hChannelHandle[3] := channelopen(3);
SetOverlayColorKey(RGB(10, 10, 10));
registerdrawfun(3,@Drawfun,frmWeight. panVideo4.Handle );
lpRect[3] :=frmWeight. panVideo4.clientrect;
startvideopreview(hChannelHandle[3],frmWeight. panVideo4.Handle, @lpRect[3], TRUE, 128, 25);
MP4_ServerSetStart(@StartCap);//优先调用1
MP4_ServerSetNetPort(5050,6050);//优先调用2
//
for i:=0 to 3do
begin
if(i = 0) then
begin
MP4_ServerSetBufNum(i,90);
//优先调用3
end
else
begin
MP4_ServerSetBufNum(i,80);
//优先调用3
end;
videoinfo.m_datatype := 50;
end;
///// addd
RegisterMessageNotifyHandle(self.Handle, MsgDataReady);
videoinfo.m_channum :=4 ;
videoinfo.m_waittime:= 23;
// for i:=0 to g_nChannelTotal-1do
begin
lpRect:=frmWeight.panVideo1.clientrect;
lpRect:=frmWeight.panVideo2.clientrect;
lpRect:=frmWeight.panVideo3.clientrect;
lpRect:=frmWeight.panVideo4.clientrect;
end;
bb:=MP4_ServerStart(@videoinfo);
MP4_ServerSetTTL(32);
MP4_ServerMaxUser(0,24);
if bb=true then
begin
//Dvr_ServerBtn.Enabled:=false;
end;
MP4_ServerSetMessage(WM_MYCOMMAND,self.Handle);
if (initdsps() <= 0) then
showmessage('初始化DSP失败!');
dspchannl := gettotaldsps();
// for i := 0 to dspchannldo
begin
// hChannelHandle := channelopen(i);
end;
hChannelHandle[0] := channelopen(0);
SetOverlayColorKey(RGB(10, 10, 10));
registerdrawfun(0,@Drawfun,frmWeight.panVideo1.Handle );
lpRect[0] := frmWeight.panVideo1.clientrect;
startvideopreview(hChannelHandle[0],frmWeight. panVideo1.Handle, @lpRect[0], false, 128, 25);
hChannelHandle[1] := channelopen(1) ;
SetOverlayColorKey(RGB(10, 10, 10));
registerdrawfun(1,@Drawfun,frmWeight.panVideo2.Handle );
lpRect[1] :=frmWeight. panVideo2.clientrect;
startvideopreview(hChannelHandle[1],frmWeight. panVideo2.Handle, @lpRect[1], TRUE, 128, 25);
hChannelHandle[2] := channelopen(2) ;
SetOverlayColorKey(RGB(10, 10, 10));
registerdrawfun(2,@Drawfun,frmWeight. panVideo3.Handle );
lpRect[2] :=frmWeight. panVideo3.clientrect;
startvideopreview(hChannelHandle[2],frmWeight. panVideo3.Handle, @lpRect[2], TRUE, 128, 25);
hChannelHandle[3] := channelopen(3);
SetOverlayColorKey(RGB(10, 10, 10));
registerdrawfun(3,@Drawfun,frmWeight. panVideo4.Handle );
lpRect[3] :=frmWeight. panVideo4.clientrect;
startvideopreview(hChannelHandle[3],frmWeight. panVideo4.Handle, @lpRect[3], TRUE, 128, 25);
MP4_ServerSetStart(@StartCap);//优先调用1
MP4_ServerSetNetPort(5050,6050);//优先调用2
//
for i:=0 to 3do
begin
if(i = 0) then
begin
MP4_ServerSetBufNum(i,90);
//优先调用3
end
else
begin
MP4_ServerSetBufNum(i,80);
//优先调用3
end;
videoinfo.m_datatype := 50;
end;
///// addd
RegisterMessageNotifyHandle(self.Handle, MsgDataReady);
videoinfo.m_channum :=4 ;
videoinfo.m_waittime:= 23;
// for i:=0 to g_nChannelTotal-1do
begin
lpRect:=frmWeight.panVideo1.clientrect;
lpRect:=frmWeight.panVideo2.clientrect;
lpRect:=frmWeight.panVideo3.clientrect;
lpRect:=frmWeight.panVideo4.clientrect;
end;
bb:=MP4_ServerStart(@videoinfo);
MP4_ServerSetTTL(32);
MP4_ServerMaxUser(0,24);
if bb=true then
begin
//Dvr_ServerBtn.Enabled:=false;
end;
MP4_ServerSetMessage(WM_MYCOMMAND,self.Handle);