procedure TVideoFormA.getvideosroucebtnClick(Sender: TObject);
var i:Integer;
begin
// get vidieo source
videosrccombox.Items.Clear;
bdev:= TSysDevEnum.Create(CLSID_VideoInputDeviceCategory);
if bDev.CountFilters > 0 then
for i := 0 to bDev.CountFilters - 1do
begin
videosrccombox.Items.Add( bDev.Filters.FriendlyName);
end;
VideoMediaTypes := TEnumMediaType.Create;
//get audio source
Audio_src.Clear;
bdev.SelectGUIDCategory(CLSID_AudioInputDeviceCategory);
if bDev.CountFilters > 0 then
for i := 0 to bDev.CountFilters - 1do
begin
Audio_src.Items.Add( bDev.Filters.FriendlyName);
end;
AudioMediaTypes := TEnumMediaType.Create;
end;
vcompresscombox.Clear;
//?
bdev.SelectGUIDCategory(CLSID_VideoCompressorCategory);
Filter.FilterGraph:=FilterGraph;
FilterGraph.Active:=True ;
for i:=0 to bDev.CountFilters-1do
vcompresscombox.Items.Add(bdev.Filters.FriendlyName);
FilterGraph.Active:=False;
//compressdev.Free;