неділя, 21 липня 2013 р.

Using the LPT port in the 64 bit application


Using the LPT port in the 64 bit application.
An example of the use of dynamic libraries inpout32.dll in 64 bit and 32 bit application. Tested on Windows XP SP3 Pro 32bit, Windows 7 Pro 64bit and 32bit, Windows Server 2008 R2, Windows 8 Enterprise 64bit, Windows Server 2012.


четвер, 14 лютого 2013 р.

1000Hz Tone Generator

ColourBars Frame

Black frame video


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;