⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 u_avicap.pas

📁 一个简单的学籍管理软件
💻 PAS
📖 第 1 页 / 共 2 页
字号:

  IDS_CAP_FILE_OPEN_ERROR = 429; (* "Error: Cannot open capture file." *)
  IDS_CAP_FILE_WRITE_ERROR = 430; (* "Error: Cannot write to capture file.  Disk may be full." *)
  IDS_CAP_RECORDING_ERROR = 431; (* "Error: Cannot write to capture file.  Data rate too high or disk full." *)
  IDS_CAP_RECORDING_ERROR2 = 432; (* "Error while recording" *)
  IDS_CAP_AVI_INIT_ERROR = 433; (* "Error: Unable to initialize for capture." *)
  IDS_CAP_NO_FRAME_CAP_ERROR = 434; (* "Warning: No frames captured.\nConfirm that vertical sync interrupts\nare configured and enabled." *)
  IDS_CAP_NO_PALETTE_WARN = 435; (* "Warning: Using default palette." *)
  IDS_CAP_MCI_CONTROL_ERROR = 436; (* "Error: Unable to access MCI device." *)
  IDS_CAP_MCI_CANT_STEP_ERROR = 437; (* "Error: Unable to step MCI device." *)
  IDS_CAP_NO_AUDIO_CAP_ERROR = 438; (* "Error: No audio data captured.\nCheck audio card settings." *)
  IDS_CAP_AVI_DRAWDIB_ERROR = 439; (* "Error: Unable to draw this data format." *)
  IDS_CAP_COMPRESSOR_ERROR = 440; (* "Error: Unable to initialize compressor." *)
  IDS_CAP_AUDIO_DROP_ERROR = 441; (* "Error: Audio data was lost during capture, reduce capture rate." *)

  (* status string IDs *)
  IDS_CAP_STAT_LIVE_MODE = 500; (* "Live window" *)
  IDS_CAP_STAT_OVERLAY_MODE = 501; (* "Overlay window" *)
  IDS_CAP_STAT_CAP_INIT = 502; (* "Setting up for capture - Please wait" *)
  IDS_CAP_STAT_CAP_FINI = 503; (* "Finished capture, now writing frame %ld" *)
  IDS_CAP_STAT_PALETTE_BUILD = 504; (* "Building palette map" *)
  IDS_CAP_STAT_OPTPAL_BUILD = 505; (* "Computing optimal palette" *)
  IDS_CAP_STAT_I_FRAMES = 506; (* "%d frames" *)
  IDS_CAP_STAT_L_FRAMES = 507; (* "%ld frames" *)
  IDS_CAP_STAT_CAP_L_FRAMES = 508; (* "Captured %ld frames" *)
  IDS_CAP_STAT_CAP_AUDIO = 509; (* "Capturing audio" *)
  IDS_CAP_STAT_VIDEOCURRENT = 510; (* "Captured %ld frames (%ld dropped) %d.%03d sec." *)
  IDS_CAP_STAT_VIDEOAUDIO = 511; (* "Captured %d.%03d sec.  %ld frames (%ld dropped) (%d.%03d fps).  %ld audio bytes (%d,%03d sps)" *)
  IDS_CAP_STAT_VIDEOONLY = 512; (* "Captured %d.%03d sec.  %ld frames (%ld dropped) (%d.%03d fps)" *)
  IDS_CAP_STAT_FRAMESDROPPED = 513; (* "Dropped %ld of %ld frames (%d.%02d%%) during capture." *)

const
  AVICAP32 = 'AVICAP32.dll';

implementation

(* Externals from AVICAP.DLL *)
//function capGetDriverDescription; external AVICAP32 name 'capGetDriverDescriptionA';
//function capCreateCaptureWindow;  external AVICAP32 name 'capCreateCaptureWindowA';

(* Message crackers for above *)

function capSetCallbackOnError(hwnd: THandle; fpProc: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_CALLBACK_ERROR, 0, fpProc);
end;

function capSetCallbackOnStatus(hwnd: THandle; fpProc: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_CALLBACK_STATUS, 0, fpProc);
end;

function capSetCallbackOnYield(hwnd: THandle; fpProc: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_CALLBACK_YIELD, 0, fpProc);
end;

function capSetCallbackOnFrame(hwnd: THandle; fpProc: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_CALLBACK_FRAME, 0, fpProc);
end;

function capSetCallbackOnVideoStream(hwnd: THandle; fpProc: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, fpProc);
end;

function capSetCallbackOnWaveStream(hwnd: THandle; fpProc: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_CALLBACK_WAVESTREAM, 0, fpProc);
end;

function capSetCallbackOnCapControl(hwnd: THandle; fpProc: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_CALLBACK_CAPCONTROL, 0, fpProc);
end;

function capSetUserData(hwnd: THandle; lUser: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_USER_DATA, 0, lUser);
end;

function capGetUserData(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_GET_USER_DATA, 0, 0);
end;

function capDriverConnect(hwnd: THandle; I: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_DRIVER_CONNECT, I, 0);
end;

function capDriverDisconnect(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_DRIVER_DISCONNECT, 0, 0);
end;

function capDriverGetName(hwnd: THandle; szName: LongInt; wSize: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_DRIVER_GET_NAME, wSize, szName);
end;

function capDriverGetVersion(hwnd: THandle; szVer: LongInt; wSize: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_DRIVER_GET_VERSION, wSize, szVer);
end;

function capDriverGetCaps(hwnd: THandle; s: LongInt; wSize: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_DRIVER_GET_CAPS, wSize, s);
end;

function capFileSetCaptureFile(hwnd: THandle; szName: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_FILE_SET_CAPTURE_FILE, 0, szName);
end;

function capFileGetCaptureFile(hwnd: THandle; szName: LongInt; wSize: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_FILE_GET_CAPTURE_FILE, wSize, szName);
end;

function capFileAlloc(hwnd: THandle; dwSize: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_FILE_ALLOCATE, 0, dwSize);
end;

function capFileSaveAs(hwnd: THandle; szName: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_FILE_SAVEAS, 0, szName);
end;

function capFileSetInfoChunk(hwnd: THandle; lpInfoChunk: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_FILE_SET_INFOCHUNK, 0, lpInfoChunk);
end;

function capFileSaveDIB(hwnd: THandle; szName: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_FILE_SAVEDIB, 0, szName);
end;

function capEditCopy(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_EDIT_COPY, 0, 0);
end;

function capSetAudioFormat(hwnd: THandle; s: LongInt; wSize: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_AUDIOFORMAT, wSize, s);
end;

function capGetAudioFormat(hwnd: THandle; s: LongInt; wSize: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_GET_AUDIOFORMAT, wSize, s);
end;

function capGetAudioFormatSize(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_GET_AUDIOFORMAT, 0, 0);
end;

function capDlgVideoFormat(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_DLG_VIDEOFORMAT, 0, 0);
end;

function capDlgVideoSource(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_DLG_VIDEOSOURCE, 0, 0);
end;

function capDlgVideoDisplay(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_DLG_VIDEODISPLAY, 0, 0);
end;

function capDlgVideoCompression(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_DLG_VIDEOCOMPRESSION, 0, 0);
end;

function capGetVideoFormat(hwnd: THandle; s: LongInt; wSize: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_GET_VIDEOFORMAT, wSize, s);
end;

function capGetVideoFormatSize(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_GET_VIDEOFORMAT, 0, 0);
end;

function capSetVideoFormat(hwnd: THandle; s: LongInt; wSize: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_VIDEOFORMAT, wSize, s);
end;

function capPreview(hwnd: THandle; f: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_PREVIEW, f, 0);
end;

function capPreviewRate(hwnd: THandle; wMS: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_PREVIEWRATE, wMS, 0);
end;

function capOverlay(hwnd: THandle; f: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_OVERLAY, f, 0);
end;

function capPreviewScale(hwnd: THandle; f: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_SCALE, f, 0);
end;

function capGetStatus(hwnd: THandle; s: LongInt; wSize: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_GET_STATUS, wSize, s);
end;

function capSetScrollPos(hwnd: THandle; lpP: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_SCROLL, 0, lpP);
end;

function capGrabFrame(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_GRAB_FRAME, 0, 0);
end;

function capGrabFrameNoStop(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_GRAB_FRAME_NOSTOP, 0, 0);
end;

function capCaptureSequence(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SEQUENCE, 0, 0);
end;

function capCaptureSequenceNoFile(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SEQUENCE_NOFILE, 0, 0);
end;

function capCaptureStop(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_STOP, 0, 0);
end;

function capCaptureAbort(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_ABORT, 0, 0);
end;

function capCaptureSingleFrameOpen(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SINGLE_FRAME_OPEN, 0, 0);
end;

function capCaptureSingleFrameClose(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SINGLE_FRAME_CLOSE, 0, 0);
end;

function capCaptureSingleFrame(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SINGLE_FRAME, 0, 0);
end;

function capCaptureGetSetup(hwnd: THandle; s: LongInt; wSize: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_GET_SEQUENCE_SETUP, wSize, s);
end;

function capCaptureSetSetup(hwnd: THandle; s: LongInt; wSize: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_SEQUENCE_SETUP, wSize, s);
end;

function capSetMCIDeviceName(hwnd: THandle; szName: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_SET_MCI_DEVICE, 0, szName);
end;

function capGetMCIDeviceName(hwnd: THandle; szName: LongInt; wSize: Word): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_GET_MCI_DEVICE, wSize, szName);
end;

function capPaletteOpen(hwnd: THandle; szName: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_PAL_OPEN, 0, szName);
end;

function capPaletteSave(hwnd: THandle; szName: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_PAL_SAVE, 0, szName);
end;

function capPalettePaste(hwnd: THandle): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_PAL_PASTE, 0, 0);
end;

function capPaletteAuto(hwnd: THandle; iFrames: Word; iColors: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_PAL_AUTOCREATE, iFrames, iColors);
end;

function capPaletteManual(hwnd: THandle; fGrab: Word; iColors: LongInt): LongInt;
begin
  Result := SendMessage(hwnd, WM_CAP_PAL_MANUALCREATE, fGrab, iColors);
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -