当前位置: 首页>>代码示例>>C++>>正文


C++ Properties::get_int方法代码示例

本文整理汇总了C++中mlt::Properties::get_int方法的典型用法代码示例。如果您正苦于以下问题:C++ Properties::get_int方法的具体用法?C++ Properties::get_int怎么用?C++ Properties::get_int使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mlt::Properties的用法示例。


在下文中一共展示了Properties::get_int方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: loadPreset

void CountProducerWidget::loadPreset(Mlt::Properties& p)
{
    if (!p.get("direction") || !p.get("style")) return;
    int index = -1;

    index = ui->directionCombo->findData(QVariant(p.get("direction")));
    ui->directionCombo->setCurrentIndex(index);

    index = ui->styleCombo->findData(QVariant(p.get("style")));
    ui->styleCombo->setCurrentIndex(index);

    index = ui->soundCombo->findData(QVariant(p.get("sound")));
    ui->soundCombo->setCurrentIndex(index);

    index = ui->backgroundCombo->findData(QVariant(p.get("background")));
    ui->backgroundCombo->setCurrentIndex(index);

    ui->dropCheckBox->setChecked(p.get("drop"));

    ui->durationSpinBox->setValue(p.get_int("length"));

    if (m_producer) {
        m_producer->set("direction", p.get("direction"));
        m_producer->set("style", p.get("style"));
        m_producer->set("sound", p.get("sound"));
        m_producer->set("background", p.get("background"));
        m_producer->set("drop", p.get("drop"));
        setLength(producer(), ui->durationSpinBox->value());
        m_producer->set(kShotcutDetailProperty, detail().toUtf8().constData());
        emit producerChanged(producer());
    }
}
开发者ID:bmatherly,项目名称:shotcut,代码行数:32,代码来源:countproducerwidget.cpp

示例2: s

void Video4LinuxWidget::loadPreset(Mlt::Properties& p)
{
    ui->v4lLineEdit->setText(p.get("device"));
    ui->v4lWidthSpinBox->setValue(p.get_int("width"));
    ui->v4lHeightSpinBox->setValue(p.get_int("height"));
    ui->v4lFramerateSpinBox->setValue(p.get_double("framerate"));
    QString s(p.get("standard"));
    for (int i = 0; i < ui->v4lStandardCombo->count(); i++) {
        if (ui->v4lStandardCombo->itemText(i) == s) {
            ui->v4lStandardCombo->setCurrentIndex(i);
            break;
        }
    }
    ui->v4lChannelSpinBox->setValue(p.get_int("channel"));
    ui->v4lAudioComboBox->setCurrentIndex(p.get_int("audio_ix"));
    on_v4lAudioComboBox_activated(p.get_int("audio_ix"));
}
开发者ID:bmatherly,项目名称:shotcut,代码行数:17,代码来源:video4linuxwidget.cpp

示例3: loadPreset

void AlsaWidget::loadPreset(Mlt::Properties& p)
{
    QString s(p.get("resource"));
    int i = s.indexOf(':');
    if (i > -1)
        ui->lineEdit->setText(s.mid(i + 1));
    if (p.get("channels"))
        ui->alsaChannelsSpinBox->setValue(p.get_int("channels"));
}
开发者ID:bmatherly,项目名称:shotcut,代码行数:9,代码来源:alsawidget.cpp

示例4: loadPreset

void ColorBarsWidget::loadPreset(Mlt::Properties& p)
{
    ui->comboBox->setCurrentIndex(p.get_int(kParamType));
}
开发者ID:Sunderland93,项目名称:shotcut,代码行数:4,代码来源:colorbarswidget.cpp

示例5: loadPresetFromProperties

void EncodeDock::loadPresetFromProperties(Mlt::Properties& preset)
{
    int audioQuality = -1;
    int videoQuality = -1;
    QStringList other;

    ui->disableAudioCheckbox->setChecked(preset.get_int("an"));
    ui->disableVideoCheckbox->setChecked(preset.get_int("vn"));
    m_extension.clear();
    for (int i = 0; i < preset.count(); i++) {
        QString name(preset.get_name(i));
        if (name == "f") {
            for (int i = 0; i < ui->formatCombo->count(); i++)
                if (ui->formatCombo->itemText(i) == preset.get("f")) {
                    ui->formatCombo->blockSignals(true);
                    ui->formatCombo->setCurrentIndex(i);
                    ui->formatCombo->blockSignals(false);
                    break;
                }
        }
        else if (name == "acodec") {
            for (int i = 0; i < ui->audioCodecCombo->count(); i++)
                if (ui->audioCodecCombo->itemText(i) == preset.get("acodec"))
                    ui->audioCodecCombo->setCurrentIndex(i);
            if (ui->audioCodecCombo->currentText() == "libopus")
                // reset libopus to VBR (its default)
                ui->audioRateControlCombo->setCurrentIndex(RateControlQuality);
        }
        else if (name == "vcodec") {
            for (int i = 0; i < ui->videoCodecCombo->count(); i++)
                if (ui->videoCodecCombo->itemText(i) == preset.get("vcodec"))
                    ui->videoCodecCombo->setCurrentIndex(i);
        }
        else if (name == "ar")
            ui->sampleRateCombo->lineEdit()->setText(preset.get("ar"));
        else if (name == "ab")
            ui->audioBitrateCombo->lineEdit()->setText(preset.get("ab"));
        else if (name == "vb") {
            ui->videoRateControlCombo->setCurrentIndex(RateControlAverage);
            ui->videoBitrateCombo->lineEdit()->setText(preset.get("vb"));
        }
        else if (name == "g")
            ui->gopSpinner->setValue(preset.get_int("g"));
        else if (name == "bf")
            ui->bFramesSpinner->setValue(preset.get_int("bf"));
        else if (name == "deinterlace") {
            ui->scanModeCombo->setCurrentIndex(preset.get_int("deinterlace"));
            ui->scanModeCombo->setEnabled(false);
        }
        else if (name == "progressive") {
            ui->scanModeCombo->setCurrentIndex(preset.get_int("progressive"));
            ui->scanModeCombo->setEnabled(false);
        }
        else if (name == "top_field_first") {
            ui->fieldOrderCombo->setCurrentIndex(preset.get_int("top_field_first"));
        }
        else if (name == "width") {
            ui->widthSpinner->setValue(preset.get_int("width"));
            ui->widthSpinner->setEnabled(false);
        }
        else if (name == "height") {
            ui->heightSpinner->setValue(preset.get_int("height"));
            ui->heightSpinner->setEnabled(false);
        }
        else if (name == "aspect") {
            double dar = preset.get_double("aspect");
            switch (int(dar * 100)) {
            case 133:
                ui->aspectNumSpinner->setValue(4);
                ui->aspectDenSpinner->setValue(3);
                break;
            case 177:
                ui->aspectNumSpinner->setValue(16);
                ui->aspectDenSpinner->setValue(9);
                break;
            case 56:
                ui->aspectNumSpinner->setValue(9);
                ui->aspectDenSpinner->setValue(16);
                break;
            default:
                ui->aspectNumSpinner->setValue(dar * 1000);
                ui->aspectDenSpinner->setValue(1000);
                break;
            }
            ui->aspectNumSpinner->setEnabled(false);
            ui->aspectDenSpinner->setEnabled(false);
        }
        else if (name == "r") {
            ui->fpsSpinner->setValue(preset.get_double("r"));
            ui->fpsSpinner->setEnabled(false);
        }
        else if (name == "pix_fmt") {
            QString pix_fmt(preset.get("pix_fmt"));
            if (pix_fmt != "yuv420p")
                other.append(QString("%1=%2").arg(name).arg(pix_fmt));
        }
        else if (name == "pass")
            ui->dualPassCheckbox->setChecked(true);
        else if (name == "aq") {
            ui->audioRateControlCombo->setCurrentIndex(RateControlQuality);
//.........这里部分代码省略.........
开发者ID:UriChan,项目名称:shotcut,代码行数:101,代码来源:encodedock.cpp

示例6: loadPreset

void DecklinkProducerWidget::loadPreset(Mlt::Properties& p)
{
    ui->deviceCombo->setCurrentIndex(p.get_int("card"));
    ui->deviceCombo->setCurrentIndex(p.get_int("profile"));
}
开发者ID:eddrog,项目名称:shotcut,代码行数:5,代码来源:decklinkproducerwidget.cpp


注:本文中的mlt::Properties::get_int方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。