C# Class NewTOAPIA.Media.VfwCaptureDevice

This class encapsulates a video capture device as represented by the AviCap interface of old. There are only two functions that are connected to actual API calls. All the other methods are actually messages that are sent to a window.
Show file Open project: Wiladams/NewTOAPIA

Protected Properties

Property Type Description
fWindowHandle System.IntPtr

Public Methods

Method Description
ConfigureCapture ( ) : void
Connect ( ) : bool
CreateWindow ( int x, int y, int width, int height, int style, IntPtr parentID ) : void
Disconnect ( ) : void
OnConnected ( ) : void
OnDisconnecting ( ) : void
SendMessage ( int msg, uint wParam, int lParam ) : int
SendSimpleMessage ( int msg ) : int
SetCallbackOnCapControl ( VfwcapControlCallback fpProc ) : bool
SetCallbackOnError ( VfwcapErrorCallback fpProc ) : bool
SetCallbackOnFrame ( VfwVideoFrameDelegate fpProc ) : bool
SetCallbackOnStatus ( VfwcapStatusCallback fpProc ) : bool
SetCallbackOnVideoStream ( VfwVideoFrameDelegate fpProc ) : bool
SetFramesPerSecond ( int fps ) : void
capCaptureSequence ( ) : bool
capCaptureSequenceNoFile ( ) : bool
capDlgVideoDisplay ( ) : bool
capDlgVideoFormat ( ) : bool
capDlgVideoSource ( ) : bool
capDriverConnect ( ) : bool
capDriverDisconnect ( ) : bool
capDriverGetCaps ( CAPDRIVERCAPS &s ) : bool
capDriverGetName ( StringBuilder szName, int wSize ) : bool
capDriverGetVersion ( StringBuilder szVer, int wSize ) : bool
capEditCopy ( ) : bool
capFileAlloc ( Int32 dwSize ) : bool
capFileGetCaptureFile ( StringBuilder szName, int wSize ) : bool
capFileSaveAs ( string szName ) : bool
capFileSaveDIB ( string szName ) : bool
capFileSetCaptureFile ( string szName ) : bool
capFileSetInfoChunk ( CAPINFOCHUNK &infoChunk ) : bool
capGetAudioFormat ( WAVEFORMATEX &s, int wSize ) : int
capGetAudioFormatSize ( ) : int
capGetUserData ( ) : bool
capSetAudioFormat ( WAVEFORMATEX &s, int wSize ) : bool
capSetUserData ( int lUser ) : bool

Protected Methods

Method Description
VfwCaptureDevice ( int index, int width, int height, int fps, int windowStyle, IntPtr parentWindow ) : System
capCaptureAbort ( ) : bool
capCaptureGetSetup ( CAPTUREPARMS &s ) : bool
capCaptureSetSetup ( CAPTUREPARMS &s ) : bool
capCaptureSingleFrame ( ) : bool
capCaptureSingleFrameClose ( ) : bool
capCaptureSingleFrameOpen ( ) : bool
capCaptureStop ( ) : bool
capDlgVideoCompression ( ) : bool
capGetMCIDeviceName ( StringBuilder szName, int wSize ) : bool
capGetStatus ( CAPSTATUS &s ) : bool
capGetVideoFormat ( BITMAPINFO &s ) : int

Retrieves a copy of the video format information.

capGetVideoFormatSize ( ) : int

Retrieve the size needed to hold the data structure representing the video format information.

capGrabFrame ( ) : bool

Grab a single frame from the device. Overlay and preview are stopped if they are currently active.

capGrabFrameNoStop ( ) : bool

Grab a single from from the device. Overlay and Preview are not stopped.

capOverlay ( bool f ) : bool
capPaletteAuto ( int iFrames, int &iColors ) : bool
capPaletteManual ( int fGrab, int iColors ) : bool
capPaletteOpen ( string szName ) : bool
capPalettePaste ( ) : bool
capPaletteSave ( string szName ) : bool
capPreview ( bool f ) : bool
capPreviewRate ( int wMS ) : bool
capPreviewScale ( bool f ) : bool
capSetMCIDeviceName ( string szName ) : bool
capSetScrollPos ( POINT &lpP ) : bool
capSetVideoFormat ( BITMAPINFO &s ) : bool

Private Methods

Method Description
SendCallbackMessage ( [ hWnd, int wMsg, uint wParam, VfwVideoFrameDelegate lParam ) : int
SendCallbackMessage ( [ hWnd, int wMsg, uint wParam, VfwcapControlCallback lParam ) : int
SendCallbackMessage ( [ hWnd, int wMsg, uint wParam, VfwcapErrorCallback lParam ) : int
SendCallbackMessage ( [ hWnd, int wMsg, uint wParam, VfwcapStatusCallback lParam ) : int
SendMessageW ( [ hWnd, int Msg, uint wParam, BITMAPINFO &caps ) : int
SendMessageW ( [ hWnd, int Msg, uint wParam, CAPDRIVERCAPS &caps ) : int
SendMessageW ( [ hWnd, int Msg, uint wParam, CAPINFOCHUNK &infoChunk ) : int
SendMessageW ( [ hWnd, int Msg, uint wParam, CAPSTATUS &waveFormat ) : int
SendMessageW ( [ hWnd, int Msg, uint wParam, CAPTUREPARMS &waveFormat ) : int
SendMessageW ( [ hWnd, int Msg, uint wParam, POINT &waveFormat ) : int
SendMessageW ( [ hWnd, int Msg, uint wParam, WAVEFORMATEX &waveFormat ) : int
SendMessageW ( [ hWnd, int Msg, uint wParam, [ lpString ) : int

Method Details

ConfigureCapture() public method

public ConfigureCapture ( ) : void
return void

Connect() public method

public Connect ( ) : bool
return bool

CreateWindow() public method

public CreateWindow ( int x, int y, int width, int height, int style, IntPtr parentID ) : void
x int
y int
width int
height int
style int
parentID System.IntPtr
return void

Disconnect() public method

public Disconnect ( ) : void
return void

OnConnected() public method

public OnConnected ( ) : void
return void

OnDisconnecting() public method

public OnDisconnecting ( ) : void
return void

SendMessage() public method

public SendMessage ( int msg, uint wParam, int lParam ) : int
msg int
wParam uint
lParam int
return int

SendSimpleMessage() public method

public SendSimpleMessage ( int msg ) : int
msg int
return int

SetCallbackOnCapControl() public method

public SetCallbackOnCapControl ( VfwcapControlCallback fpProc ) : bool
fpProc VfwcapControlCallback
return bool

SetCallbackOnError() public method

public SetCallbackOnError ( VfwcapErrorCallback fpProc ) : bool
fpProc VfwcapErrorCallback
return bool

SetCallbackOnFrame() public method

public SetCallbackOnFrame ( VfwVideoFrameDelegate fpProc ) : bool
fpProc VfwVideoFrameDelegate
return bool

SetCallbackOnStatus() public method

public SetCallbackOnStatus ( VfwcapStatusCallback fpProc ) : bool
fpProc VfwcapStatusCallback
return bool

SetCallbackOnVideoStream() public method

public SetCallbackOnVideoStream ( VfwVideoFrameDelegate fpProc ) : bool
fpProc VfwVideoFrameDelegate
return bool

SetFramesPerSecond() public method

public SetFramesPerSecond ( int fps ) : void
fps int
return void

VfwCaptureDevice() protected method

protected VfwCaptureDevice ( 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

capCaptureAbort() protected method

protected capCaptureAbort ( ) : bool
return bool

capCaptureGetSetup() protected method

protected capCaptureGetSetup ( CAPTUREPARMS &s ) : bool
s TOAPI.AviCap32.CAPTUREPARMS
return bool

capCaptureSequence() public method

public capCaptureSequence ( ) : bool
return bool

capCaptureSequenceNoFile() public method

public capCaptureSequenceNoFile ( ) : bool
return bool

capCaptureSetSetup() protected method

protected capCaptureSetSetup ( CAPTUREPARMS &s ) : bool
s TOAPI.AviCap32.CAPTUREPARMS
return bool

capCaptureSingleFrame() protected method

protected capCaptureSingleFrame ( ) : bool
return bool

capCaptureSingleFrameClose() protected method

protected capCaptureSingleFrameClose ( ) : bool
return bool

capCaptureSingleFrameOpen() protected method

protected capCaptureSingleFrameOpen ( ) : bool
return bool

capCaptureStop() protected method

protected capCaptureStop ( ) : bool
return bool

capDlgVideoCompression() protected method

protected capDlgVideoCompression ( ) : bool
return bool

capDlgVideoDisplay() public method

public capDlgVideoDisplay ( ) : bool
return bool

capDlgVideoFormat() public method

public capDlgVideoFormat ( ) : bool
return bool

capDlgVideoSource() public method

public capDlgVideoSource ( ) : bool
return bool

capDriverConnect() public method

public capDriverConnect ( ) : bool
return bool

capDriverDisconnect() public method

public capDriverDisconnect ( ) : bool
return bool

capDriverGetCaps() public method

public capDriverGetCaps ( CAPDRIVERCAPS &s ) : bool
s TOAPI.AviCap32.CAPDRIVERCAPS
return bool

capDriverGetName() public method

public capDriverGetName ( StringBuilder szName, int wSize ) : bool
szName StringBuilder
wSize int
return bool

capDriverGetVersion() public method

public capDriverGetVersion ( StringBuilder szVer, int wSize ) : bool
szVer StringBuilder
wSize int
return bool

capEditCopy() public method

public capEditCopy ( ) : bool
return bool

capFileAlloc() public method

public capFileAlloc ( Int32 dwSize ) : bool
dwSize System.Int32
return bool

capFileGetCaptureFile() public method

public capFileGetCaptureFile ( StringBuilder szName, int wSize ) : bool
szName StringBuilder
wSize int
return bool

capFileSaveAs() public method

public capFileSaveAs ( string szName ) : bool
szName string
return bool

capFileSaveDIB() public method

public capFileSaveDIB ( string szName ) : bool
szName string
return bool

capFileSetCaptureFile() public method

public capFileSetCaptureFile ( string szName ) : bool
szName string
return bool

capFileSetInfoChunk() public method

public capFileSetInfoChunk ( CAPINFOCHUNK &infoChunk ) : bool
infoChunk TOAPI.AviCap32.CAPINFOCHUNK
return bool

capGetAudioFormat() public method

public capGetAudioFormat ( WAVEFORMATEX &s, int wSize ) : int
s TOAPI.Types.WAVEFORMATEX
wSize int
return int

capGetAudioFormatSize() public method

public capGetAudioFormatSize ( ) : int
return int

capGetMCIDeviceName() protected method

protected capGetMCIDeviceName ( StringBuilder szName, int wSize ) : bool
szName StringBuilder
wSize int
return bool

capGetStatus() protected method

protected capGetStatus ( CAPSTATUS &s ) : bool
s TOAPI.AviCap32.CAPSTATUS
return bool

capGetUserData() public method

public capGetUserData ( ) : bool
return bool

capGetVideoFormat() protected method

Retrieves a copy of the video format information.
protected capGetVideoFormat ( BITMAPINFO &s ) : int
s TOAPI.Types.BITMAPINFO
return int

capGetVideoFormatSize() protected method

Retrieve the size needed to hold the data structure representing the video format information.
protected capGetVideoFormatSize ( ) : int
return int

capGrabFrame() protected method

Grab a single frame from the device. Overlay and preview are stopped if they are currently active.
protected capGrabFrame ( ) : bool
return bool

capGrabFrameNoStop() protected method

Grab a single from from the device. Overlay and Preview are not stopped.
protected capGrabFrameNoStop ( ) : bool
return bool

capOverlay() protected method

protected capOverlay ( bool f ) : bool
f bool
return bool

capPaletteAuto() protected method

protected capPaletteAuto ( int iFrames, int &iColors ) : bool
iFrames int
iColors int
return bool

capPaletteManual() protected method

protected capPaletteManual ( int fGrab, int iColors ) : bool
fGrab int
iColors int
return bool

capPaletteOpen() protected method

protected capPaletteOpen ( string szName ) : bool
szName string
return bool

capPalettePaste() protected method

protected capPalettePaste ( ) : bool
return bool

capPaletteSave() protected method

protected capPaletteSave ( string szName ) : bool
szName string
return bool

capPreview() protected method

protected capPreview ( bool f ) : bool
f bool
return bool

capPreviewRate() protected method

protected capPreviewRate ( int wMS ) : bool
wMS int
return bool

capPreviewScale() protected method

protected capPreviewScale ( bool f ) : bool
f bool
return bool

capSetAudioFormat() public method

public capSetAudioFormat ( WAVEFORMATEX &s, int wSize ) : bool
s TOAPI.Types.WAVEFORMATEX
wSize int
return bool

capSetMCIDeviceName() protected method

protected capSetMCIDeviceName ( string szName ) : bool
szName string
return bool

capSetScrollPos() protected method

protected capSetScrollPos ( POINT &lpP ) : bool
lpP POINT
return bool

capSetUserData() public method

public capSetUserData ( int lUser ) : bool
lUser int
return bool

capSetVideoFormat() protected method

protected capSetVideoFormat ( BITMAPINFO &s ) : bool
s TOAPI.Types.BITMAPINFO
return bool

Property Details

fWindowHandle protected property

protected IntPtr,System fWindowHandle
return System.IntPtr