2013-07-11 83 views
-1

我正在創建一個顯示視頻的程序,爲此我使用了Delphi和directshow。我需要選擇視頻輸入格式(NTSC,PAL,SECAM)。有一個對話框讓你選擇,但我不知道如何用delphi或c +和directshow來顯示它。顯示允許您選擇模擬視頻標準的對話框的過程是什麼?模擬視頻標準對話框

謝謝!

+0

你能給我們一個截圖嗎? –

+0

您將會發現如何在AMCAP源代碼中顯示輸入設備配置對話框http://msdn.microsoft.com/en-us/library/windows/desktop/dd373424(v=vs.85).aspx – alexbuisson

+0

David ,對話框是這樣的http://www.azcendant.com/images/EasyCapProperties.jpg – Carl

回答

1
function DisplayPropertyFrame(Filter: IBaseFilter; Handle: THandle): HResult; 
var 
    PropertyPages: ISpecifyPropertyPages; 
    Pages: CAUUID; 
    FilterInfo: TFilterInfo; 
    pfilterUnk: IUnknown; 
begin 
    Result := E_FAIL; 

    if Filter = NIL then EXIT; 

    Result := Filter.QueryInterface(ISpecifyPropertyPages, PropertyPages); 

    if (SUCCEEDED(Result)) then 
    begin 
    Filter.QueryFilterInfo(FilterInfo); 
    Filter.QueryInterface(IUnknown, pfilterUnk); 

    PropertyPages.GetPages(Pages); 
    PropertyPages := NIL; 

    OleCreatePropertyFrame(
     Handle,     
     0, 
     0,     
     FilterInfo.achName,  
     1,      
     @pfilterUnk,    
     Pages.cElems,   
     Pages.pElems,   
     0,      
     0, 
     NIL     
    ); 

    pfilterUnk := NIL; 
    FilterInfo.pGraph := NIL; 
    CoTaskMemFree(Pages.pElems); 
    end; 
end; 

function DisplayVideoCaptureDeviceProperty(Handle: THandle): HResult; 
begin 
    Result := DisplayPropertyFrame(VideoCaptureFilter, Handle); 
end;