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


C++ Producer::pass_list方法代码示例

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


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

示例1: on_durationSpinBox_editingFinished

void ImageProducerWidget::on_durationSpinBox_editingFinished()
{
    if (!m_producer)
        return;
    if (ui->durationSpinBox->value() == m_producer->get_out() + 1)
        return;
    Mlt::Producer* p = producer(MLT.profile());
    p->pass_list(*m_producer, "force_aspect_ratio, shotcut_aspect_num, shotcut_aspect_den,"
        "shotcut_resource, resource, ttl, shotcut_sequence");
    reopen(p);
}
开发者ID:gandalfliang,项目名称:shotcut,代码行数:11,代码来源:imageproducerwidget.cpp

示例2: on_sequenceCheckBox_clicked

void ImageProducerWidget::on_sequenceCheckBox_clicked(bool checked)
{
    QString resource = m_producer->get("resource");
    ui->repeatSpinBox->setEnabled(checked);
    if (checked && !m_producer->get(kShotcutResourceProperty))
        m_producer->set(kShotcutResourceProperty, resource.toUtf8().constData());
    m_producer->set(kShotcutSequenceProperty, checked);
    m_producer->set("ttl", ui->repeatSpinBox->value());
    if (checked) {
        QFileInfo info(resource);
        QString name(info.fileName());
        QString begin = "";
        int i = name.length();
        int count = 0;

        // find the last numeric digit
        for (; i && !name[i - 1].isDigit(); i--) {};
        // count the digits and build the begin value
        for (; i && name[i - 1].isDigit(); i--, count++)
            begin.prepend(name[i - 1]);
        if (count) {
            m_producer->set("begin", begin.toLatin1().constData());
            int j = begin.toInt();
            name.replace(i, count, begin.prepend('%').append('d'));
            resource = info.path() + "/" + name;
            m_producer->set("resource", resource.toUtf8().constData());

            // Count the number of consecutive files.
            MAIN.showStatusMessage(tr("Getting length of image sequence..."));
            name = info.fileName();
            name.replace(i, count, "%1");
            resource = info.path().append('/').append(name);
            for (i = j; QFile::exists(resource.arg(i, count, 10, QChar('0'))); ++i);
            i -= j;
            m_producer->set("length", i);
            ui->durationSpinBox->setValue(i);
            MAIN.showStatusMessage(tr("Reloading image sequence..."));
        }
    }
    else {
        m_producer->set("resource", m_producer->get(kShotcutResourceProperty));
        m_producer->set("length", qRound(MLT.profile().fps() * 600));
        ui->durationSpinBox->setValue(qRound(MLT.profile().fps() * Settings.imageDuration()));
    }
    Mlt::Producer* p = producer(MLT.profile());
    p->pass_list(*m_producer, "force_aspect_ratio,"
        kAspectRatioNumerator "," kAspectRatioDenominator ","
        kShotcutResourceProperty ", resource, ttl, length," kShotcutSequenceProperty);
    reopen(p);
}
开发者ID:cybercircuits,项目名称:shotcut,代码行数:50,代码来源:imageproducerwidget.cpp


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