|
Public Member Functions |
| BOOL | ShowDialogBox (DWORD db) |
| | Displays the specified dialog box.
|
| BOOL | LoadDriverInfo () |
| | Loads information about drivers into m_cdi.
|
| BOOL | Connect (DWORD i) |
| | Connects to the specified device driver.
|
|
void | Destroy () |
| | Closes any open driver and releases all resources.
|
| BOOL | Create (LPCTSTR pTitle=NULL, HWND hwndParent=NULL, DWORD dwStyle=WS_VISIBLE|WS_OVERLAPPEDWINDOW, long x=10, long y=10, long width=320, long height=240, int nID=0) |
| | Creates a capture window.
|
|
| CCapture () |
| | Constructor.
|
|
virtual | ~CCapture () |
| | Destructor.
|
|
HWND | GetSafeHwnd () |
| | Returns the capture window handle.
|
|
BOOL | IsWnd () |
| | Returns non-zero if there is a valid capture window.
|
|
BOOL | IsConnected () |
| | Returns non-zero if there is an open capture device.
|
| BOOL | GetCurrentDriverInfo (LPCAPTUREDRIVERINFO pcdi) |
| | Retrieves information about the current capture device.
|
| BOOL | GetDriverInfo (DWORD i, LPCAPTUREDRIVERINFO pcdi) |
| | Retrieves information about the specified capture device.
|
|
DWORD | GetNumDrivers () |
| | Retuns the number of installed capture devices.
|
|
BOOL | GetStatus () |
| | Returns non-zero if a capture device is connected.
|
| BOOL | ShowVideoSourceDlg () |
| | Displays the video source dialog box.
|
| BOOL | ShowVideoFormatDlg () |
| | Displays the video format dialog box.
|
| BOOL | ShowVideoDisplayDlg () |
| | Displays the video display dialog box.
|
| BOOL | ShowVideoCompressionDlg () |
| | Displays the video compression dialog box.
|
| BOOL | Preview (BOOL en) |
| | Enables / disables preview mode.
|
| BOOL | SetPreviewRate (DWORD rate=30) |
| | Sets the frame rate for preview mode.
|
| BOOL | PreviewStretching (BOOL en) |
| | Enables / disables stretching of the preview video.
|
| BOOL | EnableOverlay (BOOL en) |
| | Enables / disables video overlay mode.
|
| BOOL | SetCaptureFileName (LPCTSTR pName) |
| | Sets the capture filename.
|
|
LPCTSTR | GetCaptureFileName () |
| | Returns the currently set capture filename.
|
| BOOL | GetCaptureFileName (LPSTR buf) |
| | Copies the currently set capture filename to the specified buffer.
|
| BOOL | FileAlloc (DWORD size) |
| | Pre allocates disk space for video capture.
|
| BOOL | CaptureToFile () |
| | Starts capture of data to file.
|
| BOOL | SaveAs (LPCTSTR pName) |
| | Copies the contents of the capture file to another.
|
|
BOOL | IsAudioFormatData () |
| | Returns non-zero if there is audio format data.
|
| BOOL | SetAudioFormat () |
| | Sets the audio format of the capture device.
|
| BOOL | GetCaptureSetup () |
| | Retrieves capture setup data to m_cp.
|
| BOOL | SetCaptureSetup () |
| | Sets capture setup data in m_cp to the device.
|
|
void | SetCaptureAudio (BOOL ca) |
| | Set audio capture flag in capture setup structure m_cp.
|
|
void | SetYield (BOOL yield) |
| | Sets yield bit in capture setup structure m_cp.
|
| BOOL | CaptureSingleFrameOpen () |
| | Opens the capture file for single frame capture.
|
| BOOL | CaptureSingleFrameClose () |
| | Closes the capture file for single frame capture.
|
| BOOL | CaptureSingleFrame () |
| | Appends a single frame of video to the capture file.
|
| BOOL | CaptureSequence () |
| | Starts streaming video capture to a file.
|
| BOOL | CaptureSequenceNoFile () |
| | Starts streaming video capture without writing to file.
|
| BOOL | CaptureStop () |
| | Stops current video capture.
|
| BOOL | CaptureAbort () |
| | Aborts the current capture.
|
| BOOL | CopyToClipboard () |
| | Copies the current video frame and palette to the clipboard.
|
| BOOL | SaveAsDIB (LPCTSTR pFile) |
| | Saves the current frame of video as a DIB file.
|
| BOOL | SetMCIDeviceName (LPCTSTR pName) |
| | Specifies the name of the MCI video device to use for capture.
|
| BOOL | GetMCIDeviceName (LPSTR pName) |
| | Returns the name of the current MCI device being used for capture.
|
| BOOL | SetUserData (long data) |
| | Associates a four byte value with the current capture window.
|
| long | GetUserData () |
| | Returns the associated four byte value with the current capture window.
|
| BOOL | GrabFrame () |
| | Grabs a single frame of video from the current video device.
|
| BOOL | GrabFrameNoStop () |
| | Grabs a single frame of video from the current video device without stopping the capture.
|
| BOOL | WaitGrab (DWORD timeout=3000) |
| | Waits for a grab operation to complete.
|
| BOOL | PaletteAuto (DWORD frames, DWORD colors) |
| | Requests the capture driver automatically create new palettes for video frames.
|
| BOOL | PaletteManual (BOOL grab, DWORD colors) |
| | Requests the capture driver manually sample video frames.
|
| BOOL | LoadPalette (LPCTSTR pFile) |
| | Loads a color palette from a file.
|
| BOOL | GetPaletteFromClipboard () |
| | Loads a color palette from the clipboard.
|
| BOOL | SavePalette (LPCTSTR pFile) |
| | Saves the color palette to a file.
|
| BOOL | SetScrollPos (long x, long y) |
| | Sets the offset of the upper left corner of the video capture window.
|
|
DWORD | GetNumStatusCallbacks () |
| | Returns the nnumber of status callbacks since start of capture.
|
|
DWORD | GetNumErrorCallbacks () |
| | Returns the number of error callbacks since start of capture.
|
|
DWORD | GetNumFrameCallbacks () |
| | Returns the number of frame callbacks since the start of capture.
|
|
BOOL | CallbacksEnabled () |
| | Returns non-zero if callbacks are enabled.
|
| BOOL | SetPos (long x, long y) |
| | Sets the offset of the capture window with respect to it's parent window.
|
| BOOL | SetSize (long x, long y) |
| | Sets the size of the capture window.
|
| BOOL | SetWindow (LPRECT pRect) |
| | Sets the size of the capture window.
|
| BOOL | ShowWindow (UINT uCmdShow=SW_SHOWNORMAL) |
| | Sets the capture windows show state.
|
| BOOL | LockDC () |
| | Locks the DC.
|
| void | UnlockDC () |
| | Unlocks the DC.
|
|
BOOL | IsInCallback () |
| | Returns non-zero if the capture thread is currently in a callback.
|
| BOOL | Reconnect () |
| | Attempts reconnect of current capture device.
|
|
DWORD | GetDriverIndex () |
| | Returns the index of the current capture device.
|
| BOOL | SetFrameMessageTarget (HDC hDC, LPRECT pRect, HWND hWnd, UINT uMsg) |
| | Sets the window handle and message id for video event callbacks.
|
| BOOL | SetCaptureWindowPos (HWND hwndAfter, int x, int y, int cx, int cy, UINT flags) |
| | Sets the Z-Order, position and size of the capture window.
|
| BOOL | HBitmapFromFrame (HBITMAP *phbmp, LPVIDEOHDR pvhdr) |
| | Converts the current frame to HBITMAP.
|
|
void | ReleaseVideoFormatData () |
| | Releases video format data.
|
|
void | ReleaseAudioFormatData () |
| | Releases audio format data.
|
| BOOL | GetAudioFormat (LPWAVEFORMATEX *ppwfx=NULL) |
| | Gets the audio format information.
|
|
void | Disconnect () |
| | Disconnects current capture device.
|
|
void | DisableCallbacks () |
| | Disables frame callbacks.
|
| BOOL | EnableCallbacks () |
| | Enables frame callbacks.
|
| BOOL | AddInfoChunk (FOURCC type, LPBYTE buf, DWORD size) |
| | Adds information chunk to AVI file at current position.
|
| BOOL | GetVideoFormat (LPBITMAPINFO *ppbmp=NULL, LPDWORD psize=NULL) |
| | Returns information about the current video format.
|
| BOOL | SetVideoFormat (LPBITMAPINFO pbmp, DWORD size) |
| | Sets the current video format.
|
Public Attributes |
|
CAPDRIVERCAPS | m_cdc |
| | Current driver capabilities.
|
|
CAPSTATUS | m_cs |
| | Current driver status ( call UpdateStatus() ).
|
|
CAPTUREPARMS | m_cp |
| | Capture params.
|
|
TThreadSafe< BOOL > | m_capturelock |
| | Video capture access lock.
|
|
TThreadSafe< BOOL > | m_dclock |
| | Video decode DC access lock.
|
Protected Member Functions |
|
virtual BOOL | OnStatus (int nID, LPCTSTR pStatus) |
| | Resolved video status callback.
|
|
virtual BOOL | OnError (int nID, LPCTSTR pStatus) |
| | Resolved video error callback.
|
| virtual BOOL | OnFrame (LPVIDEOHDR pVHdr) |
| | Resolved video frame callback.
|
Static Protected Member Functions |
|
static LRESULT PASCAL | StatusCallbackProc (HWND hWnd, int nID, LPSTR lpStatusText) |
| | Static function proxies video status callbacks.
|
|
static LRESULT PASCAL | ErrorCallbackProc (HWND hWnd, int nErrID, LPSTR lpErrorText) |
| | Static function proxies video error callbacks.
|
|
static LRESULT PASCAL | FrameCallbackProc (HWND hWnd, LPVIDEOHDR lpVHdr) |
| | Static function proxies video frame callbacks.
|
This class manages a single VFW capture device.