コード例 #1
0
//=================================== TOSDpageDec ==================================
void TOSDpageDec::init(void)
{
    tbrSetRange(IDC_TBR_OSD_POSX, 0, 100, 10);
    tbrSetRange(IDC_TBR_OSD_POSY, 0, 100, 10);

    setFont(IDC_BT_OSD_LINE_UP  , parent->arrowsFont);
    setFont(IDC_BT_OSD_LINE_DOWN, parent->arrowsFont);

    hlv = GetDlgItem(m_hwnd, IDC_LV_OSD_LINES);
    ListView_SetExtendedListViewStyleEx(hlv, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
    int ncol = 0;
    RECT r;
    GetWindowRect(hlv, &r);
    ListView_AddCol(hlv, ncol, r.right - r.left - 26, _l("OSD item"), false);

    edLimitText(IDC_ED_OSD_USER, 1019);
    dragitem = -1;
    CRect rp;
    GetWindowRect(m_hwnd, &rp);
    CRect rc;
    GetWindowRect(hlv, &rc);
    lvx = rc.left - rp.left;
    lvy = rc.top - rp.top;

    edLimitText(IDC_ED_OSD_SAVE, MAX_PATH);
    cbxAdd(IDC_CBX_OSD_USERFORMAT, _l("HTML"), Tsubreader::SUB_SUBVIEWER);
    cbxAdd(IDC_CBX_OSD_USERFORMAT, _l("SSA"), Tsubreader::SUB_SSA);
}
コード例 #2
0
ファイル: Coffset.cpp プロジェクト: TheRyuu/ffdshow
void ToffsetPage::init(void)
{
    tbrSetRange(IDC_TBR_OFFSETY_X , -32, 32, 4);
    tbrSetRange(IDC_TBR_OFFSETY_Y , -32, 32, 4);
    tbrSetRange(IDC_TBR_OFFSETUV_X, -32, 32, 4);
    tbrSetRange(IDC_TBR_OFFSETUV_Y, -32, 32, 4);
}
コード例 #3
0
ファイル: Cbitmap.cpp プロジェクト: JERUKA9/ffdshow-tryouts
void TbitmapPage::init(void)
{
    edLimitText(IDC_ED_BITMAP_FLNM,MAX_PATH);
    tbrSetRange(IDC_TBR_BITMAP_POSX,0,100,10);
    tbrSetRange(IDC_TBR_BITMAP_POSY,0,100,10);
    tbrSetRange(IDC_TBR_BITMAP_OPACITY,0,256);
}
コード例 #4
0
ファイル: Cfreeverb.cpp プロジェクト: JERUKA9/ffdshow-tryouts
void TfreeverbPage::init(void)
{
    tbrSetRange(IDC_TBR_FREEVERB_ROOMSIZE,0,1000);
    tbrSetRange(IDC_TBR_FREEVERB_DAMPING,0,1000);
    tbrSetRange(IDC_TBR_FREEVERB_WET,0,1000);
    tbrSetRange(IDC_TBR_FREEVERB_DRY,0,1000);
    tbrSetRange(IDC_TBR_FREEVERB_WIDTH,0,1000);
}
コード例 #5
0
void TresizeAspectPage::init(void)
{
    tbrSetRange(IDC_TBR_ASPECT_USER, int(0.1 * 256), 5 * 256, int(.6 * 256));
    tbrSetRange(IDC_TBR_HWOVERLAY_ASPECT, 0, 5 * 256, int(.6 * 256));

    setFont(IDC_BT_RESIZE_SIZE_MENU  , parent->arrowsFont);
    setFont(IDC_BT_RESIZE_MOD_16     , parent->arrowsFont);
    setFont(IDC_BT_RESIZE_ASPECT_MENU, parent->arrowsFont);
    setFont(IDC_BT_RESIZE_PIX_MENU   , parent->arrowsFont);
    setFont(IDC_BT_RESIZE_USER_ASPECT, parent->arrowsFont);
}
コード例 #6
0
void TconvolverPage::init(void)
{
    tbrSetRange(IDC_TBR_CONVOLVER_MIXINGSTRENGTH,0,100);
    tbrSetRange(IDC_TBR_CONVOLVER_LEVELADJUSTDB,-300,300);
    hlv=GetDlgItem(m_hwnd,IDC_LV_CONVOLVER_FILES);
    int ncol=0;
    ListView_AddCol(hlv,ncol,cfgGet(IDFF_lvConvolverWidth0),_(IDC_LV_CONVOLVER_FILES,_l("Channel")),false);
    ListView_AddCol(hlv,ncol,cfgGet(IDFF_lvConvolverWidth1),_(IDC_LV_CONVOLVER_FILES,_l("File")),false);
    ListView_AddCol(hlv,ncol,cfgGet(IDFF_lvConvolverWidth2),_(IDC_LV_CONVOLVER_FILES,_l("Format")),false);
    ListView_SetExtendedListViewStyle(hlv,ListView_GetExtendedListViewStyle(hlv)|LVS_EX_FULLROWSELECT);
    ListView_SetItemCount(hlv,6);
    lvSetSelItem(IDC_LV_CONVOLVER_FILES,cfgGet(IDFF_lvConvolverSelected));
}
コード例 #7
0
ファイル: Clevels.cpp プロジェクト: JERUKA9/ffdshow-tryouts
//===================================== TlevelsPage =====================================
void TlevelsPage::init(void)
{
    deciD->queryFilterInterface(IID_IimgFilterLevels,(void**)&filter);
    memset(&histogramBmp.bmiHeader,0,sizeof(histogramBmp.bmiHeader));
    histogramBmp.bmiHeader.biSize=sizeof(histogramBmp.bmiHeader);
    histogramBmp.bmiHeader.biWidth=256;
    histogramBmp.bmiHeader.biHeight=64;
    histogramBmp.bmiHeader.biPlanes=1;
    histogramBmp.bmiHeader.biBitCount=8;
    histogramBmp.bmiHeader.biCompression=BI_RGB;
    histogramBmp.bmiHeader.biXPelsPerMeter=100;
    histogramBmp.bmiHeader.biYPelsPerMeter=100;
    memset(histogramBmp.bmiColors,0,256*sizeof(RGBQUAD));
    histogramBmp.bmiColors[1].rgbRed=histogramBmp.bmiColors[1].rgbGreen=histogramBmp.bmiColors[1].rgbBlue=255;
    histogramBmp.bmiColors[2].rgbRed=histogramBmp.bmiColors[2].rgbGreen=histogramBmp.bmiColors[2].rgbBlue=192;
    memset(histogramBits,1,sizeof(histogramBits));

    curvesBmp=histogramBmp;
    curvesBmp.bmiHeader.biHeight=256;
    hcurves=GetDlgItem(m_hwnd,IDC_BMP_LEVELS_CURVES);

    bmpGradient=LoadBitmap(hi,MAKEINTRESOURCE(IDB_GRADIENT));
    HDC hdc=GetDC(m_hwnd);
    hdcGradient=CreateCompatibleDC(hdc);
    oldHDCgradient=SelectObject(hdcGradient,bmpGradient);
    LOGFONT oldFont;
    HFONT hf=(HFONT)GetCurrentObject(hdc,OBJ_FONT);
    GetObject(hf,sizeof(LOGFONT),&oldFont);
    strcpy(oldFont.lfFaceName,_l("Courier"));
    oldFont.lfWeight=FW_LIGHT;
    oldFont.lfHeight=-11;
    oldFont.lfWidth=0;
    fontCurier=CreateFontIndirect(&oldFont);
    SendMessage(GetDlgItem(m_hwnd,IDC_LBX_LEVELS_CURVES),WM_SETFONT,WPARAM(fontCurier),FALSE);
    strcpy(oldFont.lfFaceName,_l("Small fonts"));
    fontGradient=CreateFontIndirect(&oldFont);
    ReleaseDC(m_hwnd,hdc);
    isMap=false;
    hIn=GetDlgItem(m_hwnd,IDC_BMP_LEVELS_IN);
    hOut=GetDlgItem(m_hwnd,IDC_BMP_LEVELS_OUT);
    RECT r;
    GetWindowRect(hIn,&r);
    bdx=r.right-r.left-2;
    tbrSetRange(IDC_TBR_LEVELS_GAMMA,1,400,40);
    tbrSetRange(IDC_TBR_LEVELS_POSTERIZE,1,255);
    SendDlgItemMessage(m_hwnd,IDC_UD_Y_MAX_DELTA ,UDM_SETRANGE,0,MAKELONG(50,1));
    SendDlgItemMessage(m_hwnd,IDC_UD_Y_THRESHOLD ,UDM_SETRANGE,0,MAKELONG(150,1));
    SendDlgItemMessage(m_hwnd,IDC_UD_Y_TEMPORAL ,UDM_SETRANGE,0,MAKELONG(20,1));
    startup=true;
    addHint(IDC_CHB_LEVELS_RGB, L"You need to force RGB conversion to get accurate color. If your computer is fast enough, we recommend you to check it. If the video is interlaced, please make sure to deinterlace before RGB conversion.\nFor the range setting, output levels in RGB conversion page is used even if the picture is RGB from the start.");
}
コード例 #8
0
ファイル: Cgeneric.cpp プロジェクト: JERUKA9/ffdshow-tryouts
void TgenericPage::init(void)
{
    tbrSetRange(IDC_TBR_MAXKEYINTERVAL,1,500,10);
    tbrSetRange(IDC_TBR_MINKEYINTERVAL,1,500,10);

    hlv=GetDlgItem(m_hwnd,IDC_LV_GENERIC);
    ListView_SetExtendedListViewStyleEx(hlv,LVS_EX_CHECKBOXES,LVS_EX_CHECKBOXES);
    int ncol=0;
    RECT r;
    GetWindowRect(hlv,&r);
    ListView_AddCol(hlv,ncol,r.right-r.left-36,_l("Option"),false);
    SendMessage(hlv,LVM_SETBKCOLOR,0,GetSysColor(COLOR_BTNFACE));
    SendMessage(hlv,LVM_SETTEXTBKCOLOR,0,GetSysColor(COLOR_BTNFACE));
}
コード例 #9
0
ファイル: CresizeSettings.cpp プロジェクト: TheRyuu/ffdshow
void TresizeSettingsPage::init(void)
{
    tbrSetRange(IDC_TBR_RESIZE_GBLUR_LUM    , 0, 200, 20);
    tbrSetRange(IDC_TBR_RESIZE_GBLUR_CHROM  , 0, 200, 20);
    tbrSetRange(IDC_TBR_RESIZE_SHARPEN_LUM  , 0, 200, 20);
    tbrSetRange(IDC_TBR_RESIZE_SHARPEN_CHROM, 0, 200, 20);
    tbrSetRange(IDC_TBR_RESIZE_HWARP        , 800, 1300, 200);
    tbrSetRange(IDC_TBR_RESIZE_VWARP        , 800, 1300, 200);
    tbrSetRange(IDC_TBR_RESIZE_PARAM_LUMA, 0, 1);
    tbrSetRange(IDC_TBR_RESIZE_PARAM_CHROMA, 0, 1);
}
コード例 #10
0
void TsubtitlesTextPage::init()
{
    tbrSetRange(IDC_TBR_SUB_LINESPACING,0,200,10);
    strings dicts=TtextFixBase::getDicts(config);
    for (strings::const_iterator d=dicts.begin(); d!=dicts.end(); d++) {
        cbxAdd(IDC_CBX_SUBFIX_ORTOGRAPHY,d->c_str());
    }
    cbxSetDroppedWidth(IDC_CBX_SUBFIX_IL,250);
    cbxSetDroppedWidth(IDC_CBX_SUB_WORDWRAP,250);
}
コード例 #11
0
ファイル: Cvolume.cpp プロジェクト: xinjiguaike/ffdshow
void TvolumePage::switchDb(void)
{
    isdb = !!cfgGet(IDFF_dlgVolumeDb);
    if (isdb) {
        tbrSetRange(IDC_TBR_VOLUME_MASTER, -30, 30, 5);
    } else {
        tbrSetRange(IDC_TBR_VOLUME_MASTER, 0, 300, 10);
    }
    for (int i = 0; i < countof(tbrs); i++) {
        if (isdb) {
            tbrSetRange(tbrs[i], -30, 30, 5);
        } else {
            tbrSetRange(tbrs[i], -300, 0, 10);
        }
    }
    setDlgItemText(m_hwnd, IDC_LBL_VOLUME_NORMALIZE_MAX2, isdb ? _l("dB") : _l("%"));
    master2dlg();
    speakers2dlg();
    normalize2dlg();
}
コード例 #12
0
ファイル: CresizeSettings.cpp プロジェクト: TheRyuu/ffdshow
void TresizeSettingsPage::param2dlg(const TparamsIDs &ids)
{
    int max, step1, step2, pos;
    char_t pomS[256];
    double realPos;
    const int idParam[] = {ids.idc_lbl, ids.idc_tbr, 0};
    int method = cfgGet(ids.idff_method);
    const char_t *name = _l("Parameter");

    switch (method) {
        case TresizeAspectSettings::METHOD_SWS_BICUBIC:
            max = 400;
            step1 = 10;
            step2 = 40;
            pos = cfgGet(ids.idff_bicubicParam);
            realPos = -0.01 * pos;
            pos = 400 - pos;
            break;
        case TresizeAspectSettings::METHOD_SWS_GAUSS:
            max = 100;
            step1 = 5 ;
            step2 = 20;
            pos = cfgGet(ids.idff_gaussParam);
            realPos = 0.1 * pos;
            break;
        case TresizeAspectSettings::METHOD_SWS_LANCZOS:
            max = 10 ;
            step1 = 1 ;
            step2 = 2 ;
            pos = cfgGet(ids.idff_lanczosParam);
            name = _l("Number of taps:");
            realPos = pos;
            break;
        default:
            enable(0, idParam);
            tbrSet(ids.idc_tbr, 0);
            setDlgItemText(m_hwnd, ids.idc_lbl, _(ids.idc_lbl));
            return;
    };
    int sws = TresizeAspectSettings::methodsProps[cfgGet(IDFF_resizeMethodLuma)].library == TresizeAspectSettings::LIB_SWSCALER;
    enable(sws, idParam);
    tbrSetRange(ids.idc_tbr, 0, max);
    //SendDlgItemMessage(m_hwnd,ids.idc_tbr,TBM_SETRANGE,TRUE,MAKELPARAM(0,max));
    SendDlgItemMessage(m_hwnd, ids.idc_tbr, TBM_SETLINESIZE, 0, step1);
    SendDlgItemMessage(m_hwnd, ids.idc_tbr, TBM_SETPAGESIZE, 0, step2);
    tbrSet(ids.idc_tbr, pos);
    if (realPos == 0) {
        tsnprintf_s(pomS, countof(pomS), _TRUNCATE, _l("%s %s"), _(ids.idc_lbl, name), _(ids.idc_lbl, _l("default")));
    } else {
        tsnprintf_s(pomS, countof(pomS), _TRUNCATE, _l("%s %3.2f"), _(ids.idc_lbl, name), realPos);
    }
    setDlgItemText(m_hwnd, ids.idc_lbl, pomS);
}
コード例 #13
0
ファイル: CresizeBorders.cpp プロジェクト: TheRyuu/ffdshow
void TresizeBordersPage::init(void)
{
    tbrSetRange(IDC_TBR_BORDER_HORIZ_PERCENT, 0, 100, 10);
    tbrSetRange(IDC_TBR_BORDER_VERT_PERCENT , 0, 100, 10);
    tbrSetRange(IDC_TBR_BORDER_HORIZ_PIXELS, 0, 300, 16);
    tbrSetRange(IDC_TBR_BORDER_VERT_PIXELS , 0, 300, 16);
    tbrSetRange(IDC_TBR_BORDER_HORIZ_DIV , 0, 100, 10);
    tbrSetRange(IDC_TBR_BORDER_VERT_DIV , 0, 100, 10);
    tbrSetRange(IDC_TBR_BORDER_BRIGHTNESS , 0, 255, 10);

    addHint(IDC_TBR_BORDER_BRIGHTNESS, _l("Brightness x is interpreted as RGB(x,x,x) and converted to luma using the settings in RGB conversion page, if necessary."));
}
コード例 #14
0
ファイル: CgradFun.cpp プロジェクト: TheRyuu/ffdshow
void TgradFunPage::init(void)
{
    tbrSetRange(IDC_TBR_GRADFUN_THRESHOLD, 51, 2000);
    tbrSetRange(IDC_TBR_GRADFUN_RADIUS, 4, 32);
}
コード例 #15
0
ファイル: TffdshowPageEnc.cpp プロジェクト: TheRyuu/ffdshow
void TffdshowPageEnc::quick2dlg(bool redraw)
{
    static const int idQuickAll[] = {IDC_LBL_ENCODER, IDC_CBX_ENCODER, IDC_LBL_FOURCC, IDC_CBX_FOURCC, IDC_LBL_MODES, IDC_CBX_MODES, IDC_LBL_QUICK, IDC_TBR_QUICK, IDC_ED_QUICK, 0};
    if (isAbout) {
        enable(false, idQuickAll);
        return;
    }
    int mode = cfgGet(IDFF_enc_mode);
    int ii = cbxFindItemData(IDC_CBX_MODES, mode);
    if (ii == CB_ERR && cbxGetItemCount(IDC_CBX_MODES) > 0) {
        ii = 0;
        mode = (int)cbxGetItemData(IDC_CBX_MODES, 0);
        cfgSet(IDFF_enc_mode, mode);
    };
    cbxSetCurSel(IDC_CBX_MODES, ii);
    static const int idQuick[] = {IDC_LBL_QUICK, IDC_ED_QUICK, IDC_TBR_QUICK, 0};
    if (ii != CB_ERR) {
        if (redraw || oldmode != mode) {
            oldmode = mode;
            const char_t *text = _l("");
            valMin = 0;
            valMax = 0;
            valIdff = 0;
            switch (oldmode) {
                case ENC_MODE::CBR:
                    text = _l("Bitrate (kbps)");
                    valIdff = IDFF_enc_bitrate1000;
                    valMin = 1;
                    valMax = 10000;
                    break;
                case ENC_MODE::VBR_QUAL:
                    text = _l("Quality");
                    valIdff = IDFF_enc_qual;
                    valMin = 0;
                    valMax = 100;
                    break;
                case ENC_MODE::VBR_QUANT:
                    text = _l("Quantizer");
                    valIdff = IDFF_enc_quant;
                    valMin = qmin;
                    valMax = qmax;
                    break;
            }
            setDlgItemText(m_hwnd, IDC_LBL_QUICK, _(IDC_LBL_QUICK, text));
            tbrSetRange(IDC_TBR_QUICK, valMin, valMax, (valMax - valMin) / 10);
        }
        if (valIdff) {
            enable(1, idQuick);
            int val = cfgGet(valIdff);
            if (!isIn(val, valMin, valMax)) {
                val = limit(val, valMin, valMax);
                cfgSet(valIdff, val);
            }
            tbrSet(IDC_TBR_QUICK, val);
            SetDlgItemInt(m_hwnd, IDC_ED_QUICK, val, FALSE);
        } else {
            enable(0, idQuick);
            tbrSet(IDC_TBR_QUICK, 0);
            setDlgItemText(m_hwnd, IDC_ED_QUICK, _l(""));
        }
    } else {
        enable(0, idQuick);
    }

    if (page && redraw) {
        selectPage(page);
    }
    if (isGraph) {
        enable(false, idQuickAll);
    }
}
コード例 #16
0
ファイル: QSdecoderOptions.cpp プロジェクト: TheRyuu/ffdshow
void TQSdecoderOptionsPage::denoise2dlg(void)
{
    tbrSetRange(IDC_QS_DENOISE, 0, 64, 1);
    tbrSet(IDC_QS_DENOISE, cfgGet(IDFF_QS_DENOISE), IDC_QS_DENOISE_LBL);
}
コード例 #17
0
ファイル: QSdecoderOptions.cpp プロジェクト: TheRyuu/ffdshow
void TQSdecoderOptionsPage::detail2dlg(void)
{
    tbrSetRange(IDC_QS_DETAIL, 0, 64, 1);
    tbrSet(IDC_QS_DETAIL, cfgGet(IDFF_QS_DETAIL), IDC_QS_DETAIL_LBL);
}
コード例 #18
0
ファイル: Cdct.cpp プロジェクト: TheRyuu/ffdshow
void TdctPage::init(void)
{
    tbrSetRange(IDC_TBR_DCT_QUANT, 1, 31, 3);
}