Repository navigation
Video Capture device driver settings form #19
Copy link
Copy link
Open
Description
Activity
I am too. I want to open "Capture Properties" of a video capture (webcam). Thanks before ...Original comment by
tbadmia...@gmail.comon 5 Jul 2014 at 4:23Attachments:
- [Capture Properties.jpg](https://storage.googleapis.com/google-code-attachments/dspack/issue-19/comment-1/Capture Properties.jpg)
I did. First, I changed the TFilter on the DSPack.pas, moving the private function "function GetFilter: IBaseFilter;" to the public area, like this: // ***************************************************************************** // TFilter // ***************************************************************************** { This component is an easy way to add a specific filter to a filter graph. You can retrieve an interface using the as operator whith D6 :)} TFilter = class(TComponent, IFilter) private FFilterGraph : TFilterGraph; FBaseFilter: TBaseFilter; FFilter: IBaseFilter; //function GetFilter: IBaseFilter; function GetName: string; procedure NotifyFilter(operation: TFilterOperation; Param: integer = 0); procedure SetFilterGraph(AFilterGraph: TFilterGraph); protected {@exclude} procedure Notification(AComponent: TComponent; Operation: TOperation); override; public { Constructor method. } constructor Create(AOwner: TComponent); override; { Destructor method. } destructor Destroy; override; { Retrieve a filter interface. } function QueryInterface(const IID: TGUID; out Obj): HResult; override; stdcall; function GetFilter: IBaseFilter; published { This is the Filter Editor .} property BaseFilter: TBaseFilter read FBaseFilter write FBaseFilter; { The filter must be connected to a TFilterGraph component.} property FilterGraph: TFilterGraph read FFilterGraph write SetFilterGraph; end; { Now, the example: Add the functions below to a Unit.pas that can access your VideoFilter Component and the VideoWindow Component. Replace my "VideoFilter" and "VideoWindow" by your components names, and call the first function "ShowPropertyDialog" from a button or something else. Done, the code will display the Property Dialog of your device :-) Off course, you can try to pass the VideoWindow and VideoFilter trought the functions or create a new VideoWindow component with this feature. But now, you have the idea how to do it. The code below works fine on my DELPHI 5! So, certainly it will works on all the new versions ^^ } function ShowPropertyDialog(): HResult; var FilterInfo: FILTER_INFO; begin Result := VideoFilter.GetFilter.QueryFilterInfo(FilterInfo); if not(Failed(Result)) then Result := ShowPropertyDialogEx(VideoFilter.GetFilter, FilterInfo.achName); end; function ShowPropertyDialogEx(const IBF: IUnknown; FilterName: PWideChar): HResult; var pProp: ISpecifyPropertyPages; c: tagCAUUID; begin pProp := nil; Result := IBF.QueryInterface(ISpecifyPropertyPages, pProp); if Result = S_OK then begin Result := pProp.GetPages(c); if (Result = S_OK) and (c.cElems > 0) then begin Result := OleCreatePropertyFrame(VideoWindow.Handle, 0, 0, FilterName, 1, @IBF, c.cElems, c.pElems, 0, 0, nil); CoTaskMemFree(c.pElems); end; end; end;Original comment by
sylvio.r...@gmail.comon 14 Oct 2014 at 1:01You can use function from DXSUtil e.g. ShowFilterPropertyPage(Self.Handle, VideoFilter as IBaseFilter);Original comment by
kobylans...@gmail.comon 12 Nov 2014 at 3:48
Original issue reported on code.google.com by
axeldeli...@gmail.comon 20 Jan 2014 at 8:01Attachments: