avicap.h
来自「用于查询PC机上的USB端口是否有设备挂接上」· C头文件 代码 · 共 602 行 · 第 1/3 页
H
602 行
BOOL fStepMCIDevice; // Step MCI device?
DWORD dwMCIStartTime; // Time to start in MS
DWORD dwMCIStopTime; // Time to stop in MS
BOOL fStepCaptureAt2x; // Perform spatial averaging 2x
UINT wStepCaptureAverageFrames; // Temporal average n Frames
DWORD dwAudioBufferSize; // Size of audio bufs (0 = default)
BOOL fDisableWriteCache; // Attempt to disable write cache
UINT AVStreamMaster; // Which stream controls length?
} CAPTUREPARMS, *PCAPTUREPARMS, FAR *LPCAPTUREPARMS;
// ------------------------------------------------------------------
// AVStreamMaster
// Since Audio and Video streams generally use non-synchronized capture
// clocks, this flag determines whether the audio stream is to be considered
// the master or controlling clock when writing the AVI file:
//
// AVSTREAMMASTER_AUDIO - Audio is master, video frame duration is forced
// to match audio duration (VFW 1.0, 1.1 default)
// AVSTREAMMASTER_NONE - No master, audio and video streams may be of
// different lengths
// ------------------------------------------------------------------
#define AVSTREAMMASTER_AUDIO 0 /* Audio master (VFW 1.0, 1.1) */
#define AVSTREAMMASTER_NONE 1 /* No master */
typedef struct tagCapInfoChunk {
FOURCC fccInfoID; // Chunk ID, "ICOP" for copyright
LPVOID lpData; // pointer to data
LONG cbData; // size of lpData
} CAPINFOCHUNK, *PCAPINFOCHUNK, FAR *LPCAPINFOCHUNK;
// ------------------------------------------------------------------
// Callback Definitions
// ------------------------------------------------------------------
typedef LRESULT (CALLBACK* CAPYIELDCALLBACK) (HWND hWnd);
// end_vfw32
#ifdef _WIN32
// begin_vfw32
typedef LRESULT (CALLBACK* CAPSTATUSCALLBACKW) (HWND hWnd, int nID, LPCWSTR lpsz);
typedef LRESULT (CALLBACK* CAPERRORCALLBACKW) (HWND hWnd, int nID, LPCWSTR lpsz);
typedef LRESULT (CALLBACK* CAPSTATUSCALLBACKA) (HWND hWnd, int nID, LPCSTR lpsz);
typedef LRESULT (CALLBACK* CAPERRORCALLBACKA) (HWND hWnd, int nID, LPCSTR lpsz);
#ifdef UNICODE
#define CAPSTATUSCALLBACK CAPSTATUSCALLBACKW
#define CAPERRORCALLBACK CAPERRORCALLBACKW
#else
#define CAPSTATUSCALLBACK CAPSTATUSCALLBACKA
#define CAPERRORCALLBACK CAPERRORCALLBACKA
#endif
// end_vfw32
#else
typedef LRESULT (CALLBACK* CAPSTATUSCALLBACK) (HWND hWnd, int nID, LPCSTR lpsz);
typedef LRESULT (CALLBACK* CAPERRORCALLBACK) (HWND hWnd, int nID, LPCSTR lpsz);
#endif
// begin_vfw32
typedef LRESULT (CALLBACK* CAPVIDEOCALLBACK) (HWND hWnd, LPVIDEOHDR lpVHdr);
typedef LRESULT (CALLBACK* CAPWAVECALLBACK) (HWND hWnd, LPWAVEHDR lpWHdr);
typedef LRESULT (CALLBACK* CAPCONTROLCALLBACK)(HWND hWnd, int nState);
// ------------------------------------------------------------------
// CapControlCallback states
// ------------------------------------------------------------------
#define CONTROLCALLBACK_PREROLL 1 /* Waiting to start capture */
#define CONTROLCALLBACK_CAPTURING 2 /* Now capturing */
// ------------------------------------------------------------------
// The only exported functions from AVICAP.DLL
// ------------------------------------------------------------------
// end_vfw32
#ifdef _WIN32
// begin_vfw32
HWND VFWAPI capCreateCaptureWindowA (
LPCSTR lpszWindowName,
DWORD dwStyle,
int x, int y, int nWidth, int nHeight,
HWND hwndParent, int nID);
BOOL VFWAPI capGetDriverDescriptionA (UINT wDriverIndex,
LPSTR lpszName, int cbName,
LPSTR lpszVer, int cbVer);
HWND VFWAPI capCreateCaptureWindowW (
LPCWSTR lpszWindowName,
DWORD dwStyle,
int x, int y, int nWidth, int nHeight,
HWND hwndParent, int nID);
BOOL VFWAPI capGetDriverDescriptionW (UINT wDriverIndex,
LPWSTR lpszName, int cbName,
LPWSTR lpszVer, int cbVer);
#ifdef UNICODE
#define capCreateCaptureWindow capCreateCaptureWindowW
#define capGetDriverDescription capGetDriverDescriptionW
#else
#define capCreateCaptureWindow capCreateCaptureWindowA
#define capGetDriverDescription capGetDriverDescriptionA
#endif
// end_vfw32
#else //_WIN32... what follows is 16 bit stuff
HWND VFWAPI capCreateCaptureWindow (
LPCSTR lpszWindowName,
DWORD dwStyle,
int x, int y, int nWidth, int nHeight,
HWND hwndParent, int nID);
BOOL VFWAPI capGetDriverDescription (WORD wDriverIndex,
LPSTR lpszName, int cbName,
LPSTR lpszVer, int cbVer);
#endif
// begin_vfw32
#endif /* RC_INVOKED */
// ------------------------------------------------------------------
// New Information chunk IDs
// ------------------------------------------------------------------
#define infotypeDIGITIZATION_TIME mmioFOURCC ('I','D','I','T')
#define infotypeSMPTE_TIME mmioFOURCC ('I','S','M','P')
// ------------------------------------------------------------------
// String IDs from status and error callbacks
// ------------------------------------------------------------------
#define IDS_CAP_BEGIN 300 /* "Capture Start" */
#define IDS_CAP_END 301 /* "Capture End" */
#define IDS_CAP_INFO 401 /* "%s" */
#define IDS_CAP_OUTOFMEM 402 /* "Out of memory" */
#define IDS_CAP_FILEEXISTS 403 /* "File '%s' exists -- overwrite it?" */
#define IDS_CAP_ERRORPALOPEN 404 /* "Error opening palette '%s'" */
#define IDS_CAP_ERRORPALSAVE 405 /* "Error saving palette '%s'" */
#define IDS_CAP_ERRORDIBSAVE 406 /* "Error saving frame '%s'" */
#define IDS_CAP_DEFAVIEXT 407 /* "avi" */
#define IDS_CAP_DEFPALEXT 408 /* "pal" */
#define IDS_CAP_CANTOPEN 409 /* "Cannot open '%s'" */
#define IDS_CAP_SEQ_MSGSTART 410 /* "Select OK to start capture\nof video sequence\nto %s." */
#define IDS_CAP_SEQ_MSGSTOP 411 /* "Hit ESCAPE or click to end capture" */
#define IDS_CAP_VIDEDITERR 412 /* "An error occurred while trying to run VidEdit." */
#define IDS_CAP_READONLYFILE 413 /* "The file '%s' is a read-only file." */
#define IDS_CAP_WRITEERROR 414 /* "Unable to write to file '%s'.\nDisk may be full." */
#define IDS_CAP_NODISKSPACE 415 /* "There is no space to create a capture file on the specified device." */
#define IDS_CAP_SETFILESIZE 416 /* "Set File Size" */
#define IDS_CAP_SAVEASPERCENT 417 /* "SaveAs: %2ld%% Hit Escape to abort." */
#define IDS_CAP_DRIVER_ERROR 418 /* Driver specific error message */
#define IDS_CAP_WAVE_OPEN_ERROR 419 /* "Error: Cannot open the wave input device.\nCheck sample size, frequency, and channels." */
#define IDS_CAP_WAVE_ALLOC_ERROR 420 /* "Error: Out of memory for wave buffers." */
#define IDS_CAP_WAVE_PREPARE_ERROR 421 /* "Error: Cannot prepare wave buffers." */
#define IDS_CAP_WAVE_ADD_ERROR 422 /* "Error: Cannot add wave buffers." */
#define IDS_CAP_WAVE_SIZE_ERROR 423 /* "Error: Bad wave size." */
#define IDS_CAP_VIDEO_OPEN_ERROR 424 /* "Error: Cannot open the video input device." */
#define IDS_CAP_VIDEO_ALLOC_ERROR 425 /* "Error: Out of memory for video buffers." */
#define IDS_CAP_VIDEO_PREPARE_ERROR 426 /* "Error: Cannot prepare video buffers." */
#define IDS_CAP_VIDEO_ADD_ERROR 427 /* "Error: Cannot add video buffers." */
#define IDS_CAP_VIDEO_SIZE_ERROR 428 /* "Error: Bad video size." */
#define IDS_CAP_FILE_OPEN_ERROR 429 /* "Error: Cannot open capture file." */
#define IDS_CAP_FILE_WRITE_ERROR 430 /* "Error: Cannot write to capture file. Disk may be full." */
#define IDS_CAP_RECORDING_ERROR 431 /* "Error: Cannot write to capture file. Data rate too high or disk full." */
#define IDS_CAP_RECORDING_ERROR2 432 /* "Error while recording" */
#define IDS_CAP_AVI_INIT_ERROR 433 /* "Error: Unable to initialize for capture." */
#define IDS_CAP_NO_FRAME_CAP_ERROR 434 /* "Warning: No frames captured.\nConfirm that vertical sync interrupts\nare configured and enabled." */
#define IDS_CAP_NO_PALETTE_WARN 435 /* "Warning: Using default palette." */
#define IDS_CAP_MCI_CONTROL_ERROR 436 /* "Error: Unable to access MCI device." */
#define IDS_CAP_MCI_CANT_STEP_ERROR 437 /* "Error: Unable to step MCI device." */
#define IDS_CAP_NO_AUDIO_CAP_ERROR 438 /* "Error: No audio data captured.\nCheck audio card settings." */
#define IDS_CAP_AVI_DRAWDIB_ERROR 439 /* "Error: Unable to draw this data format." */
#define IDS_CAP_COMPRESSOR_ERROR 440 /* "Error: Unable to initialize compressor." */
#define IDS_CAP_AUDIO_DROP_ERROR 441 /* "Error: Audio data was lost during capture, reduce capture rate." */
/* status string IDs */
#define IDS_CAP_STAT_LIVE_MODE 500 /* "Live window" */
#define IDS_CAP_STAT_OVERLAY_MODE 501 /* "Overlay window" */
#define IDS_CAP_STAT_CAP_INIT 502 /* "Setting up for capture - Please wait" */
#define IDS_CAP_STAT_CAP_FINI 503 /* "Finished capture, now writing frame %ld" */
#define IDS_CAP_STAT_PALETTE_BUILD 504 /* "Building palette map" */
#define IDS_CAP_STAT_OPTPAL_BUILD 505 /* "Computing optimal palette" */
#define IDS_CAP_STAT_I_FRAMES 506 /* "%d frames" */
#define IDS_CAP_STAT_L_FRAMES 507 /* "%ld frames" */
#define IDS_CAP_STAT_CAP_L_FRAMES 508 /* "Captured %ld frames" */
#define IDS_CAP_STAT_CAP_AUDIO 509 /* "Capturing audio" */
#define IDS_CAP_STAT_VIDEOCURRENT 510 /* "Captured %ld frames (%ld dropped) %d.%03d sec." */
#define IDS_CAP_STAT_VIDEOAUDIO 511 /* "Captured %d.%03d sec. %ld frames (%ld dropped) (%d.%03d fps). %ld audio bytes (%d,%03d sps)" */
#define IDS_CAP_STAT_VIDEOONLY 512 /* "Captured %d.%03d sec. %ld frames (%ld dropped) (%d.%03d fps)" */
#define IDS_CAP_STAT_FRAMESDROPPED 513 /* "Dropped %ld of %ld frames (%d.%02d%%) during capture." */
// end_vfw32
#ifndef RC_INVOKED
#pragma pack() /* Revert to default packing */
#endif /* RC_INVOKED */
#ifdef __cplusplus
} /* End of extern "C" { */
#endif /* __cplusplus */
#endif /* INC_AVICAP */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?