Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

vetDirectXInput2 Class Reference

#include <vetDirectXInput2.h>

Inheritance diagram for vetDirectXInput2:

vetInput

Public Types

enum  FORMAT_CSP

Public Member Functions

 vetDirectXInput2 (int device=-1)
 ~vetDirectXInput2 ()
 Default destructor, release objects and buffers and destroy the imVideoCapture object.
void Close (void)
bool EoF ()
 Get the state of current data source.
int reset ()
 Reset the module.
const char * getDeviceDescription (int device)
 Returns the device description. Returns NULL in the last device.
void enumerateDevices (void)
int getDeviceVideoCount (void)
 Return current device count, call enumerateDevices(void) first.
int getDeviceAudioCount (void)
 Return current device count, call enumerateDevices(void) first.
const char * getDeviceVideoDescription (int device)
 Returns the device description. Returns NULL in the last device.
const char * getDeviceAudioDescription (int device)
 Returns the device description. Returns NULL in the last device.
int getCurrentDeviceVideo ()
 Get current device id.
int getCurrentDeviceAudio ()
 Get current device id.
int getVideoFriendlyName (char *buffer)
int getAudioFriendlyName (char *buffer)
int setCurrentDevices (int szVideo, int szAudio)
int StartPreview ()
int StopPreview ()
int StartCapture ()
int StopCapture ()
void setPreviewEnabled (bool value=true)
int showPreviewWindow (bool show=true)
int setPreviewWindow (void *HWND_Owner)
void doUpdatePreviewWindow ()
void setAutoUpdatePreviewWindowEnabled (bool enable=true)
int AllocCaptureFile (unsigned short fileSize_mb=10)
int setFrameRate (double rate=0.0)
int setCaptureFile (char *pszName)
int setFrameRateControlEnabled (bool enable=true)
int setCaptureAudioEnabled (bool enable=true)
int setMPEG2Encode (bool enable=true)
void setErrorMessagesEnabled (bool enable=true)
int showCaptureVideoForWindowPropertyPage ()
int showCaptureVideoFilterPropertyPage ()
int showCaptureAudioFilterPropertyPage ()
int showGraphFilterPropertyPage ()
int showVideoRendererPropertyPage ()
int showSampleGrabberPropertyPage ()
unsigned long getVideoBitRate ()
unsigned long getAudioBitRate ()
int setFrameGrabbingEnabled (bool enable=true)
bool isFrameGrabbingEnabled ()
FORMAT_CSP getCurrentFormat ()
int getCurrentFormatDescription (char *buffer)
bool isPreviewing ()
bool isCapturing ()
bool isPreviewFaked ()
bool isAutoUpdatePreviewWindowEnabled ()
bool isCapturingAudio ()
void UpdateStatus (bool fAllStats=false)
bool isUncompressed ()
bool isMPEG2Encoded ()
double getFrameRate ()
double getFrameRateCurrent ()
long getCapturedElapsedTime ()
unsigned short getFileSize (bool forceUpdate=false)
long getDroppedFramesCount (bool forceUpdate=false)
long getCapturedFramesCount (bool forceUpdate=false)
long getAverageFrameSize (bool forceUpdate=false)
long getCapturedDataRate (bool forceUpdate=false)
double getCapturedFrameRate (bool forceUpdate=false)
unsigned int getWidth () const
 Get current canvas' width.
unsigned int getHeight () const
 Get current canvas' height.
long getFreeSpaceLeft ()
int extractTo (vetFrameRGB24 &img)
 Grab a frame and copy to VETLib standard format.
int extractTo (vetFrameYUV420 &img)
 Grab a frame and copy to VETLib standard format.
int extractTo (vetFrameT< unsigned char > &img)
 Grab a frame and copy to VETLib standard format.

Protected Member Functions

int InitCapFilters (void)
void FreeCapFilters (void)
void TearDownGraph (void)
int BuildCaptureGraph (void)
int BuildPreviewGraph (void)
int BuildGrabberGraph (bool mpeg2=false)
int MakeBuilder (void)
int MakeGraph (void)
void RegisterDevicesNotification (void)
int RemoveGraphFromRot (DWORD pdwRegister)

Protected Attributes

vetDXCapture2cCap
DWORD g_dwGraphRegister
unsigned int width
unsigned int height
char deviceVideoDesc [VETDX_MAXDEVICES][160]
 DirectX compatible devices' description.
char deviceAudioDesc [VETDX_MAXDEVICES][160]
 DirectX compatible devices' description.

Detailed Description

VETLib Framework 1.0.2 Copyright (C) Alessandro Polo 2006 http://www.ewgate.net/vetlib

Definition at line 59 of file vetDirectXInput2.h.


Member Function Documentation

int vetDirectXInput2::BuildCaptureGraph void   )  [protected]
 

cCap->pME->SetNotifyWindow((OAHWND)cCap->ghwndApp, WM_FGNOTIFY, 0);

Definition at line 3097 of file vetDirectXInput2.cpp.

References cCap, vetDXCapture2::displayErrorMessages, vetDXCapture2::fCapAudio, vetDXCapture2::fCapCC, vetDXCapture2::fCaptureGraphBuilt, vetDXCapture2::fCapturing, vetDXCapture2::fMPEG2, vetDXCapture2::fPreviewFaked, vetDXCapture2::fPreviewGraphBuilt, vetDXCapture2::fPreviewing, vetDXCapture2::FrameRate, vetDXCapture2::fUseFrameRate, vetDXCapture2::fWantPreview, g_dwGraphRegister, vetDXCapture2::ghwndApp, vetDXCapture2::iMasterStream, vetDXCapture2::pACap, vetDXCapture2::pBuilder, vetDXCapture2::pConfigAviMux, vetDXCapture2::pFg, vetDXCapture2::pME, vetDXCapture2::pRender, vetDXCapture2::pSink, vetDXCapture2::pVCap, vetDXCapture2::pVSC, vetDXCapture2::pVW, ISampleCaptureGraphBuilder::RenderStream, ISampleCaptureGraphBuilder::SetOutputFileName, vetDXCapture2::szCaptureFile, TearDownGraph(), VETRET_ILLEGAL_USE, VETRET_INTERNAL_ERR, and VETRET_OK.

Referenced by StartCapture().

bool vetDirectXInput2::EoF  )  [virtual]
 

Get the state of current data source.

Returns:
true is there are no more frames to load, false else.

Implements vetInput.

Definition at line 5355 of file vetDirectXInput2.cpp.

References cCap, vetDXCapture2::fCapturing, vetDXCapture2::fPreviewing, and vetDXCapture2::GrabbingEnabled.

int vetDirectXInput2::extractTo vetFrameT< unsigned char > &  img  )  [virtual]
 

Grab a frame and copy to VETLib standard format.

Parameters:
[out] img Greyscale VETLib Frame to store data.
Returns:
VETRET_OK if everything is fine, VETRET_INTERNAL_ERR if any device reading error occurs, VETRET_NOT_IMPLEMENTED if color format is not support.
Note:
Ouput operator (>>) call directly this function.
See also:
operator >> (vetFrameGrey&)

Implements vetInput.

Definition at line 5002 of file vetDirectXInput2.cpp.

References INFO, and VETRET_NOT_IMPLEMENTED.

int vetDirectXInput2::extractTo vetFrameYUV420 img  )  [virtual]
 

Grab a frame and copy to VETLib standard format.

Parameters:
[out] img VETLib Cache Frame to store data.
Returns:
VETRET_OK if everything is fine, VETRET_INTERNAL_ERR if any device reading error occurs, VETRET_NOT_IMPLEMENTED if color format is not support.
Note:
Ouput operator (>>) call directly this function.
See also:
operator >> (vetFrameCache&)

Implements vetInput.

Definition at line 4946 of file vetDirectXInput2.cpp.

References INFO, and VETRET_NOT_IMPLEMENTED.

int vetDirectXInput2::extractTo vetFrameRGB24 img  )  [virtual]
 

Grab a frame and copy to VETLib standard format.

Parameters:
[out] img VETLib Cache24 Frame to store data.
Returns:
VETRET_OK if everything is fine, VETRET_INTERNAL_ERR if any device reading error occurs, VETRET_NOT_IMPLEMENTED if color format is not support.
Note:
Ouput operator (>>) call directly this function.
See also:
operator >> (vetFrameCache24&)

Implements vetInput.

Definition at line 4966 of file vetDirectXInput2.cpp.

References SampleGrabberCB::buffer, SampleGrabberCB::bufferSize, cCap, vetFrameRGB24::data, SampleGrabberCB::event, SampleGrabberCB::frameWanted, height, vetFrame::height, INFO, vetDXCapture2::pCallbackGrabber, vetDXCapture2::pSampleGrabber, vetFrameRGB24::reAllocCanvas(), VETRET_INTERNAL_ERR, VETRET_OK, width, and vetFrame::width.

int vetDirectXInput2::getCurrentDeviceAudio  ) 
 

Get current device id.

Returns:
current device id, if disconnected return -1
See also:
enumerateDevices(void);

getDeviceCount(void);

Definition at line 4922 of file vetDirectXInput2.cpp.

References cCap, and vetDXCapture2::pmAudioIndex.

int vetDirectXInput2::getCurrentDeviceVideo  ) 
 

Get current device id.

Returns:
current device id, if disconnected return -1
See also:
enumerateDevices(void);

getDeviceCount(void);

Definition at line 4911 of file vetDirectXInput2.cpp.

References cCap, and vetDXCapture2::pmVideoIndex.

int vetDirectXInput2::getDeviceAudioCount void   ) 
 

Return current device count, call enumerateDevices(void) first.

See also:
enumerateDevices(void);

Definition at line 5560 of file vetDirectXInput2.cpp.

References cCap, and vetDXCapture2::iNumACapDevices.

const char * vetDirectXInput2::getDeviceAudioDescription int  device  ) 
 

Returns the device description. Returns NULL in the last device.

See also:
enumerateDevices(void);

getDeviceCount(void);

Definition at line 5538 of file vetDirectXInput2.cpp.

References cCap, deviceAudioDesc, enumerateDevices(), and vetDXCapture2::iNumACapDevices.

const char* vetDirectXInput2::getDeviceDescription int  device  ) 
 

Returns the device description. Returns NULL in the last device.

See also:
enumerateDevices(void);

getDeviceCount(void);

int vetDirectXInput2::getDeviceVideoCount void   ) 
 

Return current device count, call enumerateDevices(void) first.

See also:
enumerateDevices(void);

Definition at line 5556 of file vetDirectXInput2.cpp.

References cCap, and vetDXCapture2::iNumVCapDevices.

const char * vetDirectXInput2::getDeviceVideoDescription int  device  ) 
 

Returns the device description. Returns NULL in the last device.

See also:
enumerateDevices(void);

getDeviceCount(void);

Definition at line 5514 of file vetDirectXInput2.cpp.

References cCap, deviceVideoDesc, enumerateDevices(), and vetDXCapture2::iNumVCapDevices.

unsigned int vetDirectXInput2::getHeight  )  const [inline, virtual]
 

Get current canvas' height.

Returns:
height in pixel.

Implements vetInput.

Definition at line 317 of file vetDirectXInput2.h.

References height.

unsigned int vetDirectXInput2::getWidth  )  const [inline, virtual]
 

Get current canvas' width.

Returns:
width in pixel.

Implements vetInput.

Definition at line 310 of file vetDirectXInput2.h.

References width.

int vetDirectXInput2::reset  )  [inline, virtual]
 

Reset the module.

Returns:
VETRET_INTERNAL_ERR if any error occur, VETRET_OK else.

Implements vetInput.

Definition at line 143 of file vetDirectXInput2.h.


The documentation for this class was generated from the following files:
Generated on Tue Jan 24 11:59:30 2006 for VETLib by  doxygen 1.4.4