想用Directshow 枚举视频设备信息,但是用的D6,从网上找到了Delphi 10的示例https://download.csdn.net/download/dbyoung/10025100
从中找出枚举函数,从DirectShow9.pas中找到一些const的参数值
unit UtUSBCamera;
interface
uses
Windows, SysUtils, Classes, ActiveX;
type
PVideoInputInfo = ^TVideoInputInfo;
PVideoFormatInfo = ^TVideoFormatInfo;
{ 视频输入设备 }
TVideoInputInfo = record
id: TGUID;
strName: ShortString;
index: Integer;
end;
{ 视频支持格式 }
TVideoFormatInfo = record
id: TGUID;
iWidth, iHeight: Integer;
iMod: TGUID;
Frame: Int64;
format: ShortString;
end;
ICreateDevEnum = interface(IUnknown)
['{29840822-5B84-11D0-BD3B-00A0C911CE86}']
(*** ICreateDevEnum methods ***)
function CreateClassEnumerator(const clsidDeviceClass: TGUID;
out ppEnumMoniker: IEnumMoniker; dwFlags: DWORD): HResult;