ScnLib_InputWebcamFrame()

ScnLib_InputWebcamFrame()

Std EditionPro EditionMax EditionUltra Edition
C++ __declspec(dllimport) void __stdcall ScnLib_InputWebcamFrame(const PVOID pRGB, int nWidth, int nHeight, int nBitCount);
C# [DllImport("ScnLib.dll")] public static extern void ScnLib_InputWebcamFrame(IntPtr RGB, int Width, int Height, int BitCount);
Basic Public Declare Sub ScnLib_InputWebcamFrame Lib "ScnLib.dll" (ByVal RGB As IntPtr, ByVal Width As Int32, ByVal Height As Int32, ByVal BitCount As Int32)
Delphi procedure ScnLib_InputWebcamFrame(const RGB: Pointer; Width: Integer; Height: Integer; BitCount: Integer); stdcall; external 'ScnLib.dll';
  • Description
    Input a custom webcam frame DIB.

  • Parameters
    • RGB [in]
      The pointer to the pixel buffer of the frame DIB (Device-Independent Bitmaps).
    • Width [in]
      The width of the frame DIB.
    • Height [in]
      The height of the frame DIB.
    • BitCount [in]
      The pixel bit count for the frame DIB, supporting only 32, 24, and 16-bit RGB DIB.
  • Return Value
    None.

  • Remarks
    The SDK allows for direct webcam device recording, but if you need to post-process raw webcam frames or create a video from custom DIBs (Device-Independent Bitmaps), you can use this function to input your custom DIBs. It's important to call this function consistently and in real-time, rather than in bulk, to ensure a steady flow of frames. The frame rate and resolution are adaptive, meaning you can input custom DIBs of any width, height and fps. However, take note that the DIB's row pitch must align with the size of a DWORD (4 bytes), particularly when inputting 24-bit or 16-bit DIBs. To stop inputting, pass in a parameter with a zero value.

  • See Also
    ScnLib_SelectWebcamDevice()
    ScnLib_RecordWebcamOnly()

Try the SDK for FREE SDK APIs overview