C# Class WebcamLib.Webcam

Represents a webcam.
Inheritance: IDisposable
Afficher le fichier Open project: joeyespo/webcam-lib Class Usage Examples

Méthodes publiques

Méthode Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GrabFrame ( ) : Image

Grabs a single frame and returns it as an image.

SetPreviewCallback ( CamPreviewCallback previewCallback ) : void

Sets the preview callback (set to null to disable preview mode).

ShowVideoDisplayDialog ( ) : bool

Shows the video display dialog.

ShowVideoFormatDialog ( ) : bool

Shows the video format dialog.

ShowVideoSourceDialog ( ) : bool

Shows the video source dialog.

Webcam ( IWin32Window owner, CamPreviewCallback previewCallback = null, int previewRate = 66 ) : System

Initializes a new instance of the Webcam class.

Private Methods

Méthode Description
CreatePreviewWindow ( ) : IntPtr

Creates the preview window.

DestroyPreviewWindow ( ) : void

Destroys the preview window.

FrameCallbackProc ( IntPtr hWnd, System.Win32 &VideoHeader ) : int

Called on each frame update.

In order to draw on the resulting image, it must first be copied. This is because setting the bitmap data pointer directly and rotating the image can lead to random exceptions. This is expensive though. So by design, this doesn't happen automatically. See the following sites for details about this: http://msdn.microsoft.com/en-us/library/system.drawing.image.rotateflip.aspx http://social.msdn.microsoft.com/Forums/en-IE/csharplanguage/thread/affa1855-e1ec-476d-bfb1-d0985971f394

PreviewTick ( object sender, EventArgs e ) : void

Grab the next frame.

SetPreviewWindow ( IntPtr windowHandle ) : void

Sets the preview window.

Method Details

Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Résultat void

GrabFrame() public méthode

Grabs a single frame and returns it as an image.
public GrabFrame ( ) : Image
Résultat Image

SetPreviewCallback() public méthode

Sets the preview callback (set to null to disable preview mode).
public SetPreviewCallback ( CamPreviewCallback previewCallback ) : void
previewCallback CamPreviewCallback
Résultat void

ShowVideoDisplayDialog() public méthode

Shows the video display dialog.
public ShowVideoDisplayDialog ( ) : bool
Résultat bool

ShowVideoFormatDialog() public méthode

Shows the video format dialog.
public ShowVideoFormatDialog ( ) : bool
Résultat bool

ShowVideoSourceDialog() public méthode

Shows the video source dialog.
public ShowVideoSourceDialog ( ) : bool
Résultat bool

Webcam() public méthode

Initializes a new instance of the Webcam class.
public Webcam ( IWin32Window owner, CamPreviewCallback previewCallback = null, int previewRate = 66 ) : System
owner IWin32Window The owner window.
previewCallback CamPreviewCallback The method to call when new frames are taken.
previewRate int The rate at which to call .
Résultat System