Procedure FillBlack(theFrame : IDeckLinkVideoFrame);
var
nextword : Pointer;
width : integer;
height : integer;
wordsRemaining : int64;
x,y,p : integer;
bytes : PByte;
bytesPerPixel : integer;
begin
theframe.GetBytes(nextword);
case theFrame.GetPixelFormat of
bmdFormat8BitYUV : bytesPerPixel:=2;
bmdFormat10BitYUV : bytesPerPixel:=2;
bmdFormat8BitARGB : bytesPerPixel:=4;
bmdFormat8BitBGRA : bytesPerPixel:=4;
bmdFormat10BitRGB : bytesPerPixel:=3;
end;
width:= theframe.GetWidth;
height:= theframe.GetHeight;
//FillChar(nextword,(width*height*bytesPerPixel), #255);
for y := 0 to height-1 do
for x:=0 to width-1 do
for p := 0 to bytesPerPixel-1 do
begin
pByte(nextword)^:=$FF; inc(pByte(nextword),1);
end;
end;