Пример #1
0
BOOL CPPageInternalFilters::OnApply()
{
    UpdateData();

    CAppSettings& s = AfxGetAppSettings();

    CPPageInternalFiltersListBox* list = &m_listSrc;
    for (int l = 0; l < 2; l++) {
        for (int i = 0; i < list->GetCount(); i++) {
            filter_t* f = (filter_t*) list->GetItemDataPtr(i);

            switch (f->type) {
                case SOURCE_FILTER:
                    s.SrcFilters[f->flag] = !!list->GetCheck(i);
                    break;
                case DECODER:
                    s.TraFilters[f->flag] = !!list->GetCheck(i);
                    break;
                case DXVA_DECODER:
                    s.DXVAFilters[f->flag] = !!list->GetCheck(i);
                    break;
                case FFMPEG_DECODER:
                    s.FFmpegFilters[f->flag] = !!list->GetCheck(i);
                    break;
            }
        }
        list = &m_listTra;
    }

    return __super::OnApply();
}
Пример #2
0
void CPPageInternalFilters::ShowPPage(CPPageInternalFiltersListBox& l)
{
    int i = l.GetCurSel();
    if (i < 0) {
        return;
    }

    filter_t* f = (filter_t*)l.GetItemDataPtr(i);
    if (!f || !f->CreateInstance) {
        return;
    }

    HRESULT hr;
    CUnknown* pObj = f->CreateInstance(NULL, &hr);
    if (!pObj) {
        return;
    }

    CComPtr<IUnknown> pUnk = (IUnknown*)(INonDelegatingUnknown*)pObj;

    if (SUCCEEDED(hr)) {
        if (CComQIPtr<ISpecifyPropertyPages> pSPP = pUnk) {
            CComPropertySheet ps(ResStr(IDS_PROPSHEET_PROPERTIES), this);
            ps.AddPages(pSPP);
            ps.DoModal();
        }
    }
}
Пример #3
0
void CPPageInternalFilters::ShowPPage(CPPageInternalFiltersListBox& l)
{
    int i = l.GetCurSel();
    if (i < 0) {
        return;
    }

    filter_t* f = (filter_t*)l.GetItemDataPtr(i);
    if (f && f->ShowPropertyPages) {
        f->ShowPropertyPages(this);
    }
}