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
Afficher le fichier Open project: Wiladams/NewTOAPIA Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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
Résultat void

GetBitmapInfo() public méthode

public GetBitmapInfo ( ) : BITMAPINFO
Résultat TOAPI.Types.BITMAPINFO

GrabSingleFrame() public méthode

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
Résultat bool

OnConnected() public méthode

public OnConnected ( ) : void
Résultat void

ShowCompressionChoices() public méthode

public ShowCompressionChoices ( ) : void
Résultat void

ShowPreviewWindow() public méthode

public ShowPreviewWindow ( ) : bool
Résultat bool

ShowVideoFormats() public méthode

public ShowVideoFormats ( ) : void
Résultat void

ShowVideoSourceChoices() public méthode

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

StartStreaming() public méthode

public StartStreaming ( ) : bool
Résultat bool

StopStreaming() public méthode

public StopStreaming ( ) : bool
Résultat bool

VfwCameraDevice() public méthode

public VfwCameraDevice ( int width, int height ) : System
width int
height int
Résultat System

VfwCameraDevice() public méthode

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
Résultat System