C# Class NewTOAPIA.Media.VfwCameraDevice

The VfwCameraDevice object represents a Vfw video capture device. As Vfw also supports audio capture devices, this object is specialized to only the video capture interfaces.
Inheritance: VfwCaptureDevice
Datei anzeigen Open project: Wiladams/NewTOAPIA Class Usage Examples

Public Methods

Method Description
ConfigureCapture ( ) : void

We can configure some settings related to capturing images from the camera. Primarily we want to control how many buffers are used in the capture process. If we are doing continuous capture, we can configure the interval between subsequent frames.

GetBitmapInfo ( ) : BITMAPINFO
GrabSingleFrame ( ) : bool

Grab a single frame from the video device. Disables Overlay and preview. Since we want complete control of video grabbing, this is what we want. We don't want or need a preview window, and we don't want to be doing overlay either. As the frame is grabbed, our frameDelegate function is called with the retrieved frame.

OnConnected ( ) : void
ShowCompressionChoices ( ) : void
ShowPreviewWindow ( ) : bool
ShowVideoFormats ( ) : void
ShowVideoSourceChoices ( ) : void

If the driver supports a dialog box to select the video Source, this method will display it on the screen.

StartStreaming ( ) : bool
StopStreaming ( ) : bool
VfwCameraDevice ( int width, int height ) : System
VfwCameraDevice ( int index, int width, int height, int fps, int windowStyle, IntPtr parentWindow ) : System

Private Methods

Method Description
ConfigureVideoFormat ( ) : void
ControlCallback ( IntPtr hWnd, int nState ) : int
ErrorCallback ( IntPtr hWnd, int nID, string lpsz ) : int
FrameCallBack ( IntPtr hwnd, VIDEOHDR &hdr ) : void
PrintCompressionType ( uint compression ) : void
StatusCallback ( IntPtr hWnd, int nID, string lpsz ) : int
StreamCallBack ( IntPtr hwnd, VIDEOHDR &hdr ) : void

Method Details

ConfigureCapture() public method

We can configure some settings related to capturing images from the camera. Primarily we want to control how many buffers are used in the capture process. If we are doing continuous capture, we can configure the interval between subsequent frames.
public ConfigureCapture ( ) : void
return void

GetBitmapInfo() public method

public GetBitmapInfo ( ) : BITMAPINFO
return TOAPI.Types.BITMAPINFO

GrabSingleFrame() public method

Grab a single frame from the video device. Disables Overlay and preview. Since we want complete control of video grabbing, this is what we want. We don't want or need a preview window, and we don't want to be doing overlay either. As the frame is grabbed, our frameDelegate function is called with the retrieved frame.
public GrabSingleFrame ( ) : bool
return bool

OnConnected() public method

public OnConnected ( ) : void
return void

ShowCompressionChoices() public method

public ShowCompressionChoices ( ) : void
return void

ShowPreviewWindow() public method

public ShowPreviewWindow ( ) : bool
return bool

ShowVideoFormats() public method

public ShowVideoFormats ( ) : void
return void

ShowVideoSourceChoices() public method

If the driver supports a dialog box to select the video Source, this method will display it on the screen.
public ShowVideoSourceChoices ( ) : void
return void

StartStreaming() public method

public StartStreaming ( ) : bool
return bool

StopStreaming() public method

public StopStreaming ( ) : bool
return bool

VfwCameraDevice() public method

public VfwCameraDevice ( int width, int height ) : System
width int
height int
return System

VfwCameraDevice() public method

public VfwCameraDevice ( int index, int width, int height, int fps, int windowStyle, IntPtr parentWindow ) : System
index int
width int
height int
fps int
windowStyle int
parentWindow System.IntPtr
return System